##// END OF EJS Templates
revset: parse nullary ":" operator as "0:tip"...
Yuya Nishihara -
r25819:be29d26e default
parent child Browse files
Show More
@@ -125,7 +125,7 b' elements = {'
125 ("dagrangepost", 17)),
125 ("dagrangepost", 17)),
126 "..": (17, None, ("dagrangepre", 17), ("dagrange", 17),
126 "..": (17, None, ("dagrangepre", 17), ("dagrange", 17),
127 ("dagrangepost", 17)),
127 ("dagrangepost", 17)),
128 ":": (15, None, ("rangepre", 15), ("range", 15), ("rangepost", 15)),
128 ":": (15, "rangeall", ("rangepre", 15), ("range", 15), ("rangepost", 15)),
129 "not": (10, None, ("not", 10), None, None),
129 "not": (10, None, ("not", 10), None, None),
130 "!": (10, None, ("not", 10), None, None),
130 "!": (10, None, ("not", 10), None, None),
131 "and": (5, None, None, ("and", 5), None),
131 "and": (5, None, None, ("and", 5), None),
@@ -2227,6 +2227,8 b' def optimize(x, small):'
2227 return optimize(('func', ('symbol', 'ancestors'), x[1]), small)
2227 return optimize(('func', ('symbol', 'ancestors'), x[1]), small)
2228 elif op == 'dagrangepost':
2228 elif op == 'dagrangepost':
2229 return optimize(('func', ('symbol', 'descendants'), x[1]), small)
2229 return optimize(('func', ('symbol', 'descendants'), x[1]), small)
2230 elif op == 'rangeall':
2231 return optimize(('range', ('string', '0'), ('string', 'tip')), small)
2230 elif op == 'rangepre':
2232 elif op == 'rangepre':
2231 return optimize(('range', ('string', '0'), x[1]), small)
2233 return optimize(('range', ('string', '0'), x[1]), small)
2232 elif op == 'rangepost':
2234 elif op == 'rangepost':
@@ -117,6 +117,25 b' trivial'
117 <spanset+ 0:1>
117 <spanset+ 0:1>
118 0
118 0
119 1
119 1
120 $ try --optimize :
121 (rangeall
122 None)
123 * optimized:
124 (range
125 ('string', '0')
126 ('string', 'tip'))
127 * set:
128 <spanset+ 0:9>
129 0
130 1
131 2
132 3
133 4
134 5
135 6
136 7
137 8
138 9
120 $ try 3::6
139 $ try 3::6
121 (dagrange
140 (dagrange
122 ('symbol', '3')
141 ('symbol', '3')
General Comments 0
You need to be logged in to leave comments. Login now