mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Fixed documentation issues
This commit is contained in:
parent
bf5e689029
commit
6a9cb287f8
2 changed files with 17 additions and 18 deletions
|
@ -560,18 +560,13 @@ void BfAutoComplete::AddTypeDef(BfTypeDef* typeDef, const StringImpl& filter, bo
|
|||
|
||||
if (entryAdded != NULL)
|
||||
{
|
||||
if (CheckDocumentation(entryAdded, NULL))
|
||||
if ((CheckDocumentation(entryAdded, NULL)) && (entryAdded->mDocumentation == NULL))
|
||||
{
|
||||
auto typeInst = mModule->ResolveTypeDef(typeDef, BfPopulateType_IdentityNoRemapAlias);
|
||||
String str;
|
||||
StringT<1024> str;
|
||||
if (typeInst != NULL)
|
||||
str = mModule->TypeToString(typeInst, BfTypeNameFlag_ExtendedInfo);
|
||||
if (entryAdded->mDocumentation != NULL)
|
||||
{
|
||||
str += "\x04";
|
||||
str.Append(entryAdded->mDocumentation);
|
||||
}
|
||||
else if (typeDef->mTypeDeclaration->mDocumentation != NULL)
|
||||
if (typeDef->mTypeDeclaration->mDocumentation != NULL)
|
||||
{
|
||||
if (!str.IsEmpty())
|
||||
str += "\x05";
|
||||
|
|
|
@ -5722,12 +5722,8 @@ BfAstNode* BfReducer::ReadTypeMember(BfTokenNode* tokenNode, int depth, BfAstNod
|
|||
return NULL;
|
||||
}
|
||||
|
||||
SetAndRestoreValue<BfAstNode*> prevTypeMemberNodeStart(mTypeMemberNodeStart, attributes, false);
|
||||
if (depth == 0)
|
||||
prevTypeMemberNodeStart.Set();
|
||||
|
||||
mVisitorPos.MoveNext();
|
||||
auto memberNode = ReadTypeMember(nextNode, depth + 1, (deferredHeadNode != NULL) ? deferredHeadNode : attributes);
|
||||
auto memberNode = ReadTypeMember(nextNode, 0, (deferredHeadNode != NULL) ? deferredHeadNode : attributes);
|
||||
if (memberNode == NULL)
|
||||
return NULL;
|
||||
auto member = BfNodeDynCast<BfMemberDeclaration>(memberNode);
|
||||
|
@ -6418,9 +6414,9 @@ void BfReducer::ReadPropertyBlock(BfPropertyDeclaration* propertyDeclaration, Bf
|
|||
|
||||
BfAstNode* BfReducer::ReadTypeMember(BfAstNode* node, int depth, BfAstNode* deferredHeadNode)
|
||||
{
|
||||
SetAndRestoreValue<BfAstNode*> prevTypeMemberNodeStart(mTypeMemberNodeStart, node, false);
|
||||
if (depth == 0)
|
||||
prevTypeMemberNodeStart.Set();
|
||||
// SetAndRestoreValue<BfAstNode*> prevTypeMemberNodeStart(mTypeMemberNodeStart, node, false);
|
||||
// if (depth == 0)
|
||||
// prevTypeMemberNodeStart.Set();
|
||||
|
||||
AssertCurrentNode(node);
|
||||
|
||||
|
@ -6461,8 +6457,13 @@ BfAstNode* BfReducer::ReadTypeMember(BfAstNode* node, int depth, BfAstNode* defe
|
|||
// Read type member
|
||||
}
|
||||
else
|
||||
{
|
||||
SetAndRestoreValue<BfAstNode*> prevTypeMemberNodeStart(mTypeMemberNodeStart, tokenNode, false);
|
||||
if (depth == 0)
|
||||
prevTypeMemberNodeStart.Set();
|
||||
return ReadTypeMember(tokenNode, depth, deferredHeadNode);
|
||||
}
|
||||
}
|
||||
else if (auto block = BfNodeDynCast<BfBlock>(node))
|
||||
{
|
||||
Fail("Expected method declaration", node);
|
||||
|
@ -9591,7 +9592,10 @@ void BfReducer::HandleTypeDeclaration(BfTypeDeclaration* typeDecl, BfAttributeDi
|
|||
prevNode = node;
|
||||
BfAstNode* typeMember = BfNodeDynCast<BfMemberDeclaration>(node);
|
||||
if (typeMember == NULL)
|
||||
{
|
||||
SetAndRestoreValue<BfAstNode*> prevTypeMemberNodeStart(mTypeMemberNodeStart, node);
|
||||
typeMember = ReadTypeMember(node);
|
||||
}
|
||||
|
||||
//methodDeclaration->mDocumentation = FindDocumentation(methodDeclaration);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue