added checks for operator precedence with function

call
This commit is contained in:
Karma Riuk
2025-07-15 20:09:08 +02:00
parent 2b811a4bb9
commit 20b2c4a818

View File

@@ -241,6 +241,11 @@ TEST_SUITE("Parser: expression") {
{"2 / (5 + 5)", "(2 / (5 + 5))"}, {"2 / (5 + 5)", "(2 / (5 + 5))"},
{"-(5 + a)", "(-(5 + a))"}, {"-(5 + a)", "(-(5 + a))"},
{"!(true == true)", "(!(true == true))"}, {"!(true == true)", "(!(true == true))"},
{"a + add(b * c) + d", "((a + add((b * c))) + d)"},
{"add(a, b, 1, 2 * 3, 4 + 5, add(6, 7 * 8))",
"add(a, b, 1, (2 * 3), (4 + 5), add(6, (7 * 8)))"},
{"add(a + b + c * d / f + g)",
"add((((a + b) + ((c * d) / f)) + g))"},
}; };
for (auto& t : tests) { for (auto& t : tests) {