Linked-list: added support for operators '<<' and '>>'. Also fixed list insertion: ['x'] >> [1,2] must return [1,2,['x'], not [1,2,'x']; use $([]) to flat a list

This commit is contained in:
2026-05-22 06:46:04 +02:00
parent ac5c97bfd3
commit 4b2b573420
4 changed files with 48 additions and 31 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ func evalRightShift(ctx kern.ExprContext, opTerm *scan.Term) (v any, err error)
}
if v, err = bitRightShift(opTerm, leftValue, rightValue); err != nil {
v, err = prependToList(ctx, opTerm, leftValue, rightValue)
v, err = prependToList(opTerm, leftValue, rightValue)
}
return
}
@@ -74,7 +74,7 @@ func evalLeftShift(ctx kern.ExprContext, opTerm *scan.Term) (v any, err error) {
}
if v, err = bitLeftShift(opTerm, leftValue, rightValue); err != nil {
v, err = appendToList(ctx, opTerm, leftValue, rightValue)
v, err = appendToList(opTerm, leftValue, rightValue)
}
return
}