Skip to main content

Crate supersigil_parser

Crate supersigil_parser 

Source
Expand description

Parsing pipeline for supersigil spec documents.

Documents use standard Markdown with supersigil-xml fenced code blocks for component markup.

Modules§

util
Shared utility functions used across parser stages. Shared utility functions for the parser crate.

Structs§

MarkdownFences
Collected fences from Markdown parsing.
RecoveredParse
A recovered parse result that may include a partial document alongside fatal validation errors.
XmlFence
A fenced code block with language supersigil-xml.

Enums§

FrontMatterResult
Result of deserializing YAML front matter.
XmlNode
A parsed XML node from a supersigil-xml fence.

Functions§

deserialize_front_matter
Deserialize YAML front matter, extracting the supersigil: namespace and preserving extra metadata keys.
extract_components_from_xml
Walk parsed XML nodes and extract known components as ExtractedComponent values.
extract_front_matter
Detect and extract YAML front matter between --- delimiters.
extract_markdown_fences
Parse a Markdown body and extract supersigil-xml fenced code blocks.
normalize
Strip BOM and normalize CRLF → LF in already-decoded text.
parse_content
Parse a spec document from an in-memory string into a ParseResult.
parse_content_recovering
Parse a spec document from an in-memory string into a ParseResult.
parse_file
Parse a single spec file into a ParseResult.
parse_supersigil_xml
Parse the content of a supersigil-xml fence into structured XML nodes.
preprocess
Stage 1: Preprocess raw bytes — decode UTF-8, strip BOM, normalize CRLF to LF.
validate_components
Validate extracted components against the known component definitions.