Fix uppercase B and X parsing in the integer literals.

This commit is contained in:
bruvzg
2025-02-04 09:51:10 +02:00
committed by Pāvels Nadtočajevs
parent c394eaa45c
commit 3be46a69c4
8 changed files with 31 additions and 19 deletions

View File

@@ -213,6 +213,15 @@ TEST_CASE("[Expression] Underscored numeric literals") {
CHECK_MESSAGE(
expression.parse("0xff_99_00") == OK,
"The expression should parse successfully.");
CHECK_MESSAGE(
expression.parse("0Xff_99_00") == OK,
"The expression should parse successfully.");
CHECK_MESSAGE(
expression.parse("0b10_11_00") == OK,
"The expression should parse successfully.");
CHECK_MESSAGE(
expression.parse("0B10_11_00") == OK,
"The expression should parse successfully.");
}
TEST_CASE("[Expression] Built-in functions") {