Commit 0a375513 authored by Stefan Behnel's avatar Stefan Behnel

clean up regular expression in parser (not problematic as it only matches what...

clean up regular expression in parser (not problematic as it only matches what the scanner already accepted)
parent 676fc5f0
...@@ -1132,7 +1132,7 @@ def p_expression_or_assignment(s): ...@@ -1132,7 +1132,7 @@ def p_expression_or_assignment(s):
expr = p_testlist_star_expr(s) expr = p_testlist_star_expr(s)
expr_list.append(expr) expr_list.append(expr)
if len(expr_list) == 1: if len(expr_list) == 1:
if re.match(r"([+*/\%^\&|-]|<<|>>|\*\*|//|@)=", s.sy): if re.match(r"([-+*/%^&|]|<<|>>|\*\*|//|@)=", s.sy):
lhs = expr_list[0] lhs = expr_list[0]
if isinstance(lhs, ExprNodes.SliceIndexNode): if isinstance(lhs, ExprNodes.SliceIndexNode):
# implementation requires IndexNode # implementation requires IndexNode
......
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