Improving support for native enum types

This commit is contained in:
Pavel Shevaev 2023-09-07 19:32:42 +03:00
parent f9f382c23d
commit 7f6966f113
1 changed files with 7 additions and 1 deletions

View File

@ -560,7 +560,13 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
{%- macro reg_enum(o, scope = 'types.ns') ~%}
{
var en = new EnumSymbol(new Origin(), "{{o.name|ns_last}}");
var en = new EnumSymbolNative(new Origin(), "{{o.name|ns_last}}"
#if !BHL_FRONT
, typeof({{o.name}})
#else
, null
#endif
);
{{scope}}.{{o.name|ns_prefix}}Define(en);