templater: sort token table by binding strength
authorYuya Nishihara <yuya@tcha.org>
Mon, 03 Apr 2017 20:37:25 +0900
changeset 31883 25be03a33f50
parent 31882 ba5b74f780d5
child 31884 0926ca37a990
templater: sort token table by binding strength Just for readability.
mercurial/templater.py
--- a/mercurial/templater.py	Tue Apr 04 22:31:59 2017 +0900
+++ b/mercurial/templater.py	Mon Apr 03 20:37:25 2017 +0900
@@ -33,14 +33,14 @@
 elements = {
     # token-type: binding-strength, primary, prefix, infix, suffix
     "(": (20, None, ("group", 1, ")"), ("func", 1, ")"), None),
-    ",": (2, None, None, ("list", 2), None),
+    "%": (6, None, None, ("%", 6), None),
     "|": (5, None, None, ("|", 5), None),
-    "%": (6, None, None, ("%", 6), None),
-    ")": (0, None, None, None, None),
+    "*": (4, None, None, ("*", 4), None),
+    "/": (4, None, None, ("/", 4), None),
     "+": (3, None, None, ("+", 3), None),
     "-": (3, None, ("negate", 10), ("-", 3), None),
-    "*": (4, None, None, ("*", 4), None),
-    "/": (4, None, None, ("/", 4), None),
+    ",": (2, None, None, ("list", 2), None),
+    ")": (0, None, None, None, None),
     "integer": (0, "integer", None, None, None),
     "symbol": (0, "symbol", None, None, None),
     "string": (0, "string", None, None, None),