Lines Matching refs:rangeValue
811 return rangeValue{start: start, stop: stop, step: step, len: rangeLen(start, stop, step)}, nil
817 type rangeValue struct{ start, stop, step, len int } argument
820 _ Indexable = rangeValue{}
821 _ Sequence = rangeValue{}
822 _ Comparable = rangeValue{}
823 _ Sliceable = rangeValue{}
826 func (r rangeValue) Len() int { return r.len } argument
827 func (r rangeValue) Index(i int) Value { return MakeInt(r.start + i*r.step) } argument
828 func (r rangeValue) Iterate() Iterator { return &rangeIterator{r, 0} } argument
848 func (r rangeValue) Slice(start, end, step int) Value { argument
852 return rangeValue{
860 func (r rangeValue) Freeze() {} // immutable argument
861 func (r rangeValue) String() string { argument
870 func (r rangeValue) Type() string { return "range" } argument
871 func (r rangeValue) Truth() Bool { return r.len > 0 } argument
872 func (r rangeValue) Hash() (uint32, error) { return 0, fmt.Errorf("unhashable: range") } argument
874 func (x rangeValue) CompareSameType(op syntax.Token, y_ Value, depth int) (bool, error) { argument
875 y := y_.(rangeValue)
886 func rangeEqual(x, y rangeValue) bool { argument
900 func (r rangeValue) contains(x Int) bool { argument
911 r rangeValue