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
Boxiang Sun
cython
Commits
c64a5e85
Commit
c64a5e85
authored
Oct 03, 2013
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alternative syntax for c array declarators.
parent
9e3a2d7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+12
-2
No files found.
Cython/Compiler/Parsing.py
View file @
c64a5e85
...
...
@@ -2031,8 +2031,14 @@ def p_c_complex_base_type(s):
base_type
=
p_c_base_type
(
s
)
declarator
=
p_c_declarator
(
s
,
empty
=
1
)
s
.
expect
(
')'
)
return
Nodes
.
CComplexBaseTypeNode
(
pos
,
base_type
=
base_type
,
declarator
=
declarator
)
complex_type
=
Nodes
.
CComplexBaseTypeNode
(
pos
,
base_type
=
base_type
,
declarator
=
declarator
)
while
s
.
sy
==
'['
:
declarator
=
p_c_declarator
(
s
,
empty
=
1
)
complex_type
=
Nodes
.
CComplexBaseTypeNode
(
pos
,
base_type
=
complex_type
,
declarator
=
declarator
)
return
complex_type
def
p_c_simple_base_type
(
s
,
self_flag
,
nonempty
,
templates
=
None
):
#print "p_c_simple_base_type: self_flag =", self_flag, nonempty
...
...
@@ -2104,6 +2110,10 @@ def p_c_simple_base_type(s, self_flag, nonempty, templates = None):
type_node
=
p_memoryviewslice_access
(
s
,
type_node
)
else
:
type_node
=
p_buffer_or_template
(
s
,
type_node
,
templates
)
while
s
.
sy
==
'['
:
declarator
=
p_c_declarator
(
s
,
empty
=
1
)
type_node
=
Nodes
.
CComplexBaseTypeNode
(
pos
,
base_type
=
type_node
,
declarator
=
declarator
)
if
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