range_format {transltr}R Documentation

Source Ranges

Description

Create, parse, and validate source ranges.

Usage

range_format(x = location())

range_parse(ranges = character())

range_is_parseable(ranges = character())

Arguments

x

A Location object.

ranges

A character vector of non-NA and non-empty values. The ranges to extract pairs of indices (line, column) from.

Details

Ranges are ⁠Ln <int>, Col <int> @ Ln <int>, Col <int>⁠ strings created on-the-fly from Location objects for outputting purposes.

Value

range_format() returns a character vector. It assumes that x is valid.

range_parse() returns a list having the same length as ranges. Each element is an integer vectors containing 4 non-NA values (unless the underlying range is invalid).

range_is_parseable() returns a logical vector having the same length as ranges.

See Also

Location, ExportedLocation,


[Package transltr version 0.1.0 Index]