Chromium Code Reviews| Index: third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl |
| diff --git a/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl b/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl |
| index 8790c220a74458dfa70c7a5238d35b8e99f6a1ab..e34894f17c45ded2fda42d040b380fa3f3121430 100644 |
| --- a/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl |
| +++ b/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl |
| @@ -14,6 +14,22 @@ static_cast<{{field.type_name}}>({{value}}) |
| {%- endif %} |
| {% endmacro %} |
| +{% macro get_expr(field) %} |
|
meade_UTC10
2017/04/06 03:29:57
Can we name this better (and use full words)? e.g.
shend
2017/04/06 04:39:40
For these macros, should the naming be treated as
meade_UTC10
2017/04/20 03:08:40
I don't have strong opinions, other than consisten
shend
2017/04/20 03:22:34
Ok, I did getter_expression(field), since field.ge
|
| +{% if field.field_group -%} |
| +m_{{field.field_group}}->{{field.name}} |
| +{%- else -%} |
| +{{field.name}} |
| +{%- endif %} |
| +{% endmacro %} |
| + |
| +{% macro set_expr(field) %} |
|
meade_UTC10
2017/04/06 03:29:57
ditto
shend
2017/04/20 03:22:34
Done.
|
| +{% if field.field_group -%} |
| +m_{{field.field_group}}.access()->{{field.name}} |
| +{%- else -%} |
| +{{field.name}} |
| +{%- endif %} |
| +{% endmacro %} |
| + |
| {% macro return_type(field) %} |
| {% if field.is_bit_field -%} |
| {{field.type_name}} |