Next: , Previous: , Up: Software Evolution Library Index   [Contents][Index]


A.64 SOFTWARE-EVOLUTION-LIBRARY/UTILITY/RANGE

Generic Function: contains [sel/utility/range] range location

Return true if range fully subsumes location.

Generic Function: intersects [sel/utility/range] a-range b-range

Return true if a-range and b-range intersect.

Function: position->source-location [sel/utility/range] string pos &optional newlines

Translate pos, a position in string, into a source location object. If newlines is provided, it should be the value returned for string by ‘precompute-newline-offsets’.

Function: precompute-newline-offsets [sel/utility/range] string

Precompute a cache of newline offsets in string. Can be used by ‘position->source-location’ and ‘source-location->position’.

Generic Function: range [sel/utility/range] map

Returns the range of the map, that is, the set of all values to which keys are mapped by the map.

Generic Function: source-< [sel/utility/range] a b

Return true if source location A comes strictly before b.

Generic Function: source-<= [sel/utility/range] a b

Return true if source location A is equal to or comes before b.

Generic Function: source-= [sel/utility/range] a b

Return true if source location A is equal to b.

Generic Function: source-> [sel/utility/range] a b

Return true if source location A comes strictly after b.

Generic Function: source->= [sel/utility/range] a b

Return true if source location A is equal to or comes after b.

Function: source-location->position [sel/utility/range] text location &optional newlines

Translate location, a source location, into a position in text. Note the position may actually point beyond text if the source location has an extra newline, which can happen because ‘source-range‘ addresses a node that ends in a newline as (n+1,1).

If newlines is provided it should be the value returned for text by ‘precompute-newline-offsets’.

Generic Function: source-range-subseq [sel/utility/range] string source-range &optional newlines

Get the subsequence of string corresponding to source-range. If newlines is provided it should be the value returned for string by ‘precompute-newline-offsets’.

Method: source-range-subseq [sel/utility/range] (line-octets vector) source-range &optional newlines &aux (start (begin source-range)) (end (end source-range))

Get the subsequence of line-octets corresponding to source-range.


Next: , Previous: , Up: Software Evolution Library Index   [Contents][Index]