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

Unified Diff: Source/build/scripts/templates/MakeNames.cpp.tmpl

Issue 236673002: Simplify whitespace handling in build/ Jinja templates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more FIXME Created 6 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/build/scripts/templates/MakeNames.cpp.tmpl
diff --git a/Source/build/scripts/templates/MakeNames.cpp.tmpl b/Source/build/scripts/templates/MakeNames.cpp.tmpl
index 792acc3a5f8ab293da5d154963b736e57920c10e..3b62ca7854ff2244eacec529da8e02c6d5ecb069 100644
--- a/Source/build/scripts/templates/MakeNames.cpp.tmpl
+++ b/Source/build/scripts/templates/MakeNames.cpp.tmpl
@@ -1,4 +1,4 @@
-{% from "macros.tmpl" import license -%}
+{% from "macros.tmpl" import license %}
{{ license() }}
#include "config.h"
@@ -15,26 +15,25 @@ namespace WebCore {
namespace {{namespace}}Names {
using namespace WTF;
-
-{%- for entry in entries|sort %}
-{%- if export %}
+{# FIXME: add blank line #}
+{% for entry in entries|sort %}
+{% if export %}
DEFINE_GLOBAL(AtomicString, {{entry|symbol}}Storage)
{{export}} const AtomicString& {{entry|symbol}} = *reinterpret_cast<const AtomicString*>(&{{entry|symbol}}Storage);
-{%- else %}
+{% else %}
DEFINE_GLOBAL(AtomicString, {{entry|symbol}})
-{%- endif %}
-{%- endfor %}
+{% endif %}
+{% endfor %}
void init()
{
-{%- for entry in entries|sort %}
+ {% for entry in entries|sort %}
StringImpl* {{entry|symbol}}Impl = StringImpl::createStatic("{{entry|cpp_name}}", {{entry|cpp_name|length}}, {{entry|cpp_name|hash}});
-{%- endfor %}
-
-
-{%- for entry in entries|sort %}
+ {% endfor %}
+ {# FIXME: add blank line #}
+ {% for entry in entries|sort %}
new ((void*)&{{entry|symbol}}) AtomicString({{entry|symbol}}Impl);
-{%- endfor %}
+ {% endfor %}
}
} // {{namespace}}
« no previous file with comments | « Source/build/scripts/templates/InternalSettingsGenerated.idl.tmpl ('k') | Source/build/scripts/templates/MakeNames.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698