Merge remote-tracking branch 'origin/master'

This commit is contained in:
Madpwnhammer 2022-12-05 10:04:43 +03:00
commit 0703646984
3 changed files with 12 additions and 7 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
tags

1
README.md Normal file
View File

@ -0,0 +1 @@
This package is used for code generation of bhl2 bindings for C# using Twig templates

View File

@ -265,7 +265,7 @@
{{Error("ref argument is not allowed to have a default value: " ~ o.name ~ '.' ~ arg.name)}}
{%- endif ~%}
{%- do ++default_counter -%}
{%- set default_counter = default_counter + 1 -%}
if(!args_info.IsDefaultArgUsed({{o.args|length - count_required_args(o) - default_counter}}))
{%- endif ~%}
{
@ -829,8 +829,8 @@
{%- macro ecs_component_field_ref(o, f) ~%}
{
cl.Define(new FieldSymbol("{{f.name}}", {{f.type|bhl_type_ref}},
//getter
{%- if token_or(f, 'bhl_get', 1) != 0 ~%}
//getter
delegate(VM.Frame frm, Val ctx, ref Val v, FieldSymbol fld) {
#if !BHL_FRONT
@ -840,13 +840,15 @@
{{ _self.native2val(f.type, 'f.' ~ f.name, 'v') }};
#endif
},
}
{% else %}
null,
//getter not allowed
null
{% endif %}
//setter
,
{%- if token_or(f, 'bhl_set', 1) != 0 ~%}
//setter
delegate(VM.Frame frm, ref Val ctx, Val v, FieldSymbol fld) {
#if !BHL_FRONT
@ -858,7 +860,8 @@
#endif
}
{% else %}
null,
//setter not allowed
null
{% endif %}
));