Expand description
The high-level API of the crate: the operations the decl command line
offers, in the same vocabulary — evaluate binds inputs and returns
outputs, check, validate, evaluate_source, format_source — for
programs that would otherwise assemble parser, checker, and engine by
hand (those modules are public too). The npm package and the Python
package offer the same functions with the same semantics.
Re-exports§
pub use crate::pipeline::evaluate_source;pub use crate::pipeline::Report;
Structs§
- Decl
Error - An operation failed;
diagnosticscarries the report (empty for a usage error such as an unknown input or root). - Diagnostic
- One diagnostic, in the report’s field order (§12.2).
- Evaluate
Options - What
evaluatebinds and returns.
Enums§
- Document
- A document to bind to an input: the path of a JSON file, or its JSON text.
Functions§
- check
- Parse and statically check entry files (module-aware); empty means clean.
- evaluate
- Evaluate a module: bind the input documents, run the pipeline, and return the requested roots’ documents (canonical JSON text) by name. Fails with the diagnostics on any error-severity outcome.
- format_
source - The canonical formatting of a source text; fails when it does not parse.
- validate
- Validate a file: static checks, then evaluation with the input documents bound; returns every diagnostic (all severities). Fails when the file does not parse.