[][src]Crate sise

SISE (Simple S-expression) is a file format based on S-expressions.

Macros

sise_expr

Macro to define trees of nodes with a lighter syntax.

Structs

AtomReadUtil

Utility to read atom nodes.

Builder

Helper struct to build SISE trees and get index paths of the inserted nodes.

BuilderBase

Base struct from which Builder are created. See Builder example.

CompactStringWriter

Writer that writes everything into a single line string.

ListReadUtil

Read util list

Parser

Parser that decodes a SISE file from memory.

Pos

Represents a position in a text file.

PosTree

Maps nodes with their positions in the source.

PosTreeList
ReadItem
ReprPosValue

Wrapper whose Display implementation prints self.0 + 1, taking care of overflow.

SpacedStringWriter

Writer that writes everything into a multi-line string.

SpacedStringWriterNodeOptions
SpacedStringWriterStyle
VoidWriterOptions

Type to be used as AtomOpts, BeginListOpts, EndListOpts or FinishOpts in Writer when there are no options.

Enums

Node

A SISE node.

NodeReadUtil

Utility to read nodes from a Reader.

ParseError

Represents a parse error.

ReadItemKind
ReadUtilError
TokenKind

Traits

Reader

A trait to allow reading SISE nodes from a generic source. See example from Parser.

WriteFromTreeAtomOptions
Writer

A trait to allow writing SISE nodes into a generic destination.

Functions

check_atom

Checks whether atom is a valid atom (i.e. matches the regular expression documented at Node::Atom).

is_atom_chr

Returns whether chr is a valid atom character outside a string (i.e. one of :atomchar: documented at Node::Atom).

is_atom_string_chr

Returns whether chr is a valid atom character inside a string, excluding " and \ (i.e. one of :stringchar: documented at Node::Atom).

read_into_tree

Reads from reader and builds a tree of Node. It also returns a position map that allows to fetch the source position of each node.

read_into_tree_without_pos

Reads from reader and builds a tree of Node. Unlike read_tree, it does not return a position tree.

write_from_tree

Write the tree of nodes root_node into writer.