OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 {%- macro typeName(t, typepkg, pkg) -%} |
| 6 {%- if t|is_enum -%} |
| 7 {{enumName(t, typepkg, pkg)}} |
| 8 {%- elif t|is_struct -%} |
| 9 {{structName(t, typepkg, pkg)}} |
| 10 {%- elif t|is_union -%} |
| 11 {{unionName(t, typepkg, pkg)}} |
| 12 {%- elif t|is_interface -%} |
| 13 {{interfaceName(t, typepkg, pkg)}} |
| 14 {%- else -%} |
| 15 BAD TYPE NAME GIVEN |
| 16 {%- endif -%} |
| 17 {%- endmacro -%} |
| 18 |
| 19 {%- macro enumName(t, typepkg, pkg) -%} |
| 20 MojomEnum{{t|identifier(pkg)}}__ |
| 21 {%- endmacro -%} |
| 22 |
| 23 {%- macro structName(t, typepkg, pkg) -%} |
| 24 MojomStruct{{t|identifier(pkg)}}__ |
| 25 {%- endmacro -%} |
| 26 |
| 27 {%- macro unionName(t, typepkg, pkg) -%} |
| 28 MojomUnion{{t|identifier(pkg)}}__ |
| 29 {%- endmacro -%} |
| 30 |
| 31 {%- macro interfaceName(t, typepkg, pkg) -%} |
| 32 MojomInterface{{t|identifier(pkg)}}__ |
| 33 {%- endmacro -%} |
OLD | NEW |