Struct SourceRange

Struct Documentation

struct SourceRange

Original UTF-8 byte and decoded-scalar ranges; indices are logical source positions, not visual glyph positions.

Public Functions

bool operator==(const SourceRange&) const = default

Declaration: [[nodiscard]]

Compare both original byte and decoded scalar ranges by value.

Public Members

std::size_t byte_offset = {}

Zero-based original byte offset.

std::size_t byte_count = {}

Number of original bytes represented.

std::size_t scalar_offset = {}

Zero-based decoded scalar offset.

std::size_t scalar_count = {}

Number of decoded scalars represented.