From 3bb7f83729bfb0dc6ba95f12456539f116ad17f5 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 14 Oct 2021 11:06:37 +0200 Subject: [PATCH] Fix parsing DEPRECATED specifier on enums in scripting api --- .../Bindings/BindingsGenerator.Parsing.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Parsing.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Parsing.cs index e4097a1d1..82ca06cb7 100644 --- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Parsing.cs +++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Parsing.cs @@ -871,6 +871,21 @@ namespace Flax.Build.Bindings if (token.Value != "class") context.Tokenizer.PreviousToken(); + // Read specifiers + while (true) + { + token = context.Tokenizer.NextToken(); + if (!desc.IsDeprecated && token.Value == "DEPRECATED") + { + desc.IsDeprecated = true; + } + else + { + context.Tokenizer.PreviousToken(); + break; + } + } + // Read name desc.Name = desc.NativeName = ParseName(ref context);