Add functions to parse all global event scripts labels in the project

This commit is contained in:
BigBahss
2021-01-29 22:05:08 -05:00
parent 776aac56bc
commit d2386fac9b
2 changed files with 56 additions and 3 deletions

View File

@@ -60,6 +60,9 @@ public:
static int getScriptLineNumber(const QString &filePath, const QString &scriptLabel);
static int getRawScriptLineNumber(QString text, const QString &scriptLabel);
static int getPoryScriptLineNumber(QString text, const QString &scriptLabel);
static QStringList getGlobalScriptLabels(const QString &filePath);
static QStringList getGlobalRawScriptLabels(QString text);
static QStringList getGlobalPoryScriptLabels(QString text);
static QString &removeStringLiterals(QString &text);
static QString &removeLineComments(QString &text, const QString &commentSymbol);
static QString &removeLineComments(QString &text, const QStringList &commentSymbols);
@@ -74,6 +77,12 @@ private:
QList<Token> generatePostfix(QList<Token> tokens);
int evaluatePostfix(QList<Token> postfix);
void error(QString message, QString expression);
static const QRegularExpression re_incScriptLabel;
static const QRegularExpression re_globalIncScriptLabel;
static const QRegularExpression re_poryScriptLabel;
static const QRegularExpression re_globalPoryScriptLabel;
static const QRegularExpression re_poryRawSection;
};
#endif // PARSEUTIL_H