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

Method OffsetLocation

parser/parser_test.go:3956–3962  ·  view source on GitHub ↗

OffsetLocation returns the absolute location given the relative offset, if found.

(offset int32)

Source from the content-addressed store, hash-verified

3954
3955// OffsetLocation returns the absolute location given the relative offset, if found.
3956func (rel *RelativeSource) OffsetLocation(offset int32) (common.Location, bool) {
3957 absOffset, found := rel.Source.LocationOffset(rel.absLoc)
3958 if !found {
3959 return common.NoLocation, false
3960 }
3961 return rel.Source.OffsetLocation(absOffset + offset)
3962}

Callers

nothing calls this directly

Calls 2

LocationOffsetMethod · 0.65
OffsetLocationMethod · 0.65

Tested by

no test coverage detected