dtzrttp/moonbit-rtl/src/source does not have a README file

    LineIndex

    pub(all) struct LineIndex {
    starts : Array[Int]
    ends : Array[Int]
    text_length : Int
    } derive(Eq,
    Debug
    )

    LineIndex::column_at

    fn LineIndex::column_at(self : LineIndex, offset : Int) -> Int

    LineIndex::contains_offset

    fn LineIndex::contains_offset(self : LineIndex, offset : Int) -> Bool

    LineIndex::line_at

    fn LineIndex::line_at(self : LineIndex, offset : Int) -> Int

    LineIndex::line_count

    fn LineIndex::line_count(self : LineIndex) -> Int

    LineIndex::line_ends

    fn LineIndex::line_ends(self : LineIndex) -> Array[Int]

    LineIndex::line_starts

    fn LineIndex::line_starts(self : LineIndex) -> Array[Int]

    LineIndex::offset_at

    fn LineIndex::offset_at(self : LineIndex, line : Int, column : Int) -> Int?

    LineIndex::span_for_line

    fn LineIndex::span_for_line(self : LineIndex, line : Int) -> Span?

    SourceBundle

    pub(all) struct SourceBundle {
    files : Array[SourceFile]
    }

    SourceBundle::add

    fn SourceBundle::add(self : SourceBundle, file : SourceFile) -> Unit

    SourceBundle::average_line_length

    fn SourceBundle::average_line_length(self : SourceBundle) -> Int

    SourceBundle::blank_lines

    fn SourceBundle::blank_lines(self : SourceBundle) -> Int

    SourceBundle::code_lines

    fn SourceBundle::code_lines(self : SourceBundle) -> Int

    SourceBundle::comment_lines

    fn SourceBundle::comment_lines(self : SourceBundle) -> Int

    SourceBundle::comment_only_files

    fn SourceBundle::comment_only_files(self : SourceBundle) -> Array[String]

    SourceBundle::contains_text

    fn SourceBundle::contains_text(self : SourceBundle, text : String) -> Bool

    SourceBundle::empty_files

    fn SourceBundle::empty_files(self : SourceBundle) -> Array[String]

    SourceBundle::file_count_with_extension

    fn SourceBundle::file_count_with_extension(self : SourceBundle, extension : String) -> Int

    SourceBundle::file_names_with_text

    fn SourceBundle::file_names_with_text(self : SourceBundle, text : String) -> Array[String]

    SourceBundle::file_with_most_code

    fn SourceBundle::file_with_most_code(self : SourceBundle) -> SourceSummary?

    SourceBundle::from_files

    fn SourceBundle::from_files(files : Array[SourceFile]) -> SourceBundle

    SourceBundle::get

    fn SourceBundle::get(self : SourceBundle, name : String) -> SourceFile?

    SourceBundle::has_duplicate_names

    fn SourceBundle::has_duplicate_names(self : SourceBundle) -> Bool

    SourceBundle::is_empty

    fn SourceBundle::is_empty(self : SourceBundle) -> Bool

    SourceBundle::largest_file

    fn SourceBundle::largest_file(self : SourceBundle) -> SourceSummary?

    SourceBundle::len

    fn SourceBundle::len(self : SourceBundle) -> Int

    SourceBundle::max_line_length

    fn SourceBundle::max_line_length(self : SourceBundle) -> Int

    SourceBundle::names

    fn SourceBundle::names(self : SourceBundle) -> Array[String]

    SourceBundle::new

    SourceBundle::normalized

    fn SourceBundle::normalized(self : SourceBundle) -> SourceBundle

    SourceBundle::quality_summary

    fn SourceBundle::quality_summary(self : SourceBundle) -> String

    SourceBundle::summaries

    fn SourceBundle::summaries(self : SourceBundle) -> Array[SourceSummary]

    SourceBundle::summary

    fn SourceBundle::summary(self : SourceBundle) -> String

    SourceBundle::summary_line

    fn SourceBundle::summary_line(self : SourceBundle) -> String

    SourceBundle::total_characters

    fn SourceBundle::total_characters(self : SourceBundle) -> Int

    SourceBundle::total_lines

    fn SourceBundle::total_lines(self : SourceBundle) -> Int

    SourceBundle::with_prefix

    fn SourceBundle::with_prefix(self : SourceBundle, prefix : String) -> SourceBundle

    SourceFile

    pub(all) struct SourceFile {
    file_name : String
    text : String
    }

    SourceFile::character_count

    fn SourceFile::character_count(self : SourceFile) -> Int

    Return the number of characters in the source text.

    SourceFile::contains_offset

    fn SourceFile::contains_offset(self : SourceFile, offset : Int) -> Bool

    Return whether an offset can identify a position in the source text.

    SourceFile::line_col

    fn SourceFile::line_col(self : SourceFile, offset : Int) -> (Int, Int)

    SourceFile::line_count

    fn SourceFile::line_count(self : SourceFile) -> Int

    Return the number of logical lines in a source file.

    SourceFile::line_index

    fn SourceFile::line_index(self : SourceFile) -> LineIndex

    SourceFile::line_text

    fn SourceFile::line_text(self : SourceFile, offset : Int) -> String

    Return the complete line containing an offset, without its newline.

    SourceFile::lines

    fn SourceFile::lines(self : SourceFile) -> Array[String]

    Return all source lines in order, retaining empty lines.

    SourceFile::name

    fn SourceFile::name(self : SourceFile) -> String

    SourceFile::new

    fn SourceFile::new(file_name : String, text : String) -> SourceFile

    SourceFile::normalized

    fn SourceFile::normalized(self : SourceFile) -> SourceFile

    SourceFile::offset_after_text

    fn SourceFile::offset_after_text(self : SourceFile, text : String) -> Int?

    SourceFile::offset_line_column

    fn SourceFile::offset_line_column(self : SourceFile, offset : Int) -> (Int, Int)

    SourceFile::slice

    fn SourceFile::slice(self : SourceFile, span : Span) -> String

    SourceFile::span_text

    fn SourceFile::span_text(self : SourceFile, line : Int) -> String?

    SourceFile::summary

    fn SourceFile::summary(self : SourceFile) -> SourceSummary

    SourceFile::text

    fn SourceFile::text(self : SourceFile) -> String

    SourceSummary

    pub(all) struct SourceSummary {
    file_name : String
    lines : Int
    characters : Int
    blank_lines : Int
    comment_lines : Int
    code_lines : Int
    max_line_length : Int
    } derive(Eq,
    Debug
    )

    Span

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

    Span::is_empty

    fn Span::is_empty(self : Span) -> Bool

    Span::length

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

    Span::new

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

    source_span_union

    fn source_span_union(left : Span, right : Span) -> Span

    source_spans_union

    fn source_spans_union(spans : Array[Span]) -> Span?