work save

This commit is contained in:
Roy Qu 2022-10-22 22:10:35 +08:00
parent d1d68758aa
commit 74b250c9d2
5 changed files with 14 additions and 15 deletions

View File

@ -10,7 +10,7 @@ isEmpty(APP_NAME) {
}
isEmpty(APP_VERSION) {
APP_VERSION=1.5
APP_VERSION = 2.0
}
macos: {

View File

@ -2615,7 +2615,6 @@ void CppParser::handlePreprocessor()
QString name,args,value;
mPreprocessor.getDefineParts(s,name,args,value);
qDebug()<<"add define "<<name<<mCurrentFile<<mTokenizer[mIndex]->line<<mIndex;
addStatement(
nullptr, // defines don't belong to any scope
mCurrentFile,

View File

@ -667,14 +667,14 @@ bool isCppControlKeyword(const QString &word)
return CppControlKeyWords.contains(word);
}
static int counter=0;
Statement::Statement()
{
counter++;
}
//static int counter=0;
//Statement::Statement()
//{
// counter++;
//}
Statement::~Statement()
{
counter--;
qDebug()<<"statement deleted:"<<counter<<fullName<<kind<<extractFileName(fileName)<<line;
}
//Statement::~Statement()
//{
// counter--;
// qDebug()<<"statement deleted:"<<counter<<fullName<<kind<<extractFileName(fileName)<<line;
//}

View File

@ -134,8 +134,8 @@ using StatementList = QList<PStatement>;
using PStatementList = std::shared_ptr<StatementList>;
using StatementMap = QMultiMap<QString, PStatement>;
struct Statement {
Statement();
~Statement();
// Statement();
// ~Statement();
std::weak_ptr<Statement> parentScope; // parent class/struct/namespace scope, don't use auto pointer to prevent circular reference
QString type; // type "int"
QString command; // identifier/name of statement "foo"

View File

@ -33,7 +33,7 @@ RedPandaIDE.depends += redpanda-git-askpass
APP_NAME = RedPandaCPP
APP_VERSION = 1.5
APP_VERSION = 2.0
linux: {
isEmpty(PREFIX) {