Parsed grouped expressions (that was easy!).

Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
Mariano Uvalle 2025-01-05 11:37:13 -08:00
parent c417e90f36
commit 4acc09faf9
2 changed files with 31 additions and 0 deletions

View file

@ -316,6 +316,26 @@ func TestOperatorPrecedenceParsing(t *testing.T) {
"3 < 5 == true",
"((3 < 5) == true)",
},
{
"1 + (2 + 3) + 4",
"((1 + (2 + 3)) + 4)",
},
{
"(5 + 5) * 2",
"((5 + 5) * 2)",
},
{
"2 / (5 + 5)",
"(2 / (5 + 5))",
},
{
"-(5 + 5)",
"(-(5 + 5))",
},
{
"!(true == true)",
"(!(true == true))",
},
}
for _, tt := range tests {