blob: 3f77f867ab3e1fa1a8ea630c9149aba05fbb07a3 [file] [log] [blame]
Sapan Bhatia3a1406f2017-06-28 23:22:15 -07001{% for k,v in options.items() %}
2option {{ k }} = {{ v}};
3{%- endfor %}
Sapan Bhatiad16e2772017-03-27 13:11:07 +02004{% for m in proto.messages %}
5message {{ m.name }} {
Sapan Bhatia3a1406f2017-06-28 23:22:15 -07006 option bases = "{{ m.bases | map(attribute='name') | join(",") }}";
7 {% for k,v in m.options.items() %}
8 option {{ k }} = {{ v}};
9 {%- endfor %}
10 {%- for f in m.fields %}
11 {{ f.modifier }} {{f.type}} {{f.name}} = {{ f.id }}{% if f.options %} [{% for k,v in f.options.iteritems() %} {{ k }} = "{{ v}}"{% if not loop.last %},{% endif %} {% endfor %}]{% endif %};
12 {%- endfor %}
Sapan Bhatiad16e2772017-03-27 13:11:07 +020013}
Sapan Bhatiad16e2772017-03-27 13:11:07 +020014{% endfor %}
Sapan Bhatia3a1406f2017-06-28 23:22:15 -070015