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

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/macros.tmpl

Issue 2680123002: Add Jinja2 macro for adding trailing strings. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {# 1 {#
2 FIXME: Do we need to put license blocks in generated files? 2 FIXME: Do we need to put license blocks in generated files?
3 #} 3 #}
4 {% macro license() %} 4 {% macro license() %}
5 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 5 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
6 // Use of this source code is governed by a BSD-style license that can be 6 // Use of this source code is governed by a BSD-style license that can be
7 // found in the LICENSE file. 7 // found in the LICENSE file.
8 {%- endmacro %} 8 {%- endmacro %}
9 9
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 49
50 {% macro trie_length_switch(length_tries, return_macro, lowercase_data) %} 50 {% macro trie_length_switch(length_tries, return_macro, lowercase_data) %}
51 switch (length) { 51 switch (length) {
52 {% for length, trie in length_tries %} 52 {% for length, trie in length_tries %}
53 case {{ length }}: 53 case {{ length }}:
54 {{ trie_switch(trie, 0, return_macro, lowercase_data) | indent(4) }} 54 {{ trie_switch(trie, 0, return_macro, lowercase_data) | indent(4) }}
55 {% endfor %} 55 {% endfor %}
56 } 56 }
57 {% endmacro %} 57 {% endmacro %}
58
59
60 {% macro trailing(loop, str) -%}
meade_UTC10 2017/02/13 06:19:58 Would it make sense to pass in loop.last here inst
shend 2017/02/13 06:40:37 Hmm, my intention for this macro is to print a str
meade_UTC10 2017/02/13 06:51:15 Hmm, it's really print_if_false right? I think it'
61 {% if not loop.last %}{{str}}{% endif %}
62 {%- endmacro %}
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698