moonrockz/diagrams-mermaid/swimlane-ast

Types

Chain

pub(all) struct Chain {
  endpoints : ReadOnlyArray[ReadOnlyArray[NodeDecl]]
  links : ReadOnlyArray[Link]
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Chain::equal

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

Source

Chain::not_equal

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

Source

Chain::to_repr

fn Chain::to_repr(Chain) -> @moonbitlang/core/debug.Repr

Source

Diagram

pub struct Diagram {
  direction : String?
  front_matter : String?
  directives : ReadOnlyArray[String]
  statements : ReadOnlyArray[Statement]
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Diagram::equal

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

Source

Diagram::new

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

Source

Diagram::not_equal

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

Source

Diagram::to_repr

fn Diagram::to_repr(Diagram) -> @moonbitlang/core/debug.Repr

Source

pub(all) struct Link {
  spelling : String
  label : String
  label_kind : String
  id : String?
  source_marker : String
  target_marker : String
  style : String
  length : Int
} derive(@moonbitlang/core/debug.Debug)

Source

Link::equal

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

Source

Link::not_equal

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

Source

Link::to_repr

fn Link::to_repr(Link) -> @moonbitlang/core/debug.Repr

Source

impl Eq for Link

Eq::equal

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

Source

NodeDecl

pub(all) struct NodeDecl {
  id : String
  label : String?
  label_kind : String
  shape : String?
  metadata : ReadOnlyArray[(String, Json)]
  classes : ReadOnlyArray[String]
  spelling : String
} derive(@moonbitlang/core/debug.Debug)

Source

NodeDecl::equal

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

Source

NodeDecl::not_equal

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

Source

NodeDecl::to_repr

fn NodeDecl::to_repr(NodeDecl) -> @moonbitlang/core/debug.Repr

Source

impl Eq for NodeDecl

Eq::equal

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

Source

Statement

pub(all) struct Statement {
  kind : StatementKind
  spelling : String
  span : @moonrockz/diagrams.Span
} derive(@moonbitlang/core/debug.Debug)

Source

Statement::equal

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

Source

Statement::not_equal

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

Source

Statement::to_repr

fn Statement::to_repr(Statement) -> @moonbitlang/core/debug.Repr

Source

impl Eq for Statement

Eq::equal

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

Source

StatementKind

pub(all) enum StatementKind {
  Nodes(ReadOnlyArray[NodeDecl])
  Edges(Chain)
  Subgraph(id~ : String, label~ : String)
  End
  Direction(String)
  Title(String)
  AccTitle(String)
  AccDescription(String)
  Metadata(keyword~ : String, text~ : String)
  Comment(String)
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

StatementKind::equal

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

Source

StatementKind::not_equal

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

Source

StatementKind::to_repr

fn StatementKind::to_repr(StatementKind) -> @moonbitlang/core/debug.Repr

Source

Values

canonical_json

fn canonical_json(value : Json, depth_limit? : Int, work_limit? : Int, output_limit? : Int) -> String?

Stable, bounded JSON spelling for typed metadata. The explicit stack also handles caller-constructed values without recursive host-stack traversal.

Source

canonical_yaml

fn canonical_yaml(value : Json, depth_limit? : Int, work_limit? : Int, output_limit? : Int) -> String?

Write typed metadata as block YAML, because the pinned native shape-data lexer closes at the first unquoted '}'. An explicit stack bounds traversal.

Source