Sign in

    moonrockz/diagrams-plantuml/data does not have a README file

    Resolution

    pub struct Resolution {
    highlights : Array[
    Highlight
    ]
    diagnostics : Array[
    Diagnostic
    ]
    complete : Bool
    }

    The result of selector resolution.

    Segment

    pub(all) enum Segment {
    Name(String)
    Occurrence(String, Int)
    Any
    Deep
    } derive(Eq,
    Debug
    )

    One segment of a #highlight path.

    Segment::equal

    fn Segment::equal(Segment, Segment) -> Bool

    Segment::not_equal

    fn Segment::not_equal(x : Segment, y : Segment) -> Bool

    Segment::to_repr

    Selector

    pub struct Selector {
    segments : ReadOnlyArray[Segment]
    stereotype : String?
    span :
    Span
    ?
    } derive(Eq,
    Debug
    )

    A typed #highlight selector. The stereotype is inert author metadata; library themes paint every highlight.

    Selector::equal

    fn Selector::equal(Selector, Selector) -> Bool

    Selector::is_plain

    fn Selector::is_plain(self : Selector) -> Bool

    True when the selector has no wildcard and no occurrence number.

    Selector::logical_equal

    fn Selector::logical_equal(self : Selector, other : Selector) -> Bool

    Equality without the source span.

    Selector::new

    fn Selector::new(segments : ArrayView[Segment], stereotype? : String, span? :
    Span
    ) -> Selector

    A selector. The constructor copies segments.

    Selector::not_equal

    fn Selector::not_equal(x : Selector, y : Selector) -> Bool

    Selector::to_line

    fn Selector::to_line(self : Selector) -> String

    The canonical source line of the selector, without a line break. Names are quoted, so /, * and < in a name stay literal.

    Selector::to_repr

    is_highlight_line

    fn is_highlight_line(text : String) -> Bool

    True when the trimmed line is a #highlight statement.

    member_id

    fn member_id(path : ArrayView[Int]) -> String

    The identity of the member occurrence at an ownership path, for example m/0/2. Member identities never use names or scalar text.

    parse_selector

    fn parse_selector(line : String) -> Result[Selector, String]

    Parse the text of a #highlight line. A quoted segment keeps /, < and > inside the segment and accepts \", \\ and \* escapes. A quoted * or ** without escapes is a wildcard, as upstream. Upstream PlantUML splits on every / before it removes quotes; this library does not, so a quoted name that contains / selects one member.

    read_selectors

    Read the selectors of the #highlight statement lines of a scan. A line that does not parse gives an error with the code <prefix>/invalid-highlight.

    resolve

    fn resolve(tree :
    DataTree
    , selectors : ArrayView[Selector], prefix : String, work_limit? : Int) -> Resolution

    Resolve selectors to member identities of tree, in document order. A selector that selects nothing gives a warning and no highlight. A plain selector that selects more than one member occurrence highlights all of them and gives a warning. A stereotype is kept as inert style metadata and gives a warning that it is not applied. Codes use prefix, for example json/unresolved-highlight.

    value_id

    fn value_id(path : ArrayView[Int]) -> String

    The identity of the value at an ownership path. The root value is v; the value of member 2 of the value of root member 0 is v/0/2.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io