Sign in

    moonrockz/gleam-parser/span does not have a README file

    Position

    pub(all) struct Position {
    line : Int
    column : Int
    } derive(Eq, Hash,
    Debug
    )

    A line and column in a source text. Both are 1-based; the column counts code points (a surrogate pair is one column), as the compiler's error output does.

    Position::new

    fn Position::new(line : Int, column : Int) -> Position

    SrcSpan

    pub(all) struct SrcSpan {
    start : Int
    end : Int
    } derive(Eq, Hash,
    Debug
    )

    A half-open range of UTF-8 byte offsets in a source text, start included and end excluded, as the Gleam compiler's SrcSpan.

    SrcSpan::contains

    fn SrcSpan::contains(self : SrcSpan, byte : Int) -> Bool

    Whether byte lies in the span: start <= byte < end.

    SrcSpan::length

    fn SrcSpan::length(self : SrcSpan) -> Int

    The number of bytes in the span.

    SrcSpan::new

    fn SrcSpan::new(start : Int, end : Int) -> SrcSpan

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io