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

Method OffsetLocation

parser/parser_test.go:2686–2692  ·  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

2684
2685// OffsetLocation returns the absolute location given the relative offset, if found.
2686func (rel *RelativeSource) OffsetLocation(offset int32) (common.Location, bool) {
2687 absOffset, found := rel.Source.LocationOffset(rel.absLoc)
2688 if !found {
2689 return common.NoLocation, false
2690 }
2691 return rel.Source.OffsetLocation(absOffset + offset)
2692}

Callers

nothing calls this directly

Calls 2

LocationOffsetMethod · 0.65
OffsetLocationMethod · 0.65

Tested by

no test coverage detected