diff mercurial/templater.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/templater.py	Sun Jul 05 11:06:58 2015 +0900
+++ b/mercurial/templater.py	Sun Jul 05 11:17:22 2015 +0900
@@ -16,16 +16,16 @@
 
 elements = {
     # token-type: binding-strength, prefix, infix, suffix
-    "(": (20, ("group", 1, ")"), ("func", 1, ")")),
-    ",": (2, None, ("list", 2)),
-    "|": (5, None, ("|", 5)),
-    "%": (6, None, ("%", 6)),
-    ")": (0, None, None),
-    "integer": (0, ("integer",), None),
-    "symbol": (0, ("symbol",), None),
-    "string": (0, ("string",), None),
-    "template": (0, ("template",), None),
-    "end": (0, None, None),
+    "(": (20, ("group", 1, ")"), ("func", 1, ")"), None),
+    ",": (2, None, ("list", 2), None),
+    "|": (5, None, ("|", 5), None),
+    "%": (6, None, ("%", 6), None),
+    ")": (0, None, None, None),
+    "integer": (0, ("integer",), None, None),
+    "symbol": (0, ("symbol",), None, None),
+    "string": (0, ("string",), None, None),
+    "template": (0, ("template",), None, None),
+    "end": (0, None, None, None),
 }
 
 def tokenize(program, start, end):