Commit c225440
committed
fixed-typed-throws-after-arrow-fixit
- `Parser.parseMisplacedEffectSpecifiers` will detect whether there is any misplaced typed throws. If yes, it will try to parse the thrown type and mark all tokens of the thrown type as missing.
- `ParseDiagnosticsGenerator.handleMisplacedEffectSpecifiersAfterArrow` will recognize the entire throws clause as correct instead of the throws specifier only.
- `ParseDiagnosticsGenerator.exchangeNodes` to replace `ParseDiagnosticsGenerator.exchangeTokens`, relaxing the input type from token to any syntax node.
- refactored `TokenMissingMaker` in Declaration.swift, moved to Parser.swift, creating `Parser.withAllTokensMarkedMissing` for more generalized use.1 parent 70e3741 commit c225440
File tree
5 files changed
+215
-86
lines changed- Sources
- SwiftParserDiagnostics
- SwiftParser
- Tests/SwiftParserTest
5 files changed
+215
-86
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
| 1284 | + | |
1295 | 1285 | | |
1296 | 1286 | | |
1297 | 1287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
829 | 847 | | |
830 | 848 | | |
831 | 849 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
775 | | - | |
776 | | - | |
| 775 | + | |
| 776 | + | |
777 | 777 | | |
| 778 | + | |
778 | 779 | | |
779 | 780 | | |
780 | 781 | | |
781 | 782 | | |
782 | 783 | | |
783 | 784 | | |
784 | | - | |
| 785 | + | |
785 | 786 | | |
786 | 787 | | |
787 | 788 | | |
| |||
794 | 795 | | |
795 | 796 | | |
796 | 797 | | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
| 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 | + | |
803 | 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 | + | |
804 | 868 | | |
805 | 869 | | |
806 | 870 | | |
807 | 871 | | |
808 | 872 | | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
| 873 | + | |
814 | 874 | | |
815 | 875 | | |
816 | 876 | | |
| |||
0 commit comments