mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:17:35 +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
|
||||
{
|
||||
if (node.parent() == nullptr)
|
||||
return false;
|
||||
if (!node.parent()->is_member_expression())
|
||||
return false;
|
||||
auto previous_token = document.parser().token_at(autocomplete_position);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue