Skip to main content

Module parser

Module parser 

Source
Expand description

Nom-based parser for SysML v2 textual notation.

Organized into modules:

  • [lex]: whitespace, comments, names, qualified names, skip helpers
  • [attribute]: attribute definition and usage
  • [import]: import and relationship body
  • [part]: part definition and part usage
  • [package]: package and root namespace

Structs§

ParseResult
Result of parsing with error recovery: a (possibly partial) AST and zero or more diagnostics.

Functions§

parse_root
Parse full input; must consume entire input. Strips UTF-8 BOM if present.
parse_with_diagnostics
Parse input with error recovery: collects multiple diagnostics and returns a partial AST when errors occur. Use this for language servers so the user sees all parse errors and features (e.g. hover) can use the partial AST.