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

Utilities for simple uses of the parser.

Macros

Structs

File represents a parse tree for a single Rust file.
A SmolStr is a string type that has the following properties:
A range in the text, represented as a pair of TextUnits.
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.
A token of Rust source.

Enums

The kind of syntax node, e.g. IDENT, USE_KW, or STRUCT_DEF.
WalkeEvent describes tree walking process.

Traits

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

Functions

Break a string up into its component tokens

Type Definitions