Commit a9120e6
committed
Improve grammar and fix parser bugs
Ports many of the fixes previously introduced in
apple#8
1. Add support for else body in when generator
2. Remove legacy syntax in for and when generators
3. Add support for shebang comments
4. Add field names to various nodes throughout the grammar
5. Add missing "module" type1 parent d6b3087 commit a9120e6
File tree
9 files changed
+35397
-43748
lines changed- queries
- src
- test/corpus
- basic
- object
9 files changed
+35397
-43748
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
| |||
251 | 258 | | |
252 | 259 | | |
253 | 260 | | |
254 | | - | |
| 261 | + | |
255 | 262 | | |
256 | 263 | | |
257 | | - | |
| 264 | + | |
258 | 265 | | |
259 | 266 | | |
260 | 267 | | |
| |||
263 | 270 | | |
264 | 271 | | |
265 | 272 | | |
266 | | - | |
| 273 | + | |
267 | 274 | | |
268 | 275 | | |
269 | | - | |
| 276 | + | |
270 | 277 | | |
271 | 278 | | |
272 | 279 | | |
| |||
282 | 289 | | |
283 | 290 | | |
284 | 291 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
| 292 | + | |
289 | 293 | | |
290 | 294 | | |
291 | 295 | | |
292 | 296 | | |
293 | 297 | | |
294 | | - | |
| 298 | + | |
295 | 299 | | |
296 | | - | |
297 | | - | |
298 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
299 | 306 | | |
300 | 307 | | |
301 | 308 | | |
| |||
317 | 324 | | |
318 | 325 | | |
319 | 326 | | |
| 327 | + | |
320 | 328 | | |
321 | 329 | | |
322 | 330 | | |
| |||
697 | 705 | | |
698 | 706 | | |
699 | 707 | | |
700 | | - | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
701 | 718 | | |
702 | 719 | | |
703 | 720 | | |
704 | | - | |
| 721 | + | |
705 | 722 | | |
706 | 723 | | |
707 | 724 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | | - | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
8 | 20 | | |
9 | 21 | | |
10 | 22 | | |
| |||
42 | 54 | | |
43 | 55 | | |
44 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
45 | 70 | | |
46 | 71 | | |
47 | 72 | | |
| |||
774 | 799 | | |
775 | 800 | | |
776 | 801 | | |
777 | | - | |
778 | | - | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
779 | 808 | | |
780 | 809 | | |
781 | 810 | | |
| |||
792 | 821 | | |
793 | 822 | | |
794 | 823 | | |
795 | | - | |
796 | | - | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
797 | 830 | | |
798 | 831 | | |
799 | 832 | | |
| |||
829 | 862 | | |
830 | 863 | | |
831 | 864 | | |
832 | | - | |
833 | | - | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
834 | 871 | | |
835 | 872 | | |
836 | 873 | | |
| |||
847 | 884 | | |
848 | 885 | | |
849 | 886 | | |
850 | | - | |
851 | | - | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
852 | 893 | | |
853 | 894 | | |
854 | 895 | | |
| |||
912 | 953 | | |
913 | 954 | | |
914 | 955 | | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
| 956 | + | |
| 957 | + | |
926 | 958 | | |
927 | 959 | | |
928 | 960 | | |
| |||
938 | 970 | | |
939 | 971 | | |
940 | 972 | | |
941 | | - | |
942 | | - | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
943 | 979 | | |
944 | 980 | | |
945 | 981 | | |
946 | 982 | | |
947 | 983 | | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
948 | 992 | | |
949 | 993 | | |
950 | 994 | | |
951 | 995 | | |
952 | | - | |
953 | | - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
954 | 1011 | | |
955 | 1012 | | |
956 | | - | |
957 | | - | |
| 1013 | + | |
958 | 1014 | | |
959 | 1015 | | |
960 | 1016 | | |
| |||
1040 | 1096 | | |
1041 | 1097 | | |
1042 | 1098 | | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
1043 | 1103 | | |
1044 | 1104 | | |
1045 | 1105 | | |
| |||
3092 | 3152 | | |
3093 | 3153 | | |
3094 | 3154 | | |
3095 | | - | |
3096 | | - | |
3097 | | - | |
3098 | | - | |
3099 | | - | |
3100 | | - | |
3101 | | - | |
3102 | | - | |
3103 | | - | |
3104 | | - | |
3105 | | - | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
3106 | 3170 | | |
3107 | 3171 | | |
3108 | 3172 | | |
| |||
3173 | 3237 | | |
3174 | 3238 | | |
3175 | 3239 | | |
3176 | | - | |
3177 | | - | |
3178 | | - | |
3179 | | - | |
3180 | | - | |
3181 | | - | |
3182 | | - | |
3183 | | - | |
3184 | | - | |
3185 | | - | |
3186 | | - | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
3187 | 3255 | | |
3188 | 3256 | | |
3189 | 3257 | | |
| |||
4070 | 4138 | | |
4071 | 4139 | | |
4072 | 4140 | | |
| 4141 | + | |
| 4142 | + | |
| 4143 | + | |
| 4144 | + | |
4073 | 4145 | | |
4074 | 4146 | | |
4075 | 4147 | | |
| |||
0 commit comments