diff --git a/Client/upsilon-language-extension-1.0.0.vsix b/Client/upsilon-language-extension-1.0.0.vsix index 86dcfb5..be7fcae 100644 Binary files a/Client/upsilon-language-extension-1.0.0.vsix and b/Client/upsilon-language-extension-1.0.0.vsix differ diff --git a/UpsilonLanguageServer/UpsilonLanguageServer/BoundTypeParser.cs b/UpsilonLanguageServer/UpsilonLanguageServer/BoundTypeParser.cs index 2f8ca1f..aabfd1b 100644 --- a/UpsilonLanguageServer/UpsilonLanguageServer/BoundTypeParser.cs +++ b/UpsilonLanguageServer/UpsilonLanguageServer/BoundTypeParser.cs @@ -30,8 +30,8 @@ namespace UpsilonLanguageServer BoundTypeHandler.LoadUserDataTypeDefinition(new UserDataBoundEnumDefinition(values, typeName)); continue; } - var innerProperties = obj.Properties(); - foreach (var innerProperty in innerProperties) + var innerProperties = (JObject)obj.GetValue("Properties", StringComparison.InvariantCultureIgnoreCase); + foreach (var innerProperty in innerProperties.Properties()) { var propertyName = innerProperty.Name; if (!(innerProperty.Value is JObject value)) @@ -174,6 +174,8 @@ namespace UpsilonLanguageServer return Type.Table; if (string.Equals(input, "function", StringComparison.InvariantCultureIgnoreCase)) return Type.Function; + if (string.Equals(input, "unknown", StringComparison.InvariantCultureIgnoreCase)) + return Type.Unknown; return Type.UserData; } diff --git a/UpsilonLanguageServer/UpsilonLanguageServer/Services/TextDocumentServer.cs b/UpsilonLanguageServer/UpsilonLanguageServer/Services/TextDocumentServer.cs index e93a5f1..ee71b73 100644 --- a/UpsilonLanguageServer/UpsilonLanguageServer/Services/TextDocumentServer.cs +++ b/UpsilonLanguageServer/UpsilonLanguageServer/Services/TextDocumentServer.cs @@ -53,6 +53,12 @@ namespace UpsilonLanguageServer.Services { contents.Append($"\n\nReturns: {fe.ReturnType}"); } + else if (findNode is BoundFunctionCallExpression functionCall) + { + contents.Append( + $"\n\nParameters: {string.Join(", ", functionCall.Parameters.Select(x => x.Type))}"); + contents.Append($"\n\nReturns: {functionCall.Type}"); + } return new Hover() {