Address a likely issue with language_server (#3610)

The `node_kind` check is on `ch`, so the `node_token` probably should be
too. Trying to address the issue reported by [skoriop on
Discord](https://discord.com/channels/655572317891461132/993958660277555301/1197201736226574420)

Note, I haven't tested this beyond building.
This commit is contained in:
Jon Ross-Perkins
2024-01-17 19:52:29 +00:00
committed by GitHub
parent 523e1c2972
commit 785ab04ede
+1 -1
View File
@@ -84,7 +84,7 @@ static auto GetIdentifierName(const SharedValueStores& value_stores,
for (auto ch : p.children(node)) {
if (p.node_kind(ch) == Parse::NodeKind::IdentifierName) {
return value_stores.identifiers().Get(
tokens.GetIdentifier(p.node_token(node)));
tokens.GetIdentifier(p.node_token(ch)));
}
}
return std::nullopt;