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

Unified Diff: Source/core/scripts/templates/macros.tmpl

Issue 14905002: Use jinja2 templating engine for Python code generators (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 8 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
Index: Source/core/scripts/templates/macros.tmpl
diff --git a/Source/core/scripts/templates/macros.tmpl b/Source/core/scripts/templates/macros.tmpl
new file mode 100644
index 0000000000000000000000000000000000000000..250699b57a33155bbd5cbdb04d0ba074f6ef5468
--- /dev/null
+++ b/Source/core/scripts/templates/macros.tmpl
@@ -0,0 +1,9 @@
+{% macro wrap_with_condition(condition) %}
+{%- if condition %}
+#if ENABLE({{condition}})
+{{- caller() }}
+#endif
+{%- else %}
+{{- caller() }}
+{%- endif %}
+{%- endmacro %}
« Source/core/scripts/template_expander.py ('K') | « Source/core/scripts/template_expander.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698