mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:27:43 +00:00
CppLanguageServer: is_empty_property: Return false for null node parent
This commit is contained in:
parent
f3264b0dbd
commit
779f0c6e91
1 changed files with 2 additions and 0 deletions
|
@ -203,6 +203,8 @@ bool ParserAutoComplete::is_property(const ASTNode& node) const
|
||||||
|
|
||||||
bool ParserAutoComplete::is_empty_property(const DocumentData& document, const ASTNode& node, const Position& autocomplete_position) const
|
bool ParserAutoComplete::is_empty_property(const DocumentData& document, const ASTNode& node, const Position& autocomplete_position) const
|
||||||
{
|
{
|
||||||
|
if (node.parent() == nullptr)
|
||||||
|
return false;
|
||||||
if (!node.parent()->is_member_expression())
|
if (!node.parent()->is_member_expression())
|
||||||
return false;
|
return false;
|
||||||
auto previous_token = document.parser().token_at(autocomplete_position);
|
auto previous_token = document.parser().token_at(autocomplete_position);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue