Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Unified Diff: core/scripts/template_expander.py

Issue 15643014: Blink IDL roll. (Closed) Base URL: http://dart.googlecode.com/svn/third_party/WebCore/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/scripts/name_macros.py ('k') | core/storage/Storage.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/scripts/template_expander.py
===================================================================
--- core/scripts/template_expander.py (revision 23517)
+++ core/scripts/template_expander.py (working copy)
@@ -41,3 +41,13 @@
jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader([dirname, path_to_templates]))
template = jinja_env.get_template(basename)
return template.render(params)
+
+
+def use_jinja(template_file_name):
+ def real_decorator(generator):
+ def generator_internal(*args, **kwargs):
+ parameters = generator(*args, **kwargs)
+ return apply_template(template_file_name, parameters)
+ generator_internal.func_name = generator.func_name
+ return generator_internal
+ return real_decorator
« no previous file with comments | « core/scripts/name_macros.py ('k') | core/storage/Storage.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698