Mercurial > public > mercurial-scm > hg
diff mercurial/revset.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/revset.py Sun Jul 05 11:06:58 2015 +0900 +++ b/mercurial/revset.py Sun Jul 05 11:17:22 2015 +0900 @@ -116,30 +116,30 @@ elements = { # token-type: binding-strength, prefix, infix, suffix - "(": (21, ("group", 1, ")"), ("func", 1, ")")), - "##": (20, None, ("_concat", 20)), - "~": (18, None, ("ancestor", 18)), + "(": (21, ("group", 1, ")"), ("func", 1, ")"), None), + "##": (20, None, ("_concat", 20), None), + "~": (18, None, ("ancestor", 18), None), "^": (18, None, ("parent", 18), ("parentpost", 18)), - "-": (5, ("negate", 19), ("minus", 5)), + "-": (5, ("negate", 19), ("minus", 5), None), "::": (17, ("dagrangepre", 17), ("dagrange", 17), ("dagrangepost", 17)), "..": (17, ("dagrangepre", 17), ("dagrange", 17), ("dagrangepost", 17)), ":": (15, ("rangepre", 15), ("range", 15), ("rangepost", 15)), - "not": (10, ("not", 10)), - "!": (10, ("not", 10)), - "and": (5, None, ("and", 5)), - "&": (5, None, ("and", 5)), + "not": (10, ("not", 10), None, None), + "!": (10, ("not", 10), None, None), + "and": (5, None, ("and", 5), None), + "&": (5, None, ("and", 5), None), "%": (5, None, ("only", 5), ("onlypost", 5)), - "or": (4, None, ("or", 4)), - "|": (4, None, ("or", 4)), - "+": (4, None, ("or", 4)), - "=": (3, None, ("keyvalue", 3)), - ",": (2, None, ("list", 2)), - ")": (0, None, None), - "symbol": (0, ("symbol",), None), - "string": (0, ("string",), None), - "end": (0, None, None), + "or": (4, None, ("or", 4), None), + "|": (4, None, ("or", 4), None), + "+": (4, None, ("or", 4), None), + "=": (3, None, ("keyvalue", 3), 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'])