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

Method OffsetLocation

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

2423
2424// OffsetLocation returns the absolute location given the relative offset, if found.
2425func (rel *RelativeSource) OffsetLocation(offset int32) (common.Location, bool) {
2426 absOffset, found := rel.Source.LocationOffset(rel.absLoc)
2427 if !found {
2428 return common.NoLocation, false
2429 }
2430 return rel.Source.OffsetLocation(absOffset + offset)
2431}

Callers

nothing calls this directly

Calls 2

LocationOffsetMethod · 0.65
OffsetLocationMethod · 0.65

Tested by

no test coverage detected