Crate ra_ap_parser[−][src]
Expand description
The Rust parser.
The parser doesn’t know about concrete representation of tokens and syntax
trees. Abstract TokenSource
and TreeSink
traits are used instead.
As a consequence, this crate does not contain a lexer.
The Parser
struct from the parser
module is a cursor into the
sequence of tokens. Parsing routines use Parser
to inspect current
state and advance the parsing.
The actual parsing happens in the [grammar
] module.
Tests for this crate live in the syntax
crate.
Macros
Structs
A parsing function for a specific braced-block.
Token
abstracts the cursor of TokenSource
operates on.
Enums
rust-analyzer parser allows you to choose one of the possible entry points.
The kind of syntax node, e.g. IDENT
, USE_KW
, or STRUCT
.
Traits
TokenSource
abstracts the source of the tokens parser operates on.
TreeSink
abstracts details of a particular syntax tree implementation.
Functions
Parse given tokens into the given sink as a rust file.