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
2bc546f0
Commit
2bc546f0
authored
May 20, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cppclass not a keyword
parent
e87022ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+3
-4
No files found.
Cython/Compiler/Parsing.py
View file @
2bc546f0
...
@@ -2093,11 +2093,10 @@ def p_cdef_statement(s, ctx):
...
@@ -2093,11 +2093,10 @@ def p_cdef_statement(s, ctx):
if
ctx
.
overridable
:
if
ctx
.
overridable
:
error
(
pos
,
"Extension types cannot be declared cpdef"
)
error
(
pos
,
"Extension types cannot be declared cpdef"
)
return
p_c_class_definition
(
s
,
pos
,
ctx
)
return
p_c_class_definition
(
s
,
pos
,
ctx
)
elif
s
.
sy
==
'cppclass'
:
elif
s
.
sy
==
'IDENT'
and
s
.
systring
==
'cppclass'
:
if
ctx
.
visibility
==
'extern'
:
if
ctx
.
visibility
!=
'extern'
:
return
p_cpp_class_definition
(
s
,
pos
,
ctx
)
else
:
error
(
pos
,
"C++ classes need to be declared extern"
)
error
(
pos
,
"C++ classes need to be declared extern"
)
return
p_cpp_class_definition
(
s
,
pos
,
ctx
)
elif
s
.
sy
==
'IDENT'
and
s
.
systring
in
(
"struct"
,
"union"
,
"enum"
,
"packed"
):
elif
s
.
sy
==
'IDENT'
and
s
.
systring
in
(
"struct"
,
"union"
,
"enum"
,
"packed"
):
if
ctx
.
level
not
in
(
'module'
,
'module_pxd'
):
if
ctx
.
level
not
in
(
'module'
,
'module_pxd'
):
error
(
pos
,
"C struct/union/enum definition not allowed here"
)
error
(
pos
,
"C struct/union/enum definition not allowed here"
)
...
...
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