Mercurial > hg-stable
changeset 31884:0926ca37a990
templater: adjust binding strengths to make room for key-value operator
Changed as follows:
- template ops (%, |): +10
- arithmetic ops: +1 (but "negate" should be greater than "%")
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 03 Apr 2017 20:44:05 +0900 |
parents | 25be03a33f50 |
children | d18b624c1c06 |
files | mercurial/templater.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templater.py Mon Apr 03 20:37:25 2017 +0900 +++ b/mercurial/templater.py Mon Apr 03 20:44:05 2017 +0900 @@ -33,12 +33,12 @@ elements = { # token-type: binding-strength, primary, prefix, infix, suffix "(": (20, None, ("group", 1, ")"), ("func", 1, ")"), None), - "%": (6, None, None, ("%", 6), None), - "|": (5, None, None, ("|", 5), None), - "*": (4, None, None, ("*", 4), None), - "/": (4, None, None, ("/", 4), None), - "+": (3, None, None, ("+", 3), None), - "-": (3, None, ("negate", 10), ("-", 3), None), + "%": (16, None, None, ("%", 16), None), + "|": (15, None, None, ("|", 15), None), + "*": (5, None, None, ("*", 5), None), + "/": (5, None, None, ("/", 5), None), + "+": (4, None, None, ("+", 4), None), + "-": (4, None, ("negate", 19), ("-", 4), None), ",": (2, None, None, ("list", 2), None), ")": (0, None, None, None, None), "integer": (0, "integer", None, None, None),