From c606d9fa4f5638939c483a720a95b599396dd0da Mon Sep 17 00:00:00 2001 From: wtfsck Date: Mon, 23 May 2022 22:22:17 +0200 Subject: [PATCH] Check for more Lua types --- src/csharp/Intel/Generator/Misc/Lua/LuaClassParser.cs | 3 ++- src/csharp/Intel/Generator/Misc/Lua/LuaDocGen.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/csharp/Intel/Generator/Misc/Lua/LuaClassParser.cs b/src/csharp/Intel/Generator/Misc/Lua/LuaClassParser.cs index 9760fdc0b..c0a53dad4 100644 --- a/src/csharp/Intel/Generator/Misc/Lua/LuaClassParser.cs +++ b/src/csharp/Intel/Generator/Misc/Lua/LuaClassParser.cs @@ -820,7 +820,8 @@ namespace Generator.Misc.Lua { // Check if it's one of our custom types, eg. "Decoder" if (type.Length > 0 && char.IsUpper(type[0])) return true; - return type is "nil" or "boolean" or "integer" or "number" or "string" or "table"; + return type is "nil" or "any" or "boolean" or "string" or "number" or "integer" or + "function" or "table" or "thread" or "userdata" or "lightuserdata"; } static bool TryGetLines(List lines, ref int index, Func isValidLine, [NotNullWhen(true)] out List? result, [NotNullWhen(false)] out string? error) { diff --git a/src/csharp/Intel/Generator/Misc/Lua/LuaDocGen.cs b/src/csharp/Intel/Generator/Misc/Lua/LuaDocGen.cs index 902a04ffe..6b48104e8 100644 --- a/src/csharp/Intel/Generator/Misc/Lua/LuaDocGen.cs +++ b/src/csharp/Intel/Generator/Misc/Lua/LuaDocGen.cs @@ -68,7 +68,7 @@ namespace Generator.Misc.Lua { sb.Append(", "); sb.Append(method.Args[i].Name); } - sb.Append(") end");; + sb.Append(") end"); writer.WriteLine(sb.ToString()); } writer.WriteLine();