From 51d0f2c2aa452cb60ad98cbe93ef24c107d9f13a Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 22 Oct 2022 08:46:27 +0800 Subject: [PATCH] clean up code --- RedPandaIDE/parser/cppparser.cpp | 4 ---- RedPandaIDE/parser/cpppreprocessor.h | 1 - RedPandaIDE/parser/parserutils.h | 1 - 3 files changed, 6 deletions(-) diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 3aa9029a..506cf775 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -1155,7 +1155,6 @@ PStatement CppParser::addInheritedStatement(const PStatement& derived, const PSt access, true, inherit->isStatic); - statement->inheritanceList.append(inherit->inheritanceList), statement->isInherited = true; return statement; } @@ -1243,7 +1242,6 @@ PStatement CppParser::addStatement(const PStatement& parent, result->noNameArgs = noNameArgs; result->value = value; result->kind = kind; - //result->inheritanceList; result->scope = scope; result->classScope = classScope; result->hasDefinition = isDefinition; @@ -1288,7 +1286,6 @@ PStatement CppParser::addStatement(const PStatement& parent, void CppParser::setInheritance(int index, const PStatement& classStatement, bool isStruct) { // Clear it. Assume it is assigned - classStatement->inheritanceList.clear(); StatementClassScope lastInheritScopeType = StatementClassScope::scsNone; // Assemble a list of statements in text form we inherit from while (true) { @@ -1308,7 +1305,6 @@ void CppParser::setInheritance(int index, const PStatement& classStatement, bool PStatement statement = findStatementOf(mCurrentFile,basename, classStatement->parentScope.lock(),true); if (statement && statement->kind == StatementKind::skClass) { - classStatement->inheritanceList.append(statement); inheritClassStatement(classStatement,isStruct,statement,lastInheritScopeType); } } diff --git a/RedPandaIDE/parser/cpppreprocessor.h b/RedPandaIDE/parser/cpppreprocessor.h index fc879f3a..c7de25d1 100644 --- a/RedPandaIDE/parser/cpppreprocessor.h +++ b/RedPandaIDE/parser/cpppreprocessor.h @@ -97,7 +97,6 @@ private: void skipToEndOfPreprocessor(); void skipToPreprocessor(); QString getNextPreprocessor(); - void simplify(QString& output); void handleBranch(const QString& line); void handleDefine(const QString& line); void handleInclude(const QString& line, bool fromNext=false); diff --git a/RedPandaIDE/parser/parserutils.h b/RedPandaIDE/parser/parserutils.h index ddedbbb4..333821ca 100644 --- a/RedPandaIDE/parser/parserutils.h +++ b/RedPandaIDE/parser/parserutils.h @@ -149,7 +149,6 @@ struct Statement { QString args; // args "(int a,float b)" QString value; // Used for macro defines/typedef, "100" in "#defin COUNT 100" StatementKind kind; // kind of statement class/variable/function/etc - QList> inheritanceList; // list of statements this one inherits from, can be nil StatementScope scope; // global/local/classlocal StatementClassScope classScope; // protected/private/public bool hasDefinition; // definiton line/filename is valid