Debian Codegraph @

common/types/iterator.go

raw symbols SCIP
1 // Copyright 2018 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 package typesscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/
16
17 import (
18 "fmtscip-go gomod github.com/golang/go/src go1.23.0 fmt/"
19 "reflectscip-go gomod github.com/golang/go/src go1.23.0 reflect/"
20
21 "github.com/google/cel-go/common/types/refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/"
22 "github.com/google/cel-go/common/types/traitsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/"
23 )
24
25 var (
26 // IteratorType singleton.
27 IteratorTypescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/IteratorType. = NewObjectTypescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/NewObjectType().("iterator", traitsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/.IteratorTypescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/IteratorType.)
28 )
29
30 // baseIterator is the basis for list, map, and object iterators.
31 //
32 // An iterator in and of itself should not be a valid value for comparison, but must implement the
33 // `ref.Val` methods in order to be well-supported within instruction arguments processed by the
34 // interpreter.
35 type baseIteratorscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/baseIterator# struct{}
36
37 func (*baseIteratorscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/baseIterator#) ConvertToNativescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/baseIterator#ConvertToNative().(typeDesc reflectscip-go gomod github.com/golang/go/src go1.23.0 reflect/.Typescip-go gomod github.com/golang/go/src go1.23.0 reflect/Type#) (any, error) {
38 return nil, fmtscip-go gomod github.com/golang/go/src go1.23.0 fmt/.Errorfscip-go gomod github.com/golang/go/src go1.23.0 fmt/Errorf().("type conversion on iterators not supported")
39 }
40
41 func (*baseIteratorscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/baseIterator#) ConvertToTypescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/baseIterator#ConvertToType().(typeVal refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Typescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Type#) refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val# {
42 return NewErrscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/NewErr().("no such overload")
43 }
44
45 func (*baseIteratorscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/baseIterator#) Equalscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/baseIterator#Equal().(other refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#) refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val# {
46 return NewErrscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/NewErr().("no such overload")
47 }
48
49 func (*baseIteratorscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/baseIterator#) Typescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/baseIterator#Type().() refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Typescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Type# {
50 return IteratorTypescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/IteratorType.
51 }
52
53 func (*baseIteratorscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/baseIterator#) Valuescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types`/baseIterator#Value().() any {
54 return nil
55 }