Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
d7ffd39b
Commit
d7ffd39b
authored
Nov 05, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slightly more telling error message on generic syntax errors
parent
17f53ec1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
Cython/Compiler/Scanning.py
Cython/Compiler/Scanning.py
+5
-1
tests/errors/cdef_syntax.pyx
tests/errors/cdef_syntax.pyx
+1
-1
tests/errors/cpdef_syntax.pyx
tests/errors/cpdef_syntax.pyx
+1
-1
tests/errors/e2_packedstruct_T290.pyx
tests/errors/e2_packedstruct_T290.pyx
+1
-1
No files found.
Cython/Compiler/Scanning.py
View file @
d7ffd39b
...
...
@@ -419,7 +419,11 @@ class PyrexScanner(Scanner):
if
message
:
self
.
error
(
message
)
else
:
self
.
error
(
"Expected '%s'"
%
what
)
if
self
.
sy
==
IDENT
:
found
=
self
.
systring
else
:
found
=
self
.
sy
self
.
error
(
"Expected '%s', found '%s'"
%
(
what
,
found
))
def
expect_indent
(
self
):
self
.
expect
(
'INDENT'
,
...
...
tests/errors/cdef_syntax.pyx
View file @
d7ffd39b
...
...
@@ -6,5 +6,5 @@ cdef nogil class test: pass
_ERRORS
=
u"""
2: 5: Expected an identifier, found 'pass'
3: 9: Empty declarator
4:11: Expected ':'
4:11: Expected ':'
, found 'class'
"""
tests/errors/cpdef_syntax.pyx
View file @
d7ffd39b
...
...
@@ -5,5 +5,5 @@ cpdef nogil class test: pass
_ERRORS
=
u"""
2: 6: cdef blocks cannot be declared cpdef
3: 6: cdef blocks cannot be declared cpdef
3:12: Expected ':'
3:12: Expected ':'
, found 'class'
"""
tests/errors/e2_packedstruct_T290.pyx
View file @
d7ffd39b
...
...
@@ -2,5 +2,5 @@ cdef packed foo:
pass
_ERRORS
=
u"""
1:12: Expected 'struct'
1:12: Expected 'struct'
, found 'foo'
"""
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