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));
|
BoundTypeHandler.LoadUserDataTypeDefinition(new UserDataBoundEnumDefinition(values, typeName));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var innerProperties = obj.Properties();
|
var innerProperties = (JObject)obj.GetValue("Properties", StringComparison.InvariantCultureIgnoreCase);
|
||||||
foreach (var innerProperty in innerProperties)
|
foreach (var innerProperty in innerProperties.Properties())
|
||||||
{
|
{
|
||||||
var propertyName = innerProperty.Name;
|
var propertyName = innerProperty.Name;
|
||||||
if (!(innerProperty.Value is JObject value))
|
if (!(innerProperty.Value is JObject value))
|
||||||
|
@ -174,6 +174,8 @@ namespace UpsilonLanguageServer
|
||||||
return Type.Table;
|
return Type.Table;
|
||||||
if (string.Equals(input, "function", StringComparison.InvariantCultureIgnoreCase))
|
if (string.Equals(input, "function", StringComparison.InvariantCultureIgnoreCase))
|
||||||
return Type.Function;
|
return Type.Function;
|
||||||
|
if (string.Equals(input, "unknown", StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
return Type.Unknown;
|
||||||
|
|
||||||
return Type.UserData;
|
return Type.UserData;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,12 @@ namespace UpsilonLanguageServer.Services
|
||||||
{
|
{
|
||||||
contents.Append($"\n\nReturns: {fe.ReturnType}");
|
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()
|
return new Hover()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue