Completed transition of the symbol '|' from fraction to operator binary or. New fraction symbol is ':'.

Also, fixed and improved some parsing sections concerning collection indeces and ranges
This commit is contained in:
2024-12-23 06:59:39 +01:00
parent f50ddf48db
commit 6211be8a8f
10 changed files with 109 additions and 93 deletions
+4 -2
View File
@@ -16,11 +16,13 @@ func TestCollections(t *testing.T) {
/* 3 */ {`"abcdef"[1:]`, "bcdef", nil},
/* 4 */ {`"abcdef"[:]`, "abcdef", nil},
// /* 5 */ {`[0,1,2,3,4][:]`, ListType{int64(0), int64(1), int64(2), int64(3), int64(4)}, nil},
/* 5 */ {`"abcdef"[1:2:3]`, nil, `[1:14] left operand '(1, 2)' [pair] and right operand '3' [integer] are not compatible with operator ":"`},
/* 5 */ {`"abcdef"[1:2:3]`, nil, `[1:14] invalid range specification`},
/* 6 */ {`"abcdef"[((1>0)?{1}:{0}):3]`, "bc", nil},
/* 7 */ {`"abcdef"[[0,1][0]:1]`, "a", nil},
}
t.Setenv("EXPR_PATH", ".")
// parserTestSpec(t, section, inputs, 5)
// runTestSuiteSpec(t, section, inputs, 5)
runTestSuite(t, section, inputs)
}