clean up code
This commit is contained in:
parent
8378857157
commit
51d0f2c2aa
|
@ -1155,7 +1155,6 @@ PStatement CppParser::addInheritedStatement(const PStatement& derived, const PSt
|
||||||
access,
|
access,
|
||||||
true,
|
true,
|
||||||
inherit->isStatic);
|
inherit->isStatic);
|
||||||
statement->inheritanceList.append(inherit->inheritanceList),
|
|
||||||
statement->isInherited = true;
|
statement->isInherited = true;
|
||||||
return statement;
|
return statement;
|
||||||
}
|
}
|
||||||
|
@ -1243,7 +1242,6 @@ PStatement CppParser::addStatement(const PStatement& parent,
|
||||||
result->noNameArgs = noNameArgs;
|
result->noNameArgs = noNameArgs;
|
||||||
result->value = value;
|
result->value = value;
|
||||||
result->kind = kind;
|
result->kind = kind;
|
||||||
//result->inheritanceList;
|
|
||||||
result->scope = scope;
|
result->scope = scope;
|
||||||
result->classScope = classScope;
|
result->classScope = classScope;
|
||||||
result->hasDefinition = isDefinition;
|
result->hasDefinition = isDefinition;
|
||||||
|
@ -1288,7 +1286,6 @@ PStatement CppParser::addStatement(const PStatement& parent,
|
||||||
void CppParser::setInheritance(int index, const PStatement& classStatement, bool isStruct)
|
void CppParser::setInheritance(int index, const PStatement& classStatement, bool isStruct)
|
||||||
{
|
{
|
||||||
// Clear it. Assume it is assigned
|
// Clear it. Assume it is assigned
|
||||||
classStatement->inheritanceList.clear();
|
|
||||||
StatementClassScope lastInheritScopeType = StatementClassScope::scsNone;
|
StatementClassScope lastInheritScopeType = StatementClassScope::scsNone;
|
||||||
// Assemble a list of statements in text form we inherit from
|
// Assemble a list of statements in text form we inherit from
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -1308,7 +1305,6 @@ void CppParser::setInheritance(int index, const PStatement& classStatement, bool
|
||||||
PStatement statement = findStatementOf(mCurrentFile,basename,
|
PStatement statement = findStatementOf(mCurrentFile,basename,
|
||||||
classStatement->parentScope.lock(),true);
|
classStatement->parentScope.lock(),true);
|
||||||
if (statement && statement->kind == StatementKind::skClass) {
|
if (statement && statement->kind == StatementKind::skClass) {
|
||||||
classStatement->inheritanceList.append(statement);
|
|
||||||
inheritClassStatement(classStatement,isStruct,statement,lastInheritScopeType);
|
inheritClassStatement(classStatement,isStruct,statement,lastInheritScopeType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,6 @@ private:
|
||||||
void skipToEndOfPreprocessor();
|
void skipToEndOfPreprocessor();
|
||||||
void skipToPreprocessor();
|
void skipToPreprocessor();
|
||||||
QString getNextPreprocessor();
|
QString getNextPreprocessor();
|
||||||
void simplify(QString& output);
|
|
||||||
void handleBranch(const QString& line);
|
void handleBranch(const QString& line);
|
||||||
void handleDefine(const QString& line);
|
void handleDefine(const QString& line);
|
||||||
void handleInclude(const QString& line, bool fromNext=false);
|
void handleInclude(const QString& line, bool fromNext=false);
|
||||||
|
|
|
@ -149,7 +149,6 @@ struct Statement {
|
||||||
QString args; // args "(int a,float b)"
|
QString args; // args "(int a,float b)"
|
||||||
QString value; // Used for macro defines/typedef, "100" in "#defin COUNT 100"
|
QString value; // Used for macro defines/typedef, "100" in "#defin COUNT 100"
|
||||||
StatementKind kind; // kind of statement class/variable/function/etc
|
StatementKind kind; // kind of statement class/variable/function/etc
|
||||||
QList<std::weak_ptr<Statement>> inheritanceList; // list of statements this one inherits from, can be nil
|
|
||||||
StatementScope scope; // global/local/classlocal
|
StatementScope scope; // global/local/classlocal
|
||||||
StatementClassScope classScope; // protected/private/public
|
StatementClassScope classScope; // protected/private/public
|
||||||
bool hasDefinition; // definiton line/filename is valid
|
bool hasDefinition; // definiton line/filename is valid
|
||||||
|
|
Loading…
Reference in New Issue