pub fn parse_file(
path: impl AsRef<Path>,
component_defs: &ComponentDefs,
) -> Result<ParseResult, Vec<ParseError>>Expand description
Parse a single spec file into a ParseResult.
Implements the full parsing pipeline:
- Preprocess (UTF-8 decode, BOM strip, CRLF normalize).
- Front matter extraction and deserialization.
- Markdown fence extraction (
supersigil-xml). - XML parsing and component extraction.
- Lint-time validation.
Stage 1 fatal errors prevent later stages. XML parse errors in one fence do not prevent other fences from being parsed.
ยงErrors
Returns Vec<ParseError> containing all detected errors across stages.