vue_oxc_toolkit 0.8.2

A parser to generate semantically correct AST from Vue SFCs for code linting purposes.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
---
source: crates/vue_oxc_toolkit/src/test.rs
expression: result
---
=============== Program ===============
Program {
    span: Span {
        start: 0,
        end: 265,
    },
    source_text: "<template>\n  <SomeComponent />\n  <some-component />\n  <Transition></Transition>\n  <component></component>\n  <motion.div></motion.div>\n</template>\n\n<script lang=\"ts\" setup>\nimport SomeComponent from './SomeComponent.vue';\nimport { motion } from 'motion-v'\n</script>\n",
    comments: Vec(
        [],
    ),
    hashbang: None,
    directives: Vec(
        [],
    ),
    body: Vec(
        [
            ImportDeclaration(
                ImportDeclaration {
                    span: Span {
                        start: 172,
                        end: 220,
                    },
                    specifiers: Some(
                        Vec(
                            [
                                ImportDefaultSpecifier(
                                    ImportDefaultSpecifier {
                                        span: Span {
                                            start: 179,
                                            end: 192,
                                        },
                                        local: BindingIdentifier {
                                            span: Span {
                                                start: 179,
                                                end: 192,
                                            },
                                            name: "SomeComponent",
                                            node_id: Cell {
                                                value: NodeId(0),
                                            },
                                            symbol_id: Cell {
                                                value: None,
                                            },
                                        },
                                        node_id: Cell {
                                            value: NodeId(0),
                                        },
                                    },
                                ),
                            ],
                        ),
                    ),
                    source: StringLiteral {
                        span: Span {
                            start: 198,
                            end: 219,
                        },
                        value: "./SomeComponent.vue",
                        raw: Some(
                            "'./SomeComponent.vue'",
                        ),
                        node_id: Cell {
                            value: NodeId(0),
                        },
                        lone_surrogates: false,
                    },
                    with_clause: None,
                    node_id: Cell {
                        value: NodeId(0),
                    },
                    phase: None,
                    import_kind: Value,
                },
            ),
            ImportDeclaration(
                ImportDeclaration {
                    span: Span {
                        start: 221,
                        end: 254,
                    },
                    specifiers: Some(
                        Vec(
                            [
                                ImportSpecifier(
                                    ImportSpecifier {
                                        span: Span {
                                            start: 230,
                                            end: 236,
                                        },
                                        imported: IdentifierName(
                                            IdentifierName {
                                                span: Span {
                                                    start: 230,
                                                    end: 236,
                                                },
                                                name: "motion",
                                                node_id: Cell {
                                                    value: NodeId(0),
                                                },
                                            },
                                        ),
                                        local: BindingIdentifier {
                                            span: Span {
                                                start: 230,
                                                end: 236,
                                            },
                                            name: "motion",
                                            node_id: Cell {
                                                value: NodeId(0),
                                            },
                                            symbol_id: Cell {
                                                value: None,
                                            },
                                        },
                                        node_id: Cell {
                                            value: NodeId(0),
                                        },
                                        import_kind: Value,
                                    },
                                ),
                            ],
                        ),
                    ),
                    source: StringLiteral {
                        span: Span {
                            start: 244,
                            end: 254,
                        },
                        value: "motion-v",
                        raw: Some(
                            "'motion-v'",
                        ),
                        node_id: Cell {
                            value: NodeId(0),
                        },
                        lone_surrogates: false,
                    },
                    with_clause: None,
                    node_id: Cell {
                        value: NodeId(0),
                    },
                    phase: None,
                    import_kind: Value,
                },
            ),
            ExpressionStatement(
                ExpressionStatement {
                    span: Span {
                        start: 0,
                        end: 0,
                    },
                    expression: ArrowFunctionExpression(
                        ArrowFunctionExpression {
                            span: Span {
                                start: 0,
                                end: 0,
                            },
                            type_parameters: None,
                            params: FormalParameters {
                                span: Span {
                                    start: 0,
                                    end: 0,
                                },
                                items: Vec(
                                    [],
                                ),
                                rest: None,
                                node_id: Cell {
                                    value: NodeId(0),
                                },
                                kind: ArrowFormalParameters,
                            },
                            return_type: None,
                            body: FunctionBody {
                                span: Span {
                                    start: 0,
                                    end: 0,
                                },
                                directives: Vec(
                                    [],
                                ),
                                statements: Vec(
                                    [
                                        ExpressionStatement(
                                            ExpressionStatement {
                                                span: Span {
                                                    start: 0,
                                                    end: 0,
                                                },
                                                expression: JSXFragment(
                                                    JSXFragment {
                                                        span: Span {
                                                            start: 0,
                                                            end: 0,
                                                        },
                                                        opening_fragment: JSXOpeningFragment {
                                                            span: Span {
                                                                start: 0,
                                                                end: 0,
                                                            },
                                                            node_id: Cell {
                                                                value: NodeId(0),
                                                            },
                                                        },
                                                        children: Vec(
                                                            [
                                                                Element(
                                                                    JSXElement {
                                                                        span: Span {
                                                                            start: 0,
                                                                            end: 145,
                                                                        },
                                                                        opening_element: JSXOpeningElement {
                                                                            span: Span {
                                                                                start: 0,
                                                                                end: 10,
                                                                            },
                                                                            name: Identifier(
                                                                                JSXIdentifier {
                                                                                    span: Span {
                                                                                        start: 1,
                                                                                        end: 9,
                                                                                    },
                                                                                    name: "template",
                                                                                    node_id: Cell {
                                                                                        value: NodeId(0),
                                                                                    },
                                                                                },
                                                                            ),
                                                                            type_arguments: None,
                                                                            attributes: Vec(
                                                                                [],
                                                                            ),
                                                                            node_id: Cell {
                                                                                value: NodeId(0),
                                                                            },
                                                                        },
                                                                        children: Vec(
                                                                            [
                                                                                Text(
                                                                                    JSXText {
                                                                                        span: Span {
                                                                                            start: 10,
                                                                                            end: 13,
                                                                                        },
                                                                                        value: "\n  ",
                                                                                        raw: Some(
                                                                                            "\n  ",
                                                                                        ),
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                Element(
                                                                                    JSXElement {
                                                                                        span: Span {
                                                                                            start: 13,
                                                                                            end: 30,
                                                                                        },
                                                                                        opening_element: JSXOpeningElement {
                                                                                            span: Span {
                                                                                                start: 13,
                                                                                                end: 30,
                                                                                            },
                                                                                            name: IdentifierReference(
                                                                                                IdentifierReference {
                                                                                                    span: Span {
                                                                                                        start: 14,
                                                                                                        end: 27,
                                                                                                    },
                                                                                                    name: "SomeComponent",
                                                                                                    node_id: Cell {
                                                                                                        value: NodeId(0),
                                                                                                    },
                                                                                                    reference_id: Cell {
                                                                                                        value: None,
                                                                                                    },
                                                                                                },
                                                                                            ),
                                                                                            type_arguments: None,
                                                                                            attributes: Vec(
                                                                                                [],
                                                                                            ),
                                                                                            node_id: Cell {
                                                                                                value: NodeId(0),
                                                                                            },
                                                                                        },
                                                                                        children: Vec(
                                                                                            [],
                                                                                        ),
                                                                                        closing_element: None,
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                Text(
                                                                                    JSXText {
                                                                                        span: Span {
                                                                                            start: 30,
                                                                                            end: 33,
                                                                                        },
                                                                                        value: "\n  ",
                                                                                        raw: Some(
                                                                                            "\n  ",
                                                                                        ),
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                Element(
                                                                                    JSXElement {
                                                                                        span: Span {
                                                                                            start: 33,
                                                                                            end: 51,
                                                                                        },
                                                                                        opening_element: JSXOpeningElement {
                                                                                            span: Span {
                                                                                                start: 33,
                                                                                                end: 51,
                                                                                            },
                                                                                            name: IdentifierReference(
                                                                                                IdentifierReference {
                                                                                                    span: Span {
                                                                                                        start: 34,
                                                                                                        end: 48,
                                                                                                    },
                                                                                                    name: "SomeComponent",
                                                                                                    node_id: Cell {
                                                                                                        value: NodeId(0),
                                                                                                    },
                                                                                                    reference_id: Cell {
                                                                                                        value: None,
                                                                                                    },
                                                                                                },
                                                                                            ),
                                                                                            type_arguments: None,
                                                                                            attributes: Vec(
                                                                                                [],
                                                                                            ),
                                                                                            node_id: Cell {
                                                                                                value: NodeId(0),
                                                                                            },
                                                                                        },
                                                                                        children: Vec(
                                                                                            [],
                                                                                        ),
                                                                                        closing_element: None,
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                Text(
                                                                                    JSXText {
                                                                                        span: Span {
                                                                                            start: 51,
                                                                                            end: 54,
                                                                                        },
                                                                                        value: "\n  ",
                                                                                        raw: Some(
                                                                                            "\n  ",
                                                                                        ),
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                Element(
                                                                                    JSXElement {
                                                                                        span: Span {
                                                                                            start: 54,
                                                                                            end: 79,
                                                                                        },
                                                                                        opening_element: JSXOpeningElement {
                                                                                            span: Span {
                                                                                                start: 54,
                                                                                                end: 66,
                                                                                            },
                                                                                            name: IdentifierReference(
                                                                                                IdentifierReference {
                                                                                                    span: Span {
                                                                                                        start: 55,
                                                                                                        end: 65,
                                                                                                    },
                                                                                                    name: "Transition",
                                                                                                    node_id: Cell {
                                                                                                        value: NodeId(0),
                                                                                                    },
                                                                                                    reference_id: Cell {
                                                                                                        value: None,
                                                                                                    },
                                                                                                },
                                                                                            ),
                                                                                            type_arguments: None,
                                                                                            attributes: Vec(
                                                                                                [],
                                                                                            ),
                                                                                            node_id: Cell {
                                                                                                value: NodeId(0),
                                                                                            },
                                                                                        },
                                                                                        children: Vec(
                                                                                            [],
                                                                                        ),
                                                                                        closing_element: Some(
                                                                                            JSXClosingElement {
                                                                                                span: Span {
                                                                                                    start: 66,
                                                                                                    end: 79,
                                                                                                },
                                                                                                name: IdentifierReference(
                                                                                                    IdentifierReference {
                                                                                                        span: Span {
                                                                                                            start: 68,
                                                                                                            end: 78,
                                                                                                        },
                                                                                                        name: "Transition",
                                                                                                        node_id: Cell {
                                                                                                            value: NodeId(0),
                                                                                                        },
                                                                                                        reference_id: Cell {
                                                                                                            value: None,
                                                                                                        },
                                                                                                    },
                                                                                                ),
                                                                                                node_id: Cell {
                                                                                                    value: NodeId(0),
                                                                                                },
                                                                                            },
                                                                                        ),
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                Text(
                                                                                    JSXText {
                                                                                        span: Span {
                                                                                            start: 79,
                                                                                            end: 82,
                                                                                        },
                                                                                        value: "\n  ",
                                                                                        raw: Some(
                                                                                            "\n  ",
                                                                                        ),
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                Element(
                                                                                    JSXElement {
                                                                                        span: Span {
                                                                                            start: 82,
                                                                                            end: 105,
                                                                                        },
                                                                                        opening_element: JSXOpeningElement {
                                                                                            span: Span {
                                                                                                start: 82,
                                                                                                end: 93,
                                                                                            },
                                                                                            name: IdentifierReference(
                                                                                                IdentifierReference {
                                                                                                    span: Span {
                                                                                                        start: 83,
                                                                                                        end: 92,
                                                                                                    },
                                                                                                    name: "component",
                                                                                                    node_id: Cell {
                                                                                                        value: NodeId(0),
                                                                                                    },
                                                                                                    reference_id: Cell {
                                                                                                        value: None,
                                                                                                    },
                                                                                                },
                                                                                            ),
                                                                                            type_arguments: None,
                                                                                            attributes: Vec(
                                                                                                [],
                                                                                            ),
                                                                                            node_id: Cell {
                                                                                                value: NodeId(0),
                                                                                            },
                                                                                        },
                                                                                        children: Vec(
                                                                                            [],
                                                                                        ),
                                                                                        closing_element: Some(
                                                                                            JSXClosingElement {
                                                                                                span: Span {
                                                                                                    start: 93,
                                                                                                    end: 105,
                                                                                                },
                                                                                                name: IdentifierReference(
                                                                                                    IdentifierReference {
                                                                                                        span: Span {
                                                                                                            start: 95,
                                                                                                            end: 104,
                                                                                                        },
                                                                                                        name: "component",
                                                                                                        node_id: Cell {
                                                                                                            value: NodeId(0),
                                                                                                        },
                                                                                                        reference_id: Cell {
                                                                                                            value: None,
                                                                                                        },
                                                                                                    },
                                                                                                ),
                                                                                                node_id: Cell {
                                                                                                    value: NodeId(0),
                                                                                                },
                                                                                            },
                                                                                        ),
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                Text(
                                                                                    JSXText {
                                                                                        span: Span {
                                                                                            start: 105,
                                                                                            end: 108,
                                                                                        },
                                                                                        value: "\n  ",
                                                                                        raw: Some(
                                                                                            "\n  ",
                                                                                        ),
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                Element(
                                                                                    JSXElement {
                                                                                        span: Span {
                                                                                            start: 108,
                                                                                            end: 133,
                                                                                        },
                                                                                        opening_element: JSXOpeningElement {
                                                                                            span: Span {
                                                                                                start: 108,
                                                                                                end: 120,
                                                                                            },
                                                                                            name: MemberExpression(
                                                                                                JSXMemberExpression {
                                                                                                    span: Span {
                                                                                                        start: 109,
                                                                                                        end: 119,
                                                                                                    },
                                                                                                    object: IdentifierReference(
                                                                                                        IdentifierReference {
                                                                                                            span: Span {
                                                                                                                start: 109,
                                                                                                                end: 115,
                                                                                                            },
                                                                                                            name: "motion",
                                                                                                            node_id: Cell {
                                                                                                                value: NodeId(0),
                                                                                                            },
                                                                                                            reference_id: Cell {
                                                                                                                value: None,
                                                                                                            },
                                                                                                        },
                                                                                                    ),
                                                                                                    property: JSXIdentifier {
                                                                                                        span: Span {
                                                                                                            start: 116,
                                                                                                            end: 119,
                                                                                                        },
                                                                                                        name: "div",
                                                                                                        node_id: Cell {
                                                                                                            value: NodeId(0),
                                                                                                        },
                                                                                                    },
                                                                                                    node_id: Cell {
                                                                                                        value: NodeId(0),
                                                                                                    },
                                                                                                },
                                                                                            ),
                                                                                            type_arguments: None,
                                                                                            attributes: Vec(
                                                                                                [],
                                                                                            ),
                                                                                            node_id: Cell {
                                                                                                value: NodeId(0),
                                                                                            },
                                                                                        },
                                                                                        children: Vec(
                                                                                            [],
                                                                                        ),
                                                                                        closing_element: Some(
                                                                                            JSXClosingElement {
                                                                                                span: Span {
                                                                                                    start: 120,
                                                                                                    end: 133,
                                                                                                },
                                                                                                name: MemberExpression(
                                                                                                    JSXMemberExpression {
                                                                                                        span: Span {
                                                                                                            start: 122,
                                                                                                            end: 132,
                                                                                                        },
                                                                                                        object: IdentifierReference(
                                                                                                            IdentifierReference {
                                                                                                                span: Span {
                                                                                                                    start: 109,
                                                                                                                    end: 115,
                                                                                                                },
                                                                                                                name: "motion",
                                                                                                                node_id: Cell {
                                                                                                                    value: NodeId(0),
                                                                                                                },
                                                                                                                reference_id: Cell {
                                                                                                                    value: None,
                                                                                                                },
                                                                                                            },
                                                                                                        ),
                                                                                                        property: JSXIdentifier {
                                                                                                            span: Span {
                                                                                                                start: 116,
                                                                                                                end: 119,
                                                                                                            },
                                                                                                            name: "div",
                                                                                                            node_id: Cell {
                                                                                                                value: NodeId(0),
                                                                                                            },
                                                                                                        },
                                                                                                        node_id: Cell {
                                                                                                            value: NodeId(0),
                                                                                                        },
                                                                                                    },
                                                                                                ),
                                                                                                node_id: Cell {
                                                                                                    value: NodeId(0),
                                                                                                },
                                                                                            },
                                                                                        ),
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                Text(
                                                                                    JSXText {
                                                                                        span: Span {
                                                                                            start: 133,
                                                                                            end: 134,
                                                                                        },
                                                                                        value: "\n",
                                                                                        raw: Some(
                                                                                            "\n",
                                                                                        ),
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                            ],
                                                                        ),
                                                                        closing_element: Some(
                                                                            JSXClosingElement {
                                                                                span: Span {
                                                                                    start: 134,
                                                                                    end: 145,
                                                                                },
                                                                                name: Identifier(
                                                                                    JSXIdentifier {
                                                                                        span: Span {
                                                                                            start: 136,
                                                                                            end: 144,
                                                                                        },
                                                                                        name: "template",
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                node_id: Cell {
                                                                                    value: NodeId(0),
                                                                                },
                                                                            },
                                                                        ),
                                                                        node_id: Cell {
                                                                            value: NodeId(0),
                                                                        },
                                                                    },
                                                                ),
                                                                Text(
                                                                    JSXText {
                                                                        span: Span {
                                                                            start: 145,
                                                                            end: 147,
                                                                        },
                                                                        value: "\n\n",
                                                                        raw: Some(
                                                                            "\n\n",
                                                                        ),
                                                                        node_id: Cell {
                                                                            value: NodeId(0),
                                                                        },
                                                                    },
                                                                ),
                                                                Element(
                                                                    JSXElement {
                                                                        span: Span {
                                                                            start: 147,
                                                                            end: 264,
                                                                        },
                                                                        opening_element: JSXOpeningElement {
                                                                            span: Span {
                                                                                start: 147,
                                                                                end: 171,
                                                                            },
                                                                            name: Identifier(
                                                                                JSXIdentifier {
                                                                                    span: Span {
                                                                                        start: 148,
                                                                                        end: 154,
                                                                                    },
                                                                                    name: "script",
                                                                                    node_id: Cell {
                                                                                        value: NodeId(0),
                                                                                    },
                                                                                },
                                                                            ),
                                                                            type_arguments: None,
                                                                            attributes: Vec(
                                                                                [
                                                                                    Attribute(
                                                                                        JSXAttribute {
                                                                                            span: Span {
                                                                                                start: 155,
                                                                                                end: 164,
                                                                                            },
                                                                                            name: Identifier(
                                                                                                JSXIdentifier {
                                                                                                    span: Span {
                                                                                                        start: 155,
                                                                                                        end: 159,
                                                                                                    },
                                                                                                    name: "lang",
                                                                                                    node_id: Cell {
                                                                                                        value: NodeId(0),
                                                                                                    },
                                                                                                },
                                                                                            ),
                                                                                            value: Some(
                                                                                                StringLiteral(
                                                                                                    StringLiteral {
                                                                                                        span: Span {
                                                                                                            start: 161,
                                                                                                            end: 163,
                                                                                                        },
                                                                                                        value: "ts",
                                                                                                        raw: None,
                                                                                                        node_id: Cell {
                                                                                                            value: NodeId(0),
                                                                                                        },
                                                                                                        lone_surrogates: false,
                                                                                                    },
                                                                                                ),
                                                                                            ),
                                                                                            node_id: Cell {
                                                                                                value: NodeId(0),
                                                                                            },
                                                                                        },
                                                                                    ),
                                                                                    Attribute(
                                                                                        JSXAttribute {
                                                                                            span: Span {
                                                                                                start: 165,
                                                                                                end: 170,
                                                                                            },
                                                                                            name: Identifier(
                                                                                                JSXIdentifier {
                                                                                                    span: Span {
                                                                                                        start: 165,
                                                                                                        end: 170,
                                                                                                    },
                                                                                                    name: "setup",
                                                                                                    node_id: Cell {
                                                                                                        value: NodeId(0),
                                                                                                    },
                                                                                                },
                                                                                            ),
                                                                                            value: None,
                                                                                            node_id: Cell {
                                                                                                value: NodeId(0),
                                                                                            },
                                                                                        },
                                                                                    ),
                                                                                ],
                                                                            ),
                                                                            node_id: Cell {
                                                                                value: NodeId(0),
                                                                            },
                                                                        },
                                                                        children: Vec(
                                                                            [],
                                                                        ),
                                                                        closing_element: Some(
                                                                            JSXClosingElement {
                                                                                span: Span {
                                                                                    start: 255,
                                                                                    end: 264,
                                                                                },
                                                                                name: Identifier(
                                                                                    JSXIdentifier {
                                                                                        span: Span {
                                                                                            start: 257,
                                                                                            end: 263,
                                                                                        },
                                                                                        name: "script",
                                                                                        node_id: Cell {
                                                                                            value: NodeId(0),
                                                                                        },
                                                                                    },
                                                                                ),
                                                                                node_id: Cell {
                                                                                    value: NodeId(0),
                                                                                },
                                                                            },
                                                                        ),
                                                                        node_id: Cell {
                                                                            value: NodeId(0),
                                                                        },
                                                                    },
                                                                ),
                                                                Text(
                                                                    JSXText {
                                                                        span: Span {
                                                                            start: 264,
                                                                            end: 265,
                                                                        },
                                                                        value: "\n",
                                                                        raw: Some(
                                                                            "\n",
                                                                        ),
                                                                        node_id: Cell {
                                                                            value: NodeId(0),
                                                                        },
                                                                    },
                                                                ),
                                                            ],
                                                        ),
                                                        closing_fragment: JSXClosingFragment {
                                                            span: Span {
                                                                start: 0,
                                                                end: 0,
                                                            },
                                                            node_id: Cell {
                                                                value: NodeId(0),
                                                            },
                                                        },
                                                        node_id: Cell {
                                                            value: NodeId(0),
                                                        },
                                                    },
                                                ),
                                                node_id: Cell {
                                                    value: NodeId(0),
                                                },
                                            },
                                        ),
                                    ],
                                ),
                                node_id: Cell {
                                    value: NodeId(0),
                                },
                            },
                            node_id: Cell {
                                value: NodeId(0),
                            },
                            scope_id: Cell {
                                value: None,
                            },
                            expression: false,
                            async: true,
                            pure: false,
                            pife: false,
                        },
                    ),
                    node_id: Cell {
                        value: NodeId(0),
                    },
                },
            ),
        ],
    ),
    node_id: Cell {
        value: NodeId(0),
    },
    scope_id: Cell {
        value: None,
    },
    source_type: SourceType {
        language: TypeScript,
        module_kind: Unambiguous,
        variant: Jsx,
        extension: Some(
            Ts,
        ),
    },
}

===============  Error  ===============
[]

=============== Codegen ===============
import SomeComponent from "./SomeComponent.vue";
import { motion } from "motion-v";
async () => {
	<><template>
  <SomeComponent />
  <SomeComponent />
  <Transition></Transition>
  <component></component>
  <motion.div></motion.div>
</template>

<script lang="ts" setup></script>
</>;
};


===============  Spans  ===============
Slice: "<template>\n  <SomeComponent />\n  <some-c..[OMIT]..rt { motion } from 'motion-v'\n</script>\n"; 
Span: (0, 265); 
Type: Program; 

Slice: "import SomeComponent from './SomeComponent.vue';"; 
Span: (172, 220); 
Type: ImportDeclaration; 

Slice: "SomeComponent"; 
Span: (179, 192); 
Type: ImportDefaultSpecifier; 

Slice: "SomeComponent"; 
Span: (179, 192); 
Type: BindingIdentifier; 

Slice: "'./SomeComponent.vue'"; 
Span: (198, 219); 
Type: StringLiteral; 

Slice: "import { motion } from 'motion-v'"; 
Span: (221, 254); 
Type: ImportDeclaration; 

Slice: "motion"; 
Span: (230, 236); 
Type: ImportSpecifier; 

Slice: "motion"; 
Span: (230, 236); 
Type: IdentifierName; 

Slice: "motion"; 
Span: (230, 236); 
Type: BindingIdentifier; 

Slice: "'motion-v'"; 
Span: (244, 254); 
Type: StringLiteral; 

Slice: "<template>\n  <SomeComponent />\n  <some-c..[OMIT]..\n  <motion.div></motion.div>\n</template>"; 
Span: (0, 145); 
Type: JSXElement; 

Slice: "<template>"; 
Span: (0, 10); 
Type: JSXOpeningElement; 

Slice: "template"; 
Span: (1, 9); 
Type: JSXIdentifier; 

Slice: "\n  "; 
Span: (10, 13); 
Type: JSXText; 

Slice: "<SomeComponent />"; 
Span: (13, 30); 
Type: JSXElement; 

Slice: "<SomeComponent />"; 
Span: (13, 30); 
Type: JSXOpeningElement; 

Slice: "SomeComponent"; 
Span: (14, 27); 
Type: IdentifierReference; 

Slice: "\n  "; 
Span: (30, 33); 
Type: JSXText; 

Slice: "<some-component />"; 
Span: (33, 51); 
Type: JSXElement; 

Slice: "<some-component />"; 
Span: (33, 51); 
Type: JSXOpeningElement; 

Slice: "some-component"; 
Span: (34, 48); 
Type: IdentifierReference; 

Slice: "\n  "; 
Span: (51, 54); 
Type: JSXText; 

Slice: "<Transition></Transition>"; 
Span: (54, 79); 
Type: JSXElement; 

Slice: "<Transition>"; 
Span: (54, 66); 
Type: JSXOpeningElement; 

Slice: "Transition"; 
Span: (55, 65); 
Type: IdentifierReference; 

Slice: "</Transition>"; 
Span: (66, 79); 
Type: JSXClosingElement; 

Slice: "Transition"; 
Span: (68, 78); 
Type: IdentifierReference; 

Slice: "\n  "; 
Span: (79, 82); 
Type: JSXText; 

Slice: "<component></component>"; 
Span: (82, 105); 
Type: JSXElement; 

Slice: "<component>"; 
Span: (82, 93); 
Type: JSXOpeningElement; 

Slice: "component"; 
Span: (83, 92); 
Type: IdentifierReference; 

Slice: "</component>"; 
Span: (93, 105); 
Type: JSXClosingElement; 

Slice: "component"; 
Span: (95, 104); 
Type: IdentifierReference; 

Slice: "\n  "; 
Span: (105, 108); 
Type: JSXText; 

Slice: "<motion.div></motion.div>"; 
Span: (108, 133); 
Type: JSXElement; 

Slice: "<motion.div>"; 
Span: (108, 120); 
Type: JSXOpeningElement; 

Slice: "motion.div"; 
Span: (109, 119); 
Type: JSXMemberExpression; 

Slice: "motion"; 
Span: (109, 115); 
Type: IdentifierReference; 

Slice: "div"; 
Span: (116, 119); 
Type: JSXIdentifier; 

Slice: "</motion.div>"; 
Span: (120, 133); 
Type: JSXClosingElement; 

Slice: "motion.div"; 
Span: (122, 132); 
Type: JSXMemberExpression; 

Slice: "motion"; 
Span: (109, 115); 
Type: IdentifierReference; 

Slice: "div"; 
Span: (116, 119); 
Type: JSXIdentifier; 

Slice: "\n"; 
Span: (133, 134); 
Type: JSXText; 

Slice: "</template>"; 
Span: (134, 145); 
Type: JSXClosingElement; 

Slice: "template"; 
Span: (136, 144); 
Type: JSXIdentifier; 

Slice: "\n\n"; 
Span: (145, 147); 
Type: JSXText; 

Slice: "<script lang=\"ts\" setup>\nimport SomeComp..[OMIT]..ort { motion } from 'motion-v'\n</script>"; 
Span: (147, 264); 
Type: JSXElement; 

Slice: "<script lang=\"ts\" setup>"; 
Span: (147, 171); 
Type: JSXOpeningElement; 

Slice: "script"; 
Span: (148, 154); 
Type: JSXIdentifier; 

Slice: "lang=\"ts\""; 
Span: (155, 164); 
Type: JSXAttribute; 

Slice: "lang"; 
Span: (155, 159); 
Type: JSXIdentifier; 

Slice: "ts"; 
Span: (161, 163); 
Type: StringLiteral; 

Slice: "setup"; 
Span: (165, 170); 
Type: JSXAttribute; 

Slice: "setup"; 
Span: (165, 170); 
Type: JSXIdentifier; 

Slice: "</script>"; 
Span: (255, 264); 
Type: JSXClosingElement; 

Slice: "script"; 
Span: (257, 263); 
Type: JSXIdentifier; 

Slice: "\n"; 
Span: (264, 265); 
Type: JSXText;