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 ownDisplay
implementation. SeeOwnedSexpr
for more information. - Sexprs
- A thin wrapper around
Vec<Sexpr>
with its ownDisplay
implementation. SeeSexpr
for more information.
Enums§
- Error
- The crate error type.
- Owned
Sexpr - An owned version of
Sexpr
. You can convert to and fromSexpr
using theFrom
trait. - Paren
Kind - A kind of parentheses. Used in
Error::MissingClosingParen
andError::ExtraClosingParen
to indicate the kind of parentheses that caused the error. - Sexpr
- A single node of the tree. The
Atom
andString
variants reference the input slice. For an owned version have a look atOwnedSexpr
.
Functions§
- from_
slice - Parse a
Sexpr
from 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
Sexpr
s from bytes. To only parse a single one, have a look atfrom_slice
.