mirror of
https://github.com/huderlem/porymap.git
synced 2026-03-21 17:45:44 -05:00
Fix parser not recognizing hex numbers with prefix '0X'
This commit is contained in:
parent
560d204890
commit
591b7c2055
|
|
@ -11,6 +11,7 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp
|
|||
### Fixed
|
||||
- Fix duplicated maps writing the wrong name.
|
||||
- Fix small maps being difficult to see while resizing.
|
||||
- Fix expressions using the prefix '0X' as opposed to '0x' not being recognized has hex numbers.
|
||||
|
||||
## [6.0.0] - 2025-05-26
|
||||
### Breaking Changes
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ QList<Token> ParseUtil::tokenizeExpression(QString expression) {
|
|||
QList<Token> tokens;
|
||||
|
||||
static const QStringList tokenTypes = {"hex", "decimal", "identifier", "operator", "leftparen", "rightparen"};
|
||||
static const QRegularExpression re("^(?<hex>0x[0-9a-fA-F]+)|(?<decimal>[0-9]+)|(?<identifier>[a-zA-Z_0-9]+)|(?<operator>[+\\-*\\/<>|^%]+)|(?<leftparen>\\()|(?<rightparen>\\))");
|
||||
static const QRegularExpression re("^(?<hex>0[xX][0-9a-fA-F]+)|(?<decimal>\\d+)|(?<identifier>\\w+)|(?<operator>[+\\-*\\/<>|^%]+)|(?<leftparen>\\()|(?<rightparen>\\))");
|
||||
|
||||
expression = expression.trimmed();
|
||||
while (!expression.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user