work save

This commit is contained in:
royqh1979@gmail.com 2021-08-28 01:20:32 +08:00
parent 19e37b6ae7
commit a8445dc039
1 changed files with 21 additions and 17 deletions

View File

@ -2041,6 +2041,8 @@ void CppParser::handleNamespace()
//wrong namespace define, stop handling
return;
QString command = mTokenizer[mIndex]->text;
if (command.startsWith("__")) // hack for inline namespaces
isInline = true;
mIndex++;
if (mIndex>=mTokenizer.tokenCount())
return;
@ -2834,7 +2836,7 @@ void CppParser::handleVar()
while ((mIndex < mTokenizer.tokenCount())
&& !(
mTokenizer[mIndex]->text.front() == ','
|| isblockChar(';')
|| isblockChar(mTokenizer[mIndex]->text.front())
))
mIndex++;
}
@ -2861,22 +2863,24 @@ void CppParser::handleVar()
}
// Add a statement for every struct we are in
addChildStatement(
getCurrentScope(),
mCurrentFile,
"", // do not override hint
lastType,
cmd,
args,
"",
mTokenizer[mIndex]->line,
StatementKind::skVariable,
getScope(),
mClassScope,
//True,
!isExtern,
isStatic); // TODO: not supported to pass list
varAdded = true;
if (!lastType.isEmpty()) {
addChildStatement(
getCurrentScope(),
mCurrentFile,
"", // do not override hint
lastType,
cmd,
args,
"",
mTokenizer[mIndex]->line,
StatementKind::skVariable,
getScope(),
mClassScope,
//True,
!isExtern,
isStatic); // TODO: not supported to pass list
varAdded = true;
}
}
// Step over the variable name