Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3a6bf457
Commit
3a6bf457
authored
Mar 03, 2005
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #802188: better parser error message for non-EOL following line cont.
parent
2f015f0a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
1 deletion
+8
-1
Include/errcode.h
Include/errcode.h
+1
-0
Misc/NEWS
Misc/NEWS
+3
-0
Parser/tokenizer.c
Parser/tokenizer.c
+1
-1
Python/pythonrun.c
Python/pythonrun.c
+3
-0
No files found.
Include/errcode.h
View file @
3a6bf457
...
...
@@ -28,6 +28,7 @@ extern "C" {
#define E_DECODE 22
/* Error in decoding into Unicode */
#define E_EOFS 23
/* EOF in triple-quoted string */
#define E_EOLS 24
/* EOL in single-quoted string */
#define E_LINECONT 25
/* Unexpected characters after a line continuation */
#ifdef __cplusplus
}
...
...
Misc/NEWS
View file @
3a6bf457
...
...
@@ -10,6 +10,9 @@ What's New in Python 2.5 alpha 1?
Core and builtins
-----------------
- Patch #802188: Report characters after line continuation character
('
\
') with a specific error message.
- Bug #723201: Raise a TypeError for passing bad objects to '
L
' format.
- Bug #1124295: the __name__ attribute of file objects was
...
...
Parser/tokenizer.c
View file @
3a6bf457
...
...
@@ -1413,7 +1413,7 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end)
if
(
c
==
'\\'
)
{
c
=
tok_nextc
(
tok
);
if
(
c
!=
'\n'
)
{
tok
->
done
=
E_
TOKEN
;
tok
->
done
=
E_
LINECONT
;
tok
->
cur
=
tok
->
inp
;
return
ERRORTOKEN
;
}
...
...
Python/pythonrun.c
View file @
3a6bf457
...
...
@@ -1484,6 +1484,9 @@ err_input(perrdetail *err)
msg
=
"unknown decode error"
;
break
;
}
case
E_LINECONT
:
msg
=
"unexpected character after line continuation character"
;
break
;
default:
fprintf
(
stderr
,
"error=%d
\n
"
,
err
->
error
);
msg
=
"unknown parsing error"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment