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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
d6e63ab1
Commit
d6e63ab1
authored
May 25, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some error reportings in parser
parent
3173319b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+3
-3
No files found.
Cython/Compiler/Parsing.py
View file @
d6e63ab1
...
...
@@ -1546,7 +1546,7 @@ def p_statement(s, ctx, first_statement = 0):
return
node
else
:
if
ctx
.
api
:
error
(
s
.
pos
,
"'api' not allowed with this statement"
)
s
.
error
(
"'api' not allowed with this statement"
)
elif
s
.
sy
==
'def'
:
if
ctx
.
level
not
in
(
'module'
,
'class'
,
'c_class'
,
'c_class_pxd'
,
'property'
):
s
.
error
(
'def statement not allowed here'
)
...
...
@@ -1607,7 +1607,7 @@ def p_suite(s, ctx = Ctx(), with_doc = 0, with_pseudo_doc = 0):
s
.
expect_dedent
()
else
:
if
ctx
.
api
:
error
(
s
.
pos
,
"'api' not allowed with this statement"
)
s
.
error
(
"'api' not allowed with this statement"
)
if
ctx
.
level
in
(
'module'
,
'class'
,
'function'
,
'other'
):
body
=
p_simple_statement_list
(
s
,
ctx
)
else
:
...
...
@@ -2324,7 +2324,7 @@ def p_c_func_or_var_declaration(s, pos, ctx):
overridable
=
ctx
.
overridable
)
else
:
#if api:
#
error(s.pos,
"'api' not allowed with variable declaration")
#
s.error(
"'api' not allowed with variable declaration")
declarators
=
[
declarator
]
while
s
.
sy
==
','
:
s
.
next
()
...
...
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