Explorar o código

Avoid duplicated matches by calling only OP_NEG handlers.

Sander Mathijs van Veen %!s(int64=14) %!d(string=hai) anos
pai
achega
e115283e5a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/parser.py

+ 1 - 1
src/parser.py

@@ -199,7 +199,7 @@ class Parser(BisonParser):
             handlers = []
 
         if retval.negated:
-            handlers = handlers[:] + RULES[OP_NEG]
+            handlers = RULES[OP_NEG]
 
         for handler in handlers:
             possibilities = handler(retval)