Documentation
¶
Overview ¶
Package model loads a SysML v2 model from a folder of files: it parses them in-process as one model, reports the parser's diagnostics, and opens the result for reading through package sysml (DS-2, DS-4).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoModelFiles = errors.New("no model files")
ErrNoModelFiles is returned when the model folder holds no model files (ER-3).
var ErrNoSuchElement = sysml.ErrNoSuchElement
ErrNoSuchElement is sysml.ErrNoSuchElement.
Functions ¶
This section is empty.
Types ¶
type DiagnosticsError ¶
type DiagnosticsError struct {
// Errors are the error diagnostics, each as "file:line:col: error: message".
Errors []string
}
DiagnosticsError reports a model with errors (ER-2).
func (*DiagnosticsError) Error ¶
func (e *DiagnosticsError) Error() string
type Folder ¶
type Folder struct {
Dir string
// Logger receives debug records (stage durations); nil uses slog.Default.
Logger *slog.Logger
}
Folder is a folder of *.sysml and *.kerml files, searched recursively and parsed in-process as one model.
type Model ¶
type Model struct {
// Files are the model files parsed, in the order given to the parser.
Files []string
// Warnings are the parser's diagnostics below error severity, each as
// "file:line:col: severity: message".
Warnings []string
*sysml.Model
}
Model is a loaded model: the files it came from, the parser's warnings, and the model read through package sysml, whose methods it has. Close releases the engine.
type Representation ¶
type Representation = sysml.Representation
The read layer moved to package sysml; these names stay while callers move to it.