syside.build_model
- build_model(document: syside.Document, language: syside.ModelLanguage | None = None) list[syside.Diagnostic]
Build the AST for
document
from itstext_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. Onlysysml
andkerml
languages are supported.This is a CST -> AST stage in the pipeline.
Raises
ValueError
if thedocument
has unsupported language, or it has no associatedtext_document
.