MCPcopy Create free account
hub / github.com/cel-expr/cel-go / OffsetRanges

Method OffsetRanges

common/ast/ast.go:352–357  ·  view source on GitHub ↗

OffsetRanges returns a map of expression id to OffsetRange values where the range indicates either: the start and end position in the input stream where the expression occurs, or the start position only. If the range only captures start position, the stop position of the range will be equal to the s

()

Source from the content-addressed store, hash-verified

350// only. If the range only captures start position, the stop position of the range will be equal to
351// the start.
352func (s *SourceInfo) OffsetRanges() map[int64]OffsetRange {
353 if s == nil {
354 return map[int64]OffsetRange{}
355 }
356 return s.offsetRanges
357}
358
359// GetOffsetRange retrieves an OffsetRange for the given expression id if one exists.
360func (s *SourceInfo) GetOffsetRange(id int64) (OffsetRange, bool) {

Callers 8

NewStringMethod · 0.80
TestCompose_UnnestFunction · 0.80
TestCheckFunction · 0.80
TestParseFunction · 0.80
CopyASTAndMetadataMethod · 0.80
ClearUnusedIDsMethod · 0.80
SourceInfoToProtoFunction · 0.80

Calls

no outgoing calls

Tested by 4

TestCompose_UnnestFunction · 0.64
TestCheckFunction · 0.64
TestParseFunction · 0.64