Expand description
Structs§
- Error
- Structured parse/build failure.
- Format
Options - Options for the generic token-preserving formatter.
- Lexer
- Streaming lexer for the KiCad DSN-style dialect.
- Patch
- One source-preserving replacement over UTF-8 byte offsets.
- Position
- One-based source line/column plus a zero-based byte offset.
- Token
- A token borrowing its exact text from the input.
Enums§
- Error
Kind - Stable error classification for programmatic diagnostics.
- Error
Phase - The phase that produced an S-expression error.
- Sexp
- Owned compatibility tree produced on demand.
- Token
Kind - Borrowed lexical token category.
Functions§
- apply_
patches - Apply sorted, non-overlapping source patches.
- apply_
patches_ with_ limit - Apply sorted, non-overlapping patches while bounding result bytes.
- build
- Deterministically build a KiCad S-expression from an owned tree.
- build_
with_ limit - Deterministically build while refusing to allocate beyond an output limit.
- format
- Reformat source tokens without materializing an owned expression tree.
- lex
- Collect borrowed tokens for diagnostics and compatibility tests.
- parse
- Parse one UTF-8 KiCad S-expression.
- parse_
bytes - Parse bytes after validating UTF-8.
- utf8_
text - Validate bytes and borrow them as UTF-8 without constructing a syntax tree.