mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Added mouseover docs support
This commit is contained in:
parent
dc2603bc60
commit
e02b42d6f4
5 changed files with 58 additions and 28 deletions
|
@ -3850,7 +3850,7 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
|
|||
autoComplete->mResultString += field->mName;
|
||||
|
||||
if (fieldInstance->mConstIdx != -1)
|
||||
{
|
||||
{
|
||||
String constStr = autoComplete->ConstantToString(curCheckType->mConstHolder, BfIRValue(BfIRValueFlags_Const, fieldInstance->mConstIdx));
|
||||
if (!constStr.IsEmpty())
|
||||
{
|
||||
|
@ -3861,6 +3861,15 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
|
|||
autoComplete->mResultString += constStr;
|
||||
}
|
||||
}
|
||||
|
||||
auto fieldDecl = fieldInstance->GetFieldDef()->mFieldDeclaration;
|
||||
if ((fieldDecl != NULL) && (fieldDecl->mDocumentation != NULL))
|
||||
{
|
||||
String docString;
|
||||
fieldDecl->mDocumentation->GetDocString(docString);
|
||||
autoComplete->mResultString += "\x03";
|
||||
autoComplete->mResultString += docString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7872,6 +7881,13 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
|
|||
{
|
||||
autoComplete->mResultString = ":";
|
||||
autoComplete->mResultString += mModule->MethodToString(moduleMethodInstance.mMethodInstance);
|
||||
|
||||
auto methodDecl = moduleMethodInstance.mMethodInstance->mMethodDef->GetMethodDeclaration();
|
||||
if ((methodDecl != NULL) && (methodDecl->mDocumentation != NULL))
|
||||
{
|
||||
autoComplete->mResultString += "\x03";
|
||||
methodDecl->mDocumentation->GetDocString(autoComplete->mResultString);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue