Handle null values for comment data
This commit is contained in:
parent
0619fe3d21
commit
fdd97fa9b3
Binary file not shown.
Binary file not shown.
|
@ -123,9 +123,15 @@ namespace UpsilonLanguageServer.Services
|
||||||
if (variableSymbol.VariableSymbol is TableVariableSymbol tableSymbol)
|
if (variableSymbol.VariableSymbol is TableVariableSymbol tableSymbol)
|
||||||
{
|
{
|
||||||
return new CompletionList(
|
return new CompletionList(
|
||||||
tableSymbol.Variables.Select(x => new CompletionItem(x.Key,
|
tableSymbol.Variables.Select(x =>
|
||||||
CompletionItemKind.Variable, x.Value.Type.ToString(),
|
{
|
||||||
$"\n\n{string.Join(" \n", x.Value.CommentValue)}")));
|
var (key, value) = x;
|
||||||
|
return new CompletionItem(key,
|
||||||
|
CompletionItemKind.Variable, value.Type.ToString(),
|
||||||
|
x.Value.CommentValue == null
|
||||||
|
? ""
|
||||||
|
: $"\n\n{string.Join(" \n", value.CommentValue)}");
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
return new CompletionList(
|
return new CompletionList(
|
||||||
new[]
|
new[]
|
||||||
|
|
Loading…
Reference in New Issue