Tweaks to how data is read
This commit is contained in:
parent
dd223d8909
commit
18f4b1a25f
Binary file not shown.
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue