comparison mercurial/revset.py @ 30056:3eb4df6d15f8

revset: define _symletters in terms of _syminitletters
author Augie Fackler <augie@google.com>
date Fri, 07 Oct 2016 08:09:23 -0400
parents 7bf15e7eab77
children 2def3d55b1b9
comparison
equal deleted inserted replaced
30055:7bf15e7eab77 30056:3eb4df6d15f8
175 # default set of valid characters for the initial letter of symbols 175 # default set of valid characters for the initial letter of symbols
176 _syminitletters = set(c for c in [chr(i) for i in xrange(256)] 176 _syminitletters = set(c for c in [chr(i) for i in xrange(256)]
177 if c.isalnum() or c in '._@' or ord(c) > 127) 177 if c.isalnum() or c in '._@' or ord(c) > 127)
178 178
179 # default set of valid characters for non-initial letters of symbols 179 # default set of valid characters for non-initial letters of symbols
180 _symletters = set(c for c in [chr(i) for i in xrange(256)] 180 _symletters = _syminitletters | set('-/')
181 if c.isalnum() or c in '-._/@' or ord(c) > 127)
182 181
183 def tokenize(program, lookup=None, syminitletters=None, symletters=None): 182 def tokenize(program, lookup=None, syminitletters=None, symletters=None):
184 ''' 183 '''
185 Parse a revset statement into a stream of tokens 184 Parse a revset statement into a stream of tokens
186 185