syside.build_model

build_model(document: syside.Document, language: syside.ModelLanguage | None = None) list[syside.Diagnostic]

Build the AST for document from its text_document. Any existing model will be cleared, and the built model will not have its references linked. Instead, most references will use placeholder references that will be replaced by actual targets in linking stage. Only sysml and kerml languages are supported.

This is a CST -> AST stage in the pipeline.

Raises ValueError if the document has unsupported language, or it has no associated text_document.