Capstone.Vendor.Sourceror.Range (Capstone v0.33.3)

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() :: %Capstone.Vendor.Sourceror.Range{
  end: Capstone.Vendor.Sourceror.position(),
  start: Capstone.Vendor.Sourceror.position()
}

Functions

new(start_pos, end_pos)

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

Creates a new range struct.

Examples

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