changed the structer of the selector components: now all case are a list value assigned as right operand of the selector operator

This commit is contained in:
2024-04-13 10:10:25 +02:00
parent efd9af9030
commit 70cdb9367e
4 changed files with 119 additions and 13 deletions
+1
View File
@@ -155,6 +155,7 @@ func TestParser(t *testing.T) {
/* 134 */ {`10 ? {"a"} : {"b"}`, nil, errors.New(`[1:3] no case catches the value (10) of the selection expression`)},
/* 135 */ {`10 ? {"a"} :: {"b"} : {"c"}`, nil, errors.New(`[1:22] selector-case outside of a selector context`)},
/* 136 */ {`1 ? {"a"} : {"b"} ? ["a"] {"A"} :["b"] {"B"}`, "B", nil},
/* 137 */ {`2 + 1 ? {"a"} : {"b"} * 3`, "2bbb", nil},
}
check_env_expr_path := 113