Commit 113e2b0
authored
bpo-40985: Show correct SyntaxError text when last line has a LINECONT (pythonGH-20888)
When a file ends with a line that contains a line continuation character
the text of the emitted SyntaxError is empty, contrary to the old
parser, where the error text contained the text of the last line.1 parent 8666356 commit 113e2b0
File tree
3 files changed
+13
-4
lines changed- Lib/test
- Misc/NEWS.d/next/Core and Builtins
- Python
3 files changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1646 | 1646 | | |
1647 | 1647 | | |
1648 | 1648 | | |
1649 | | - | |
1650 | | - | |
| 1649 | + | |
1651 | 1650 | | |
| 1651 | + | |
| 1652 | + | |
1652 | 1653 | | |
1653 | 1654 | | |
1654 | 1655 | | |
1655 | 1656 | | |
1656 | 1657 | | |
1657 | | - | |
1658 | | - | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
1659 | 1661 | | |
1660 | 1662 | | |
1661 | 1663 | | |
1662 | 1664 | | |
1663 | 1665 | | |
1664 | 1666 | | |
1665 | 1667 | | |
| 1668 | + | |
| 1669 | + | |
1666 | 1670 | | |
1667 | 1671 | | |
1668 | 1672 | | |
| |||
0 commit comments