Commit fd2e0aa
Implement Py38 named expression (PEP 572) (RustPython#1934)
* Initial implementation of named expression and import according CPython tests
* added new instruction with inversed evaluation order for dict comprehension, in other cases use regular evaluation order
* added further aspects to implementation, cleaned up, imported test from CPython
* implemented first parts of scoping enhancement and extended checks
* completion of name resolution ongoing, now more test passing, still warinings and cleanup required
* further optimization of name resolution in nested scopes
* Initialize the vm with imports from _io instead of io
* Add the OpenBSD support that I am smart enough to
* adapted grammer to full support, most test are passing now, esp. all invalids are passed. Cleaned up in symboltable
* more conditional compiling, this time for errors
* rustfmt was not pleased
* premature push, whoops
* Add expected_failure result type to jsontests
* Initial implementation of named expression and import according CPython tests
* added new instruction with inversed evaluation order for dict comprehension, in other cases use regular evaluation order
* added further aspects to implementation, cleaned up, imported test from CPython
* implemented first parts of scoping enhancement and extended checks
* completion of name resolution ongoing, now more test passing, still warinings and cleanup required
* further optimization of name resolution in nested scopes
* adapted grammer to full support, most test are passing now, esp. all invalids are passed. Cleaned up in symboltable
* Fixed nameing convention violation and removed unnecessary information from symbol resolution. Added some more comments.
* Fixed nameing convention violation and removed unnecessary information from symbol resolution. Added some more comments.
Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
Co-authored-by: Reuben Staley <lighthousemaniac@gmail.com>1 parent 3a524d3 commit fd2e0aa
File tree
10 files changed
+820
-59
lines changed- Lib/test
- bytecode/src
- compiler/src
- parser/src
- vm/src
- stdlib
10 files changed
+820
-59
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
| |||
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
299 | 307 | | |
300 | 308 | | |
301 | 309 | | |
| |||
586 | 594 | | |
587 | 595 | | |
588 | 596 | | |
589 | | - | |
| 597 | + | |
590 | 598 | | |
591 | 599 | | |
592 | 600 | | |
| |||
597 | 605 | | |
598 | 606 | | |
599 | 607 | | |
| 608 | + | |
600 | 609 | | |
601 | 610 | | |
602 | 611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1804 | 1804 | | |
1805 | 1805 | | |
1806 | 1806 | | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
1807 | 1813 | | |
1808 | 1814 | | |
1809 | 1815 | | |
| |||
2066 | 2072 | | |
2067 | 2073 | | |
2068 | 2074 | | |
2069 | | - | |
| 2075 | + | |
2070 | 2076 | | |
| 2077 | + | |
2071 | 2078 | | |
2072 | | - | |
| 2079 | + | |
2073 | 2080 | | |
2074 | 2081 | | |
2075 | 2082 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| |||
111 | 117 | | |
112 | 118 | | |
113 | 119 | | |
| 120 | + | |
114 | 121 | | |
115 | 122 | | |
116 | 123 | | |
| |||
193 | 200 | | |
194 | 201 | | |
195 | 202 | | |
196 | | - | |
| 203 | + | |
197 | 204 | | |
198 | 205 | | |
199 | 206 | | |
200 | | - | |
| 207 | + | |
201 | 208 | | |
202 | | - | |
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
216 | 235 | | |
217 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
218 | 240 | | |
219 | 241 | | |
220 | 242 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
229 | 253 | | |
230 | 254 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
236 | 279 | | |
237 | | - | |
238 | | - | |
| 280 | + | |
| 281 | + | |
239 | 282 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 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 | + | |
249 | 309 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
259 | 317 | | |
260 | 318 | | |
261 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
262 | 335 | | |
263 | 336 | | |
264 | 337 | | |
| |||
271 | 344 | | |
272 | 345 | | |
273 | 346 | | |
| 347 | + | |
274 | 348 | | |
275 | 349 | | |
276 | 350 | | |
| |||
602 | 676 | | |
603 | 677 | | |
604 | 678 | | |
605 | | - | |
| 679 | + | |
606 | 680 | | |
607 | 681 | | |
608 | 682 | | |
| |||
679 | 753 | | |
680 | 754 | | |
681 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
682 | 778 | | |
683 | 779 | | |
684 | 780 | | |
| |||
810 | 906 | | |
811 | 907 | | |
812 | 908 | | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
813 | 913 | | |
814 | 914 | | |
815 | 915 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
312 | 318 | | |
313 | 319 | | |
314 | 320 | | |
| |||
364 | 370 | | |
365 | 371 | | |
366 | 372 | | |
| 373 | + | |
367 | 374 | | |
368 | 375 | | |
369 | 376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1075 | 1075 | | |
1076 | 1076 | | |
1077 | 1077 | | |
1078 | | - | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
1079 | 1088 | | |
1080 | 1089 | | |
1081 | 1090 | | |
| |||
0 commit comments