Parse generic numeric quantities in braces without adding unsupported Essence types

This commit is contained in:
Christian Daniel Jensen 2026-11-02 05:56:24 -07:00
parent 4632b1e017
commit ff660daa71

View file

@ -50,6 +50,18 @@ inline QStringList parseCost(const QString &cost)
const QString token = match.captured(1);
if (token.size() == 1 && isSymbol(token.at(0))) {
result.append(token);
} else {
// Numeric quantities may also be written in braces: {2}{N}.
bool isNumber = !token.isEmpty();
for (const QChar ch : token) {
if (!ch.isDigit()) {
isNumber = false;
break;
}
}
if (isNumber) {
result.append(token);
}
}
} else if (!match.captured(2).isEmpty()) {
result.append(match.captured(2));