Getting rid of 'bhl_async' support, use 'bhl_coroutine' instead
This commit is contained in:
parent
64aa9347c8
commit
ff32cb639f
|
@ -30,7 +30,6 @@ function supported_tokens()
|
|||
'bhl_ecs_component_ref',
|
||||
'bhl_coroutine',
|
||||
'bhl_static',
|
||||
'bhl_async',
|
||||
'bhl_native_class',
|
||||
'bhl_native_class_params',
|
||||
'bhl_native_prefix',
|
||||
|
@ -251,7 +250,7 @@ function bhl_type_ref($type_str)
|
|||
{
|
||||
if(preg_match('~\[\]((\w|\.)+)~', $type_str, $ms))
|
||||
return "types.TArr(\"{$ms[1]}\")";
|
||||
else if(preg_match('~async\s+func\s+((\w|\.)+)\s*\(\)~', $type_str, $ms))
|
||||
else if(preg_match('~coro\s+func\s+((\w|\.)+)\s*\(\)~', $type_str, $ms))
|
||||
return "types.TFunc(true, \"{$ms[1]}\")";
|
||||
else if(preg_match('~func\s+((\w|\.)+)\s*\(\)~', $type_str, $ms))
|
||||
return "types.TFunc(false, \"{$ms[1]}\")";
|
||||
|
|
|
@ -349,8 +349,8 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
|
|||
{%- for arg in fn.args -%}
|
||||
new FuncArgSymbol("{{arg.name}}",
|
||||
|
||||
{%-if has_token(arg, 'bhl_async') -%}
|
||||
{{('async ' ~ (arg.type|bhl_type))|bhl_type_ref}},
|
||||
{%-if has_token(arg, 'bhl_coroutine') -%}
|
||||
{{('coro ' ~ (arg.type|bhl_type))|bhl_type_ref}},
|
||||
{%-else-%}
|
||||
{{arg.type|bhl_type_ref}},
|
||||
{%-endif-%}
|
||||
|
|
Loading…
Reference in New Issue