licoup_workflow/syntax.rs
1//! Workflow source parsing.
2//!
3//! Parsing is the generic engine pass; this module binds it to this crate's
4//! diagnostic record so parse failures carry the same `PreflightDiagnostic`
5//! spelling the rest of the crate surfaces.
6
7use crate::WorkflowValidationFailure;
8
9/// Parsed workflow source. The JSON value retains source-level field paths;
10/// semantic analysis consumes the canonical definition.
11pub type ParsedWorkflow = acativa::workflow::syntax::ParsedWorkflow;
12
13/// Parse one workflow source. Syntax and shape failures arrive as diagnostics
14/// in this crate's vocabulary.
15pub fn parse(source: &[u8]) -> Result<ParsedWorkflow, WorkflowValidationFailure> {
16 acativa::workflow::syntax::parse(source).map_err(WorkflowValidationFailure::from)
17}