- implemented processing of multiple return values in script functions.

This commit is contained in:
Christoph Oelckers 2017-01-18 01:27:50 +01:00
commit ade9e4c3da
4 changed files with 79 additions and 26 deletions

View file

@ -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);
}
}