- implemented processing of multiple return values in script functions.
This commit is contained in:
parent
232b64d332
commit
ade9e4c3da
4 changed files with 79 additions and 26 deletions
|
|
@ -3314,16 +3314,9 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast)
|
|||
{
|
||||
return new FxReturnStatement(nullptr, *ast);
|
||||
}
|
||||
else if (args.Size() == 1)
|
||||
{
|
||||
auto arg = args[0];
|
||||
args[0] = nullptr;
|
||||
return new FxReturnStatement(arg, *ast);
|
||||
}
|
||||
else
|
||||
{
|
||||
Error(ast, "Return with multiple values not implemented yet.");
|
||||
return new FxReturnStatement(nullptr, *ast);
|
||||
return new FxReturnStatement(args, *ast);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue