diff mercurial/fileset.py @ 25801:272ff3680bf3

parser: fill invalid infix and suffix actions by None This can simplify the expansion of (prefix, infix, suffix) actions.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 05 Jul 2015 11:17:22 +0900
parents f8f7ae0f4d98
children e71e5629e006
line wrap: on
line diff
--- a/mercurial/fileset.py	Sun Jul 05 11:06:58 2015 +0900
+++ b/mercurial/fileset.py	Sun Jul 05 11:17:22 2015 +0900
@@ -11,20 +11,20 @@
 
 elements = {
     # token-type: binding-strength, prefix, infix, suffix
-    "(": (20, ("group", 1, ")"), ("func", 1, ")")),
-    "-": (5, ("negate", 19), ("minus", 5)),
-    "not": (10, ("not", 10)),
-    "!": (10, ("not", 10)),
-    "and": (5, None, ("and", 5)),
-    "&": (5, None, ("and", 5)),
-    "or": (4, None, ("or", 4)),
-    "|": (4, None, ("or", 4)),
-    "+": (4, None, ("or", 4)),
-    ",": (2, None, ("list", 2)),
-    ")": (0, None, None),
-    "symbol": (0, ("symbol",), None),
-    "string": (0, ("string",), None),
-    "end": (0, None, None),
+    "(": (20, ("group", 1, ")"), ("func", 1, ")"), None),
+    "-": (5, ("negate", 19), ("minus", 5), None),
+    "not": (10, ("not", 10), None, None),
+    "!": (10, ("not", 10), None, None),
+    "and": (5, None, ("and", 5), None),
+    "&": (5, None, ("and", 5), None),
+    "or": (4, None, ("or", 4), None),
+    "|": (4, None, ("or", 4), None),
+    "+": (4, None, ("or", 4), None),
+    ",": (2, None, ("list", 2), None),
+    ")": (0, None, None, None),
+    "symbol": (0, ("symbol",), None, None),
+    "string": (0, ("string",), None, None),
+    "end": (0, None, None, None),
 }
 
 keywords = set(['and', 'or', 'not'])