moonrockz/diagrams-plantuml/activity
Types
Conversion
pub struct Conversion {
flowchart : @moonrockz/diagrams/flowchart.Flowchart?
diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
}Dialect
pub(all) enum Dialect {
Modern
Legacy
} derive(Eq, @moonbitlang/core/debug.Debug)The native PlantUML activity grammar selected by the document.
Dialect::equal
fn Dialect::equal(Dialect, Dialect) -> BoolDialect::not_equal
fn Dialect::not_equal(x : Dialect, y : Dialect) -> BoolDialect::to_repr
fn Dialect::to_repr(Dialect) -> @moonbitlang/core/debug.ReprDocument
pub struct Document {
dialect : Dialect
name : String?
statements : ReadOnlyArray[@moonrockz/diagrams-plantuml/envelope.Statement]
items : ReadOnlyArray[Statement]
} derive(Eq, @moonbitlang/core/debug.Debug)Document::equal
fn Document::equal(Document, Document) -> BoolDocument::logical_equal
fn Document::logical_equal(self : Document, other : Document) -> BoolDocument::new
fn Document::new(dialect : Dialect, items : ArrayView[Statement], name? : String, statements? : ArrayView[@moonrockz/diagrams-plantuml/envelope.Statement]) -> DocumentDocument::not_equal
fn Document::not_equal(x : Document, y : Document) -> BoolDocument::to_repr
fn Document::to_repr(Document) -> @moonbitlang/core/debug.ReprDocument::without_spans
fn Document::without_spans(self : Document) -> DocumentEndpoint
pub(all) enum Endpoint {
Start(Bool)
Final
Action(String, String?, String)
Alias(String)
Synchronization(String)
} derive(Eq, @moonbitlang/core/debug.Debug)Endpoint::equal
fn Endpoint::equal(Endpoint, Endpoint) -> BoolEndpoint::not_equal
fn Endpoint::not_equal(x : Endpoint, y : Endpoint) -> BoolEndpoint::to_repr
fn Endpoint::to_repr(Endpoint) -> @moonbitlang/core/debug.ReprKind
pub(all) enum Kind {
Action(String, String, String)
Start
Stop
End
If(String, String)
ElseIf(String, String)
ElseIfIncoming(String, String, String)
Else(String)
EndIf
Switch(String)
Case(String)
EndSwitch
While(String, String)
EndWhile(String)
Repeat(String)
RepeatWhile(String, String, String)
Backward(String)
Break
Fork
ForkAgain
EndFork(Bool, String)
Split
SplitAgain
EndSplit
Kill
Detach
Connector(String)
Label(String)
Goto(String)
Group(String, String, String, String)
EndGroup
Lane(String, String, String)
Note(String, String, String?, String)
NoteOnLink(String, String)
Arrow(String, String)
Edge(Endpoint?, String, Endpoint, String)
LegacyIf(String)
LegacyDecision(Endpoint?, String, String, String)
ActionList(String, Int)
Presentation(String)
} derive(Eq, @moonbitlang/core/debug.Debug)Typed statements retain control structure and editable values. The sequence is flat: opening and closing statements retain their native source order.
Kind::equal
fn Kind::equal(Kind, Kind) -> BoolKind::not_equal
fn Kind::not_equal(x : Kind, y : Kind) -> BoolKind::to_repr
fn Kind::to_repr(Kind) -> @moonbitlang/core/debug.ReprReadResult
pub struct ReadResult {
nodes : ReadOnlyArray[@moonrockz/diagrams-plantuml/cst.Node]
document : Document?
diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
}Statement
pub struct Statement {
kind : Kind
span : @moonrockz/diagrams.Span?
} derive(Eq, @moonbitlang/core/debug.Debug)Statement::equal
fn Statement::equal(Statement, Statement) -> BoolStatement::new
fn Statement::new(kind : Kind, span? : @moonrockz/diagrams.Span) -> StatementStatement::not_equal
fn Statement::not_equal(x : Statement, y : Statement) -> BoolStatement::to_repr
fn Statement::to_repr(Statement) -> @moonbitlang/core/debug.ReprValues
diagnostic_codes
let diagnostic_codes : ReadOnlyArray[String]print_body
fn print_body(document : Document, limits? : @moonrockz/diagrams-plantuml/envelope.Limits) -> Result[String, ReadOnlyArray[@moonrockz/diagrams.Diagnostic]]Write the body from typed values. Invalid delimiters cannot be represented safely and return a finding rather than stale source.
read
fn read(scan : @moonrockz/diagrams-plantuml/envelope.Scan, limits? : @moonrockz/diagrams-plantuml/envelope.Limits, dialect? : Dialect) -> ReadResultRead the activity lines of an already scanned envelope. dialect is
required for body-only calls; full blocks can select it from statements.
to_flowchart
fn to_flowchart(document : Document, id? : String, limits? : @moonrockz/diagrams-plantuml/envelope.Limits) -> ConversionConvert native syntax to explicit structural topology. Expressions remain descriptive; pending continuation sets never execute source conditions.