alias operators: '<<' same as '<+', '>>' same as '+>'. Insert and append operation optimized with linked lists

This commit is contained in:
2026-05-16 17:18:23 +02:00
parent 3a4e217891
commit e6844ad1e8
7 changed files with 386 additions and 34 deletions
+4 -1
View File
@@ -54,10 +54,13 @@ func TestListParser(t *testing.T) {
/* 38 */ {`[0,1,2,3,4][3:-1]`, kern.NewListA(int64(3)), nil},
/* 30 */ {`[0,1,2,3,4][-3:-1]`, kern.NewListA(int64(2), int64(3)), nil},
/* 40 */ {`[0,1,2,3,4][0:]`, kern.NewListA(int64(0), int64(1), int64(2), int64(3), int64(4)), nil},
/* 41 */ {`[0] << $([1,2,3,4])`, kern.NewListA(int64(0), int64(1), int64(2), int64(3), int64(4)), nil},
/* 42 */ {`L=[]; [1] >> L; L`, kern.NewListA(), nil},
/* 43 */ {`L=[]; L << [1]; L`, kern.NewListA(), nil},
}
// t.Setenv("EXPR_PATH", ".")
// runTestSuiteSpec(t, section, inputs, 1)
// runTestSuiteSpec(t, section, inputs, 42)
runTestSuite(t, section, inputs)
}