Show More
@@ -172,14 +172,14 b' def runmap(context, mapping, data):' | |||
|
172 | 172 | def buildfunc(exp, context): |
|
173 | 173 | n = getsymbol(exp[1]) |
|
174 | 174 | args = [compileexp(x, context) for x in getlist(exp[2])] |
|
175 | if n in funcs: | |
|
176 | f = funcs[n] | |
|
177 | return (f, args) | |
|
175 | 178 | if n in context._filters: |
|
176 | 179 | if len(args) != 1: |
|
177 | 180 | raise error.ParseError(_("filter %s expects one argument") % n) |
|
178 | 181 | f = context._filters[n] |
|
179 | 182 | return (runfilter, (args[0][0], args[0][1], f)) |
|
180 | elif n in context._funcs: | |
|
181 | f = context._funcs[n] | |
|
182 | return (f, args) | |
|
183 | 183 | |
|
184 | 184 | methods = { |
|
185 | 185 | "string": lambda e, c: (runstring, e[1]), |
@@ -191,6 +191,9 b' methods = {' | |||
|
191 | 191 | "func": buildfunc, |
|
192 | 192 | } |
|
193 | 193 | |
|
194 | funcs = { | |
|
195 | } | |
|
196 | ||
|
194 | 197 | # template engine |
|
195 | 198 | |
|
196 | 199 | path = ['templates', '../templates'] |
General Comments 0
You need to be logged in to leave comments.
Login now