diff --git a/tpl/macro.twig b/tpl/macro.twig index c6f667e..1523834 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -131,9 +131,9 @@ {{class_container}}.Define(fn); } - {%if has_token(m, 'bin_op') ~%} + {%if has_token(m, 'bhl_bin_op') ~%} { - var fn = new FuncSymbolNative("{{token(m, 'bin_op')}}", + var fn = new FuncSymbolNative({{token(m, 'bhl_bin_op')}}, {{ m.returntype|bhl_type_ref }}, {{ count_default_args(m) }}, #if !BHL_FRONT @@ -153,7 +153,6 @@ {{ _self.func_decl_args(m) }} ); {{class_container}}.OverloadBinaryOperator(fn); - {{class_container}}.Define(fn); } {% endif ~%} @@ -729,7 +728,7 @@ {%- macro ecs_component_field(o, f) ~%} { - var fn = new FuncSymbolNative("{{f.name}}", {{o|bhl_type_ref}}, + var fn = new FuncSymbolNative("{{o.name}}_{{f.name}}", {{f.type|bhl_type_ref}}, {%- if token_or(f, 'bhl_set', 1) != 0 ~%} 1, {%- endif ~%} @@ -766,7 +765,7 @@ }, new FuncArgSymbol("e", types.T("ecs.Entity")) {%- if token_or(f, 'bhl_set', 1) != 0 ~%} - , new FuncArgSymbol("v", {{o|bhl_type_ref}}) + , new FuncArgSymbol("v", {{f.type|bhl_type_ref}}) {%- endif ~%} ); types.ns.Define(fn);