parse C defines with line breaks

This commit is contained in:
garak 2019-06-03 21:29:09 -04:00
parent 14a92c4c16
commit 1e5ac54147

View file

@ -272,6 +272,7 @@ QMap<QString, int> ParseUtil::readCDefines(QString filename, QStringList prefixe
}
text.replace(QRegularExpression("(//.*)|(\\/+\\*+[^*]*\\*+\\/+)"), "");
text.replace(QRegularExpression("(\\\\\\s+)"), "");
QRegularExpression re("#define\\s+(?<defineName>\\w+)[^\\S\\n]+(?<defineValue>.+)");
QRegularExpressionMatchIterator iter = re.globalMatch(text);