mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-22 00:26:37 -05:00
ignore multi line comments when reading C defines (courtesy WWMB)
This commit is contained in:
@@ -1968,7 +1968,7 @@ QString Project::readCIncbin(QString text, QString label) {
|
||||
|
||||
QMap<QString, int> Project::readCDefines(QString text, QStringList prefixes) {
|
||||
ParseUtil parser;
|
||||
text.replace(QRegularExpression("//.*"), "");
|
||||
text.replace(QRegularExpression("(//.*)|(\\/+\\*+[^*]*\\*+\\/+)"), "");
|
||||
QMap<QString, int> allDefines;
|
||||
QMap<QString, int> filteredDefines;
|
||||
QRegularExpression re("#define\\s+(?<defineName>\\w+)[^\\S\\n]+(?<defineValue>.+)");
|
||||
|
||||
Reference in New Issue
Block a user