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

This commit is contained in:
BigBahss
2020-11-22 01:04:46 -05:00
parent 3478846b60
commit 4aaae1a264
6 changed files with 67 additions and 20 deletions

View File

@@ -40,8 +40,8 @@ class ParseUtil
public:
ParseUtil();
void set_root(QString);
QString readTextFile(QString);
void strip_comment(QString*);
static QString readTextFile(QString);
static void strip_comment(QString*);
QList<QStringList>* parseAsm(QString);
int evaluateDefine(QString, QMap<QString, int>*);
QStringList readCArray(QString text, QString label);
@@ -54,6 +54,10 @@ public:
bool tryParseJsonFile(QJsonDocument *out, QString filepath);
bool ensureFieldsExist(QJsonObject obj, QList<QString> fields);
// 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);
private:
QString root;
QString text;