added parsing and testing for grouped expressions

This commit is contained in:
Karma Riuk
2025-07-12 15:22:45 +02:00
parent ab17545c93
commit 86574552aa
3 changed files with 24 additions and 0 deletions

View File

@@ -236,6 +236,11 @@ TEST_SUITE("Parser: expression") {
"((3 + (4 * 5)) == ((3 * 1) + (4 * 5)))"},
{"3 > 5 == false", "((3 > 5) == false)"},
{"3 < 5 == true", "((3 < 5) == true)"},
{"1 + (2 + 3)", "(1 + (2 + 3))"},
{"(1 + a) * 17", "((1 + a) * 17)"},
{"2 / (5 + 5)", "(2 / (5 + 5))"},
{"-(5 + a)", "(-(5 + a))"},
{"!(true == true)", "(!(true == true))"},
};
for (auto& t : tests) {