linked-list supports index assign and concatenation
This commit is contained in:
+3
-3
@@ -14,11 +14,11 @@ import (
|
||||
|
||||
// -------- range term
|
||||
type intPair struct {
|
||||
a, b int
|
||||
a, b int64
|
||||
}
|
||||
|
||||
func (p *intPair) TypeName() string {
|
||||
return kern.TypePair
|
||||
return kern.TypeIntPair
|
||||
}
|
||||
|
||||
func (p *intPair) ToString(opt kern.FmtOpt) string {
|
||||
@@ -70,7 +70,7 @@ func evalRange(ctx kern.ExprContext, opTerm *scan.Term) (v any, err error) {
|
||||
startIndex, _ := leftValue.(int64)
|
||||
endIndex, _ := rightValue.(int64)
|
||||
|
||||
v = &intPair{int(startIndex), int(endIndex)}
|
||||
v = &intPair{startIndex, endIndex}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user