moonrockz/diagrams-mermaid/syntax
Types
ParseResult
pub struct ParseResult {
tree : @moonrockz/diagrams-mermaid/cst.Node
diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
}The lossless syntax tree of a source and the syntax diagnostics.
Values
arrows
let arrows : ReadOnlyArray[String]The arrows of the Mermaid 12.2.0 sequence grammar. The scanner takes the longest arrow that matches.
diagnostic_codes
let diagnostic_codes : ReadOnlyArray[String]Every diagnostic code that the parser gives.
parse
fn parse(source : String) -> ParseResultParse a Mermaid sequence diagram, as the Mermaid 12.2.0 grammar reads it.
The text of the tree is always equal to source. A statement that does not
parse becomes an error node with a diagnostic, and the parser continues at
the next statement.