Expand description
An experimental implementation of Rust RFC#2256 libsyntax2.0.
The intent is to be an IDE-ready parser, i.e. one that offers
- easy and fast incremental re-parsing,
- graceful handling of errors, and
- maintains all information in the source file.
For more information, see [the RFC][rfc#2265], or the working draft.
Re-exports§
pub use crate::ast::AstNode;
Modules§
- algo
- ast
- text_
utils - utils
- Utilities for simple uses of the parser.
Macros§
Structs§
- Atom
Edit - File
- File represents a parse tree for a single Rust file.
- SmolStr
- A
SmolStr
is a string type that has the following properties: - Syntax
Error - Syntax
Node - Text
Range - A range in the text, represented as a pair of
TextUnit
s. - Text
Unit - An offset into text.
Offset is represented as
u32
storing number of utf8-bytes, but most of the clients should treat it like opaque measure. - Token
- A token of Rust source.
Enums§
- Direction
- Syntax
Kind - The kind of syntax node, e.g.
IDENT
,USE_KW
, orSTRUCT_DEF
. - Walk
Event WalkeEvent
describes tree walking process.
Traits§
- Tree
Root - A marker trait to distinguish between owned and borrowed
trees. You don’t need to implement it yourself,
use existing
OwnedRoot
orRefRoot
.
Functions§
- tokenize
- Break a string up into its component tokens