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

Method OffsetRanges

common/ast/ast.go:344–349  ·  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

342// only. If the range only captures start position, the stop position of the range will be equal to
343// the start.
344func (s *SourceInfo) OffsetRanges() map[int64]OffsetRange {
345 if s == nil {
346 return map[int64]OffsetRange{}
347 }
348 return s.offsetRanges
349}
350
351// GetOffsetRange retrieves an OffsetRange for the given expression id if one exists.
352func (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