projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71eb744
)
minor code cleanup in parser
author
Stefan Behnel
<stefan_ml@behnel.de>
Thu, 28 Jun 2012 09:29:20 +0000
(11:29 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Thu, 28 Jun 2012 09:29:20 +0000
(11:29 +0200)
Cython/Compiler/Parsing.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Parsing.py
b/Cython/Compiler/Parsing.py
index
8f76f62
..
1b191c6
100644
(file)
--- a/
Cython/Compiler/Parsing.py
+++ b/
Cython/Compiler/Parsing.py
@@
-2354,11
+2354,11
@@
def p_c_simple_declarator(s, ctx, empty, is_type, cmethod_flag,
elif op == '[':
s.expect(']')
op = '[]'
-
if op in ['-', '+', '|', '&']
and s.sy == op:
- op
= op*2
+
elif op in ('-', '+', '|', '&')
and s.sy == op:
+ op
*= 2 # ++, --, ...
s.next()
- if s.sy == '=':
- op += s.sy
+
el
if s.sy == '=':
+ op += s.sy
# +=, -=, ...
s.next()
if op not in supported_overloaded_operators:
s.error("Overloading operator '%s' not yet supported." % op)