ignore multi line comments when reading C defines (courtesy WWMB)
This commit is contained in:
parent
596216d5fb
commit
a2e3d17dbb
1 changed files with 1 additions and 1 deletions
|
@ -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>.+)");
|
||||
|
|
Loading…
Reference in a new issue