Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
loomc_source_range_t Struct Reference

Source range attached to a diagnostic. More...

#include <diagnostic.h>

Data Fields

const loomc_source_tsource
 Source handle that owns or identifies the bytes.
loomc_host_size_t start
 First byte in source contents covered by the range.
loomc_host_size_t end
 One-past-last byte in source contents covered by the range.
uint32_t start_line
 One-based starting line, or zero when unavailable.
uint32_t start_column
 One-based starting column, or zero when unavailable.
uint32_t end_line
 One-based ending line, or zero when unavailable.
uint32_t end_column
 One-based ending column, or zero when unavailable.

Detailed Description

Source range attached to a diagnostic.

Byte offsets are zero-based and line/column values are one-based when available. A zero line or column means the location was not computed or is not meaningful for the source format.

Lifetime
The source pointer is retained by the owning result when present. The range view remains valid until that result is released.

The documentation for this struct was generated from the following file: