1
0

feat: update flag enum and enum underlying type decision rules for codegen

This commit is contained in:
2026-02-11 22:49:54 +08:00
parent 3310cac100
commit 4619cb5d1a
10 changed files with 211 additions and 64 deletions

View File

@@ -4,7 +4,7 @@
{{ benum.get_enum_comment() | block_comment(' * ') }}
*/
{%- endif %}
enum class {{ benum.get_enum_name() }} : {% if benum.get_can_unsigned() -%} CKDWORD {%- else -%} CKINT {%- endif %} {
enum class {{ benum.get_enum_name() }} : {% if benum.is_unsigned() -%} CKDWORD {%- else -%} CKINT {%- endif %} {
{%- for entry in benum.iter_entries() %}
{{ entry.get_entry_name() }} {%- if entry.get_entry_value() is not none %} = {{ entry.get_entry_value() }} {%- endif %}, {%- if entry.get_entry_comment() is not none %} /**< {{ entry.get_entry_comment() | line_comment }} */ {%- endif %}
{%- endfor %}