Fix is_valid_float, Variant parser, Expression parser, script highlighter, and TextServer not handing capital E in scientific notation.

This commit is contained in:
Pāvels Nadtočajevs
2025-02-03 19:35:10 +02:00
parent a63a8b430b
commit b50d9742c2
10 changed files with 52 additions and 35 deletions

View File

@ -181,6 +181,9 @@ TEST_CASE("[Expression] Scientific notation") {
CHECK_MESSAGE(
expression.parse("2.e5") == OK,
"The expression should parse successfully.");
CHECK_MESSAGE(
expression.parse("2.E5") == OK,
"The expression should parse successfully.");
CHECK_MESSAGE(
double(expression.execute()) == doctest::Approx(200'000),
"The expression should return the expected result.");