Fix reading type inheritance in bindings generation with comment at the end

This commit is contained in:
Wojciech Figat
2022-10-10 13:27:37 +02:00
parent 72b1178011
commit 5faa11e0a2

View File

@@ -460,10 +460,13 @@ namespace Flax.Build.Bindings
desc.Inheritance = new List<TypeInfo>();
desc.Inheritance.Add(inheritType);
token = context.Tokenizer.NextToken();
if (token.Type == TokenType.LeftCurlyBrace)
while (token.Type == TokenType.CommentSingleLine
|| token.Type == TokenType.CommentMultiLine)
{
break;
token = context.Tokenizer.NextToken();
}
if (token.Type == TokenType.LeftCurlyBrace)
break;
if (token.Type == TokenType.Colon)
{
token = context.Tokenizer.ExpectToken(TokenType.Colon);