##// END OF EJS Templates
templater: move runtemplate function out of buildmap/runmap pair...
Yuya Nishihara -
r25595:a7dd6692 default
parent child Browse files
Show More
@@ -174,6 +174,10 def runsymbol(context, mapping, key):
174 v = list(v)
174 v = list(v)
175 return v
175 return v
176
176
177 def runtemplate(context, mapping, template):
178 for func, data in template:
179 yield func(context, mapping, data)
180
177 def buildfilter(exp, context):
181 def buildfilter(exp, context):
178 func, data = compileexp(exp[1], context, methods)
182 func, data = compileexp(exp[1], context, methods)
179 filt = getfilter(exp[2], context)
183 filt = getfilter(exp[2], context)
@@ -201,10 +205,6 def buildmap(exp, context):
201 ctmpl = gettemplate(exp[2], context)
205 ctmpl = gettemplate(exp[2], context)
202 return (runmap, (func, data, ctmpl))
206 return (runmap, (func, data, ctmpl))
203
207
204 def runtemplate(context, mapping, template):
205 for func, data in template:
206 yield func(context, mapping, data)
207
208 def runmap(context, mapping, data):
208 def runmap(context, mapping, data):
209 func, data, ctmpl = data
209 func, data, ctmpl = data
210 d = func(context, mapping, data)
210 d = func(context, mapping, data)
General Comments 0
You need to be logged in to leave comments. Login now