Add support for opening .pory scripts to the selected event script

This commit is contained in:
BigBahss
2020-11-26 06:09:58 -05:00
parent 4aaae1a264
commit a4528fb0d9
3 changed files with 74 additions and 24 deletions

View File

@@ -41,7 +41,7 @@ public:
ParseUtil();
void set_root(QString);
static QString readTextFile(QString);
static void strip_comment(QString*);
void strip_comment(QString*);
QList<QStringList>* parseAsm(QString);
int evaluateDefine(QString, QMap<QString, int>*);
QStringList readCArray(QString text, QString label);
@@ -56,7 +56,12 @@ public:
// Returns the 1-indexed line number for the definition of scriptLabel in the scripts file at filePath.
// Returns 0 if a definition for scriptLabel cannot be found.
static int getScriptLineNumber(const QString &scriptLabel, const QString &filePath);
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 QString &removeStringLiterals(QString &text);
static QString &removeLineComments(QString &text, const QString &commentSymbol);
static QString &removeLineComments(QString &text, const QStringList &commentSymbols);
private:
QString root;