mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +02:00
Null protection for autofields
This commit is contained in:
parent
63b053d7d7
commit
a8b3a7cbf0
1 changed files with 14 additions and 6 deletions
|
@ -1632,11 +1632,15 @@ void BfAutoComplete::CheckIdentifier(BfAstNode* identifierNode, bool isInExpress
|
||||||
{
|
{
|
||||||
if (auto entryAdded = AddEntry(AutoCompleteEntry("property", prop->mName + "="), filter))
|
if (auto entryAdded = AddEntry(AutoCompleteEntry("property", prop->mName + "="), filter))
|
||||||
{
|
{
|
||||||
if (CheckDocumentation(entryAdded, prop->GetFieldDeclaration()->mDocumentation))
|
auto propertyDeclaration = prop->GetFieldDeclaration();
|
||||||
|
if (propertyDeclaration != NULL)
|
||||||
{
|
{
|
||||||
|
if (CheckDocumentation(entryAdded, propertyDeclaration->mDocumentation))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
if (mIsGetDefinition)
|
||||||
|
SetDefinitionLocation(propertyDeclaration->mNameNode);
|
||||||
}
|
}
|
||||||
if (mIsGetDefinition)
|
|
||||||
SetDefinitionLocation(prop->GetFieldDeclaration()->mNameNode);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1644,11 +1648,15 @@ void BfAutoComplete::CheckIdentifier(BfAstNode* identifierNode, bool isInExpress
|
||||||
{
|
{
|
||||||
if (auto entryAdded = AddEntry(AutoCompleteEntry("field", field->mName + "="), filter))
|
if (auto entryAdded = AddEntry(AutoCompleteEntry("field", field->mName + "="), filter))
|
||||||
{
|
{
|
||||||
if (CheckDocumentation(entryAdded, field->GetFieldDeclaration()->mDocumentation))
|
auto fieldDeclaration = field->GetFieldDeclaration();
|
||||||
|
if (fieldDeclaration != NULL)
|
||||||
{
|
{
|
||||||
|
if (CheckDocumentation(entryAdded, fieldDeclaration->mDocumentation))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
if (mIsGetDefinition)
|
||||||
|
SetDefinitionLocation(fieldDeclaration->mNameNode);
|
||||||
}
|
}
|
||||||
if (mIsGetDefinition)
|
|
||||||
SetDefinitionLocation(field->GetFieldDeclaration()->mNameNode);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue