mercurial/revset.py
changeset 25815 e71e5629e006
parent 25801 272ff3680bf3
child 25819 be29d26e2949
equal deleted inserted replaced
25814:dc1a49264628 25815:e71e5629e006
   113             if parent in reachable:
   113             if parent in reachable:
   114                 reached(rev)
   114                 reached(rev)
   115     return baseset(sorted(reachable))
   115     return baseset(sorted(reachable))
   116 
   116 
   117 elements = {
   117 elements = {
   118     # token-type: binding-strength, prefix, infix, suffix
   118     # token-type: binding-strength, primary, prefix, infix, suffix
   119     "(": (21, ("group", 1, ")"), ("func", 1, ")"), None),
   119     "(": (21, None, ("group", 1, ")"), ("func", 1, ")"), None),
   120     "##": (20, None, ("_concat", 20), None),
   120     "##": (20, None, None, ("_concat", 20), None),
   121     "~": (18, None, ("ancestor", 18), None),
   121     "~": (18, None, None, ("ancestor", 18), None),
   122     "^": (18, None, ("parent", 18), ("parentpost", 18)),
   122     "^": (18, None, None, ("parent", 18), ("parentpost", 18)),
   123     "-": (5, ("negate", 19), ("minus", 5), None),
   123     "-": (5, None, ("negate", 19), ("minus", 5), None),
   124     "::": (17, ("dagrangepre", 17), ("dagrange", 17),
   124     "::": (17, None, ("dagrangepre", 17), ("dagrange", 17),
   125            ("dagrangepost", 17)),
   125            ("dagrangepost", 17)),
   126     "..": (17, ("dagrangepre", 17), ("dagrange", 17),
   126     "..": (17, None, ("dagrangepre", 17), ("dagrange", 17),
   127            ("dagrangepost", 17)),
   127            ("dagrangepost", 17)),
   128     ":": (15, ("rangepre", 15), ("range", 15), ("rangepost", 15)),
   128     ":": (15, None, ("rangepre", 15), ("range", 15), ("rangepost", 15)),
   129     "not": (10, ("not", 10), None, None),
   129     "not": (10, None, ("not", 10), None, None),
   130     "!": (10, ("not", 10), None, None),
   130     "!": (10, None, ("not", 10), None, None),
   131     "and": (5, None, ("and", 5), None),
   131     "and": (5, None, None, ("and", 5), None),
   132     "&": (5, None, ("and", 5), None),
   132     "&": (5, None, None, ("and", 5), None),
   133     "%": (5, None, ("only", 5), ("onlypost", 5)),
   133     "%": (5, None, None, ("only", 5), ("onlypost", 5)),
   134     "or": (4, None, ("or", 4), None),
   134     "or": (4, None, None, ("or", 4), None),
   135     "|": (4, None, ("or", 4), None),
   135     "|": (4, None, None, ("or", 4), None),
   136     "+": (4, None, ("or", 4), None),
   136     "+": (4, None, None, ("or", 4), None),
   137     "=": (3, None, ("keyvalue", 3), None),
   137     "=": (3, None, None, ("keyvalue", 3), None),
   138     ",": (2, None, ("list", 2), None),
   138     ",": (2, None, None, ("list", 2), None),
   139     ")": (0, None, None, None),
   139     ")": (0, None, None, None, None),
   140     "symbol": (0, ("symbol",), None, None),
   140     "symbol": (0, "symbol", None, None, None),
   141     "string": (0, ("string",), None, None),
   141     "string": (0, "string", None, None, None),
   142     "end": (0, None, None, None),
   142     "end": (0, None, None, None, None),
   143 }
   143 }
   144 
   144 
   145 keywords = set(['and', 'or', 'not'])
   145 keywords = set(['and', 'or', 'not'])
   146 
   146 
   147 # default set of valid characters for the initial letter of symbols
   147 # default set of valid characters for the initial letter of symbols