From 5faa11e0a2c2fa67b745b6f41356d12aab9fba8f Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Mon, 10 Oct 2022 13:27:37 +0200 Subject: [PATCH] Fix reading type inheritance in bindings generation with comment at the end --- .../Tools/Flax.Build/Bindings/BindingsGenerator.Parsing.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Parsing.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Parsing.cs index 2f3bb22f1..f1c89a860 100644 --- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Parsing.cs +++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Parsing.cs @@ -460,10 +460,13 @@ namespace Flax.Build.Bindings desc.Inheritance = new List(); 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);