Sign in

    moonrockz/diagrams-mermaid/ast does not have a README file

    Activation

    pub(all) enum Activation {
    Activate
    Deactivate
    } derive(Eq,
    Debug
    )

    The activation shorthand of a message: + or - after the arrow.

    Activation::equal

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

    Activation::not_equal

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

    Autonumber

    pub(all) enum Autonumber {
    On(start~ : String?, step~ : String?)
    Off
    } derive(Eq,
    Debug
    )

    An autonumber statement. The numbers keep their spelling.

    Autonumber::equal

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

    Autonumber::not_equal

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

    Box

    pub(all) struct Box {
    label : String
    statements : ReadOnlyArray[Statement]
    } derive(Eq,
    Debug
    )

    A box group: the text after box and the participant statements in it.

    Box::equal

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

    Box::not_equal

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

    Box::to_repr

    Diagram

    pub(all) struct Diagram {
    front_matter : String?
    directives : ReadOnlyArray[String]
    statements : ReadOnlyArray[Statement]
    } derive(Eq,
    Debug
    )

    The typed AST of a Mermaid sequence diagram. front_matter is the front matter block with its --- lines. directives are the %%{...}%% directives in source order. Comments are not in the AST.

    Diagram::equal

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

    Diagram::new

    fn Diagram::new(statements : ArrayView[Statement], front_matter? : String, directives? : ArrayView[String]) -> Diagram

    A diagram with copies of statements and directives.

    Diagram::not_equal

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

    Diagram::to_repr

    Frame

    pub(all) struct Frame {
    kind : FrameKind
    sections : ReadOnlyArray[Section]
    } derive(Eq,
    Debug
    )

    A frame such as loop, alt or rect, with one or more sections.

    Frame::equal

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

    Frame::not_equal

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

    Frame::to_repr

    FrameKind

    pub(all) enum FrameKind {
    Loop
    Rect
    Opt
    Alt
    Par
    ParOver
    Critical
    Break
    } derive(Eq,
    Debug
    )

    The kind of a frame.

    FrameKind::equal

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

    FrameKind::not_equal

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

    LinkKind

    pub(all) enum LinkKind {
    Link
    Links
    Properties
    Details
    } derive(Eq,
    Debug
    )

    The keyword of a link-like statement.

    LinkKind::equal

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

    LinkKind::not_equal

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

    LinkKind::to_repr

    LinkStatement

    pub(all) struct LinkStatement {
    kind : LinkKind
    participant : String
    text : String
    } derive(Eq,
    Debug
    )

    A link, links, properties or details statement. text is the text after : as written, for example JSON for links.

    LinkStatement::equal

    LinkStatement::not_equal

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

    MessageStatement

    pub(all) struct MessageStatement {
    sender : String
    arrow : String
    receiver : String
    text : String
    activation : Activation?
    central_before : Bool
    central_after : Bool
    } derive(Eq,
    Debug
    )

    A message statement. arrow keeps the exact spelling of the source, and text has no spaces at its ends. central_before and central_after are the () central connection markers before and after the arrow.

    MessageStatement::equal

    MessageStatement::not_equal

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

    NoteStatement

    pub(all) struct NoteStatement {
    placement : Placement
    participants : ReadOnlyArray[String]
    text : String
    } derive(Eq,
    Debug
    )

    A note on one participant, or over one or two participants.

    NoteStatement::equal

    NoteStatement::not_equal

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

    ParticipantDecl

    pub(all) struct ParticipantDecl {
    created : Bool
    keyword : ParticipantKeyword
    id : String
    config : String?
    label : String?
    } derive(Eq,
    Debug
    )

    A participant or actor statement. created is true for the create form. config is the text inside @{...} without the spaces at its ends.

    ParticipantDecl::equal

    ParticipantDecl::not_equal

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

    ParticipantKeyword

    pub(all) enum ParticipantKeyword {
    Participant
    Actor
    } derive(Eq,
    Debug
    )

    The keyword of a participant declaration.

    ParticipantKeyword::equal

    ParticipantKeyword::not_equal

    Placement

    pub(all) enum Placement {
    LeftOf
    RightOf
    Over
    } derive(Eq,
    Debug
    )

    Where a note is.

    Placement::equal

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

    Placement::not_equal

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

    Section

    pub(all) struct Section {
    label : String
    statements : ReadOnlyArray[Statement]
    } derive(Eq,
    Debug
    )

    One section of a frame: the text after its keyword and its statements. The first section starts at the frame keyword, and each else, and or option starts another one.

    Section::equal

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

    Section::not_equal

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

    Section::to_repr

    Statement

    pub(all) struct Statement {
    kind : StatementKind
    span :
    Span

    } derive(
    Debug
    )

    One statement and its place in the source. Equality does not compare span, so two sources with the same statements have equal ASTs.
    impl Eq for Statement

    Statement::equal

    fn Statement::equal(a : Statement, b : Statement) -> Bool

    Statement::not_equal

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

    StatementKind

    pub(all) enum StatementKind {
    Participant(ParticipantDecl)
    Destroy(String)
    Activate(String)
    Deactivate(String)
    Message(MessageStatement)
    Note(NoteStatement)
    Link(LinkStatement)
    Title(String)
    AccTitle(String)
    AccDescr(String)
    Autonumber(Autonumber)
    Frame(Frame)
    Box(Box)
    } derive(Eq,
    Debug
    )

    What a statement says.

    StatementKind::equal

    StatementKind::not_equal

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

    lower

    The typed AST of a lossless syntax tree. Error nodes are not in the AST, because the parser already reported them. A tree without the sequenceDiagram header gives None.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io