Fix parsing scripting function parameters with function parameter within default parameter value

This commit is contained in:
Wojciech Figat
2022-10-26 14:58:05 +02:00
parent cd4d15e0e2
commit 3f1dba86a3

View File

@@ -382,6 +382,13 @@ namespace Flax.Build.Bindings
token = context.Tokenizer.ExpectToken(TokenType.Identifier);
currentParam.DefaultValue += "::" + token.Value;
}
else if (token.Type == TokenType.LeftParent)
{
currentParam.DefaultValue += token.Value;
context.Tokenizer.SkipUntil(TokenType.RightParent, out var parenthesis);
currentParam.DefaultValue += parenthesis;
currentParam.DefaultValue += context.Tokenizer.CurrentToken.Value;
}
else
{
context.Tokenizer.PreviousToken();