Mercurial > hg
changeset 29767:e5b794063fd4
parser: remove unused binding parameter from suffix action
Because a suffix action never takes subsequent tokens, it should have
no binding strength nor closing character. I've tried if this value could
be used to resolve infix/suffix ambiguity of x^:y, but it appears not. So
I decided to resend this patch.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 05 Jul 2015 21:11:19 +0900 |
parents | 19578bb84731 |
children | 8e4841944e68 |
files | mercurial/parser.py mercurial/revset.py |
diffstat | 2 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/parser.py Wed Aug 10 16:27:33 2016 +0100 +++ b/mercurial/parser.py Sun Jul 05 21:11:19 2015 +0900 @@ -65,7 +65,7 @@ # handle infix rules, take as suffix if unambiguous infix, suffix = self._elements[token][3:] if suffix and not (infix and self._hasnewterm()): - expr = (suffix[0], expr) + expr = (suffix, expr) elif infix: expr = (infix[0], expr, self._parseoperand(*infix[1:])) else:
--- a/mercurial/revset.py Wed Aug 10 16:27:33 2016 +0100 +++ b/mercurial/revset.py Sun Jul 05 21:11:19 2015 +0900 @@ -149,18 +149,16 @@ "(": (21, None, ("group", 1, ")"), ("func", 1, ")"), None), "##": (20, None, None, ("_concat", 20), None), "~": (18, None, None, ("ancestor", 18), None), - "^": (18, None, None, ("parent", 18), ("parentpost", 18)), + "^": (18, None, None, ("parent", 18), "parentpost"), "-": (5, None, ("negate", 19), ("minus", 5), None), - "::": (17, None, ("dagrangepre", 17), ("dagrange", 17), - ("dagrangepost", 17)), - "..": (17, None, ("dagrangepre", 17), ("dagrange", 17), - ("dagrangepost", 17)), - ":": (15, "rangeall", ("rangepre", 15), ("range", 15), ("rangepost", 15)), + "::": (17, None, ("dagrangepre", 17), ("dagrange", 17), "dagrangepost"), + "..": (17, None, ("dagrangepre", 17), ("dagrange", 17), "dagrangepost"), + ":": (15, "rangeall", ("rangepre", 15), ("range", 15), "rangepost"), "not": (10, None, ("not", 10), None, None), "!": (10, None, ("not", 10), None, None), "and": (5, None, None, ("and", 5), None), "&": (5, None, None, ("and", 5), None), - "%": (5, None, None, ("only", 5), ("onlypost", 5)), + "%": (5, None, None, ("only", 5), "onlypost"), "or": (4, None, None, ("or", 4), None), "|": (4, None, None, ("or", 4), None), "+": (4, None, None, ("or", 4), None),