Issue #209 - enhancement: Support annonymous class

This commit is contained in:
Roy Qu 2024-03-08 07:32:09 +08:00
parent 1abcfc67f0
commit 45a73181df
1 changed files with 91 additions and 93 deletions

View File

@ -3853,8 +3853,7 @@ void CppParser::handleStructs(bool isTypedef)
mIndex=indexOfNextLeftBrace(mIndex);
}
// Check for struct synonyms after close brace
if (isStruct) {
// Check for struct/class synonyms after close brace
// Walk to closing brace
i = indexOfMatchingBrace(mIndex); // step onto closing brace
@ -3953,7 +3952,6 @@ void CppParser::handleStructs(bool isTypedef)
// Nothing worth mentioning after closing brace
// Proceed to set first synonym as current class
}
}
if (!firstSynonym) {
PStatement scope = getCurrentScope();
if (scope && scope->kind == StatementKind::skClass