Crate ra_syntax

Source
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§

token_set
token_set_union

Structs§

AtomEdit
File
File represents a parse tree for a single Rust file.
SmolStr
A SmolStr is a string type that has the following properties:
SyntaxError
SyntaxNode
TextRange
A range in the text, represented as a pair of TextUnits.
TextUnit
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
SyntaxKind
The kind of syntax node, e.g. IDENT, USE_KW, or STRUCT_DEF.
WalkEvent
WalkeEvent describes tree walking process.

Traits§

TreeRoot
A marker trait to distinguish between owned and borrowed trees. You don’t need to implement it yourself, use existing OwnedRoot or RefRoot.

Functions§

tokenize
Break a string up into its component tokens

Type Aliases§

OwnedRoot
RefRoot
SyntaxNodeRef