Commit 55c8923
The error message, generated for a non-parenthesized generator expression
in function calls, was still the generic `invalid syntax`, when the generator expression wasn't appearing as the first argument in the call. With this patch, even on input like `f(a, b, c for c in d, e)`, the correct error message gets produced.
(cherry picked from commit ae14583)
Co-authored-by: Lysandros Nikolaou <[email protected]>
1 parent b4d08f1 commit 55c8923
File tree
5 files changed
+79
-6
lines changed- Grammar
- Lib/test
- Parser/pegen
5 files changed
+79
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
630 | 633 | | |
631 | 634 | | |
632 | 635 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
224 | 222 | | |
225 | 223 | | |
226 | 224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11670 | 11670 | | |
11671 | 11671 | | |
11672 | 11672 | | |
| 11673 | + | |
| 11674 | + | |
11673 | 11675 | | |
11674 | 11676 | | |
11675 | 11677 | | |
| |||
11731 | 11733 | | |
11732 | 11734 | | |
11733 | 11735 | | |
| 11736 | + | |
| 11737 | + | |
| 11738 | + | |
| 11739 | + | |
| 11740 | + | |
| 11741 | + | |
| 11742 | + | |
| 11743 | + | |
| 11744 | + | |
| 11745 | + | |
| 11746 | + | |
| 11747 | + | |
| 11748 | + | |
| 11749 | + | |
| 11750 | + | |
| 11751 | + | |
| 11752 | + | |
| 11753 | + | |
| 11754 | + | |
| 11755 | + | |
| 11756 | + | |
| 11757 | + | |
| 11758 | + | |
| 11759 | + | |
| 11760 | + | |
| 11761 | + | |
| 11762 | + | |
| 11763 | + | |
| 11764 | + | |
| 11765 | + | |
| 11766 | + | |
| 11767 | + | |
| 11768 | + | |
| 11769 | + | |
| 11770 | + | |
| 11771 | + | |
| 11772 | + | |
| 11773 | + | |
| 11774 | + | |
| 11775 | + | |
| 11776 | + | |
| 11777 | + | |
| 11778 | + | |
| 11779 | + | |
| 11780 | + | |
| 11781 | + | |
| 11782 | + | |
| 11783 | + | |
11734 | 11784 | | |
11735 | 11785 | | |
11736 | 11786 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2100 | 2100 | | |
2101 | 2101 | | |
2102 | 2102 | | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| 265 | + | |
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
| |||
0 commit comments