Przeglądaj źródła

Avoid duplicated matches by calling only OP_NEG handlers.

Sander Mathijs van Veen 14 lat temu
rodzic
commit
e115283e5a
1 zmienionych plików z 1 dodań i 1 usunięć
  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)