mercurial/revsetlang.py
changeset 40311 4aa04d009167
parent 39351 b902b177901d
child 41218 24a1f67bb75a
equal deleted inserted replaced
40310:d894d2372ffe 40311:4aa04d009167
   353     elif op == 'list':
   353     elif op == 'list':
   354         return (op,) + tuple(_analyze(y) for y in x[1:])
   354         return (op,) + tuple(_analyze(y) for y in x[1:])
   355     elif op == 'keyvalue':
   355     elif op == 'keyvalue':
   356         return (op, x[1], _analyze(x[2]))
   356         return (op, x[1], _analyze(x[2]))
   357     elif op == 'func':
   357     elif op == 'func':
   358         f = getsymbol(x[1])
       
   359         if f == 'revset':
       
   360             return _analyze(x[2])
       
   361         return (op, x[1], _analyze(x[2]))
   358         return (op, x[1], _analyze(x[2]))
   362     raise ValueError('invalid operator %r' % op)
   359     raise ValueError('invalid operator %r' % op)
   363 
   360 
   364 def analyze(x):
   361 def analyze(x):
   365     """Transform raw parsed tree to evaluatable tree which can be fed to
   362     """Transform raw parsed tree to evaluatable tree which can be fed to