Sourceror.Range (Catalyst v1.0.0-beta.2)

Copy Markdown View Source

Represents a start/end position in a source file as :line and :column keyword lists.

Summary

Functions

Creates a new range struct.

Types

t()

@type t() :: %Sourceror.Range{end: Sourceror.position(), start: Sourceror.position()}

Functions

new(start_pos, end_pos)

@spec new(start_pos :: Sourceror.position(), end_pos :: Sourceror.position()) :: t()

Creates a new range struct.

Examples

iex> Sourceror.Range.new([line: 1, column: 1], [line: 1, column: 2])
%Sourceror.Range{start: [line: 1, column: 1], end: [line: 1, column: 2]}