Commit 391a336b authored by Stefan Behnel's avatar Stefan Behnel

minor code cleanup in parser

parent 71eb744a
......@@ -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
elif s.sy == '=':
op += s.sy # +=, -=, ...
s.next()
if op not in supported_overloaded_operators:
s.error("Overloading operator '%s' not yet supported." % op)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment