Expand description
§rsexpr
Small and simple S-expression parsing and manipulation with support for square-bracketed groups and strings. Used by syntastica for processing tree-sitter queries.
Have a look at Sexpr, OwnedSexpr, from_slice, and from_slice_multi for more
information.
§Features
comments— Include comments in the parsed tree and pretty-printed outputdocs— Meant to be enabled when building docs
Structs§
- Owned
Sexprs - A thin wrapper around
Vec<OwnedSexpr>with its ownDisplayimplementation. SeeOwnedSexprfor more information. - Sexprs
- A thin wrapper around
Vec<Sexpr>with its ownDisplayimplementation. SeeSexprfor more information.
Enums§
- Error
- The crate error type.
- Owned
Sexpr - An owned version of
Sexpr. You can convert to and fromSexprusing theFromtrait. - Paren
Kind - A kind of parentheses. Used in
Error::MissingClosingParenandError::ExtraClosingParento indicate the kind of parentheses that caused the error. - Sexpr
- A single node of the tree. The
AtomandStringvariants reference the input slice. For an owned version have a look atOwnedSexpr.
Functions§
- from_
slice - Parse a
Sexprfrom bytes. This fails if there is more than one S-expression in the input. To allow an arbitrary amount of S-expressions, have a look atfrom_slice_multi. - from_
slice_ multi - Parse multiple
Sexprs from bytes. To only parse a single one, have a look atfrom_slice.