ignore multi line comments when reading C defines (courtesy WWMB)
This commit is contained in:
parent
1605609bf3
commit
e2fd490c52
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