Commit 08de2ba
authored
Add QuotePattern AST (#17935)
We add the definition of the `QuotePattern` AST. In this first step,
keep the typing of quote patterns untouched and decode the resulting
`unapply` into a `QuotePattern`. This AST is used to perform all
transformations until the `staging` phase, here it is encoded into an
`unapply` and a `Quote` AST. We also encode the AST into an `unapply`
when we pickle the tree to keep the same pickled representation as
before.
Based on #17956File tree
25 files changed
+510
-66
lines changed- compiler/src
- dotty/tools/dotc
- ast
- core
- tasty
- printing
- quoted
- staging
- transform
- patmat
- typer
- scala/quoted/runtime/impl
- tests
- neg-custom-args/fatal-warnings
- neg-macros
- pos-macros
- run-macros/quote-match-more-that-22-splices
25 files changed
+510
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
| 810 | + | |
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
| 814 | + | |
814 | 815 | | |
815 | 816 | | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
816 | 823 | | |
817 | 824 | | |
818 | 825 | | |
| |||
1048 | 1055 | | |
1049 | 1056 | | |
1050 | 1057 | | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1051 | 1073 | | |
1052 | 1074 | | |
1053 | 1075 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
689 | | - | |
690 | | - | |
691 | | - | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
| |||
704 | 704 | | |
705 | 705 | | |
706 | 706 | | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | 707 | | |
714 | 708 | | |
715 | 709 | | |
| |||
737 | 731 | | |
738 | 732 | | |
739 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
740 | 751 | | |
741 | 752 | | |
742 | 753 | | |
743 | 754 | | |
744 | 755 | | |
745 | 756 | | |
746 | | - | |
| 757 | + | |
747 | 758 | | |
748 | 759 | | |
749 | 760 | | |
| |||
1163 | 1174 | | |
1164 | 1175 | | |
1165 | 1176 | | |
| 1177 | + | |
1166 | 1178 | | |
1167 | 1179 | | |
1168 | 1180 | | |
| |||
1341 | 1353 | | |
1342 | 1354 | | |
1343 | 1355 | | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
1344 | 1360 | | |
1345 | 1361 | | |
1346 | 1362 | | |
| |||
1586 | 1602 | | |
1587 | 1603 | | |
1588 | 1604 | | |
| 1605 | + | |
| 1606 | + | |
1589 | 1607 | | |
1590 | 1608 | | |
1591 | 1609 | | |
| |||
1733 | 1751 | | |
1734 | 1752 | | |
1735 | 1753 | | |
| 1754 | + | |
| 1755 | + | |
1736 | 1756 | | |
1737 | 1757 | | |
1738 | 1758 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
409 | 410 | | |
410 | 411 | | |
411 | 412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
856 | | - | |
| 856 | + | |
857 | 857 | | |
858 | | - | |
| 858 | + | |
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
| |||
942 | 942 | | |
943 | 943 | | |
944 | 944 | | |
| 945 | + | |
945 | 946 | | |
946 | 947 | | |
947 | 948 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
685 | 686 | | |
686 | 687 | | |
687 | 688 | | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
688 | 692 | | |
689 | 693 | | |
690 | 694 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
1419 | 1420 | | |
1420 | 1421 | | |
1421 | 1422 | | |
1422 | | - | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
1423 | 1428 | | |
1424 | 1429 | | |
1425 | 1430 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
737 | | - | |
| 737 | + | |
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
744 | 752 | | |
745 | 753 | | |
746 | 754 | | |
| |||
0 commit comments