Crate ra_ap_parser

Source
Expand description

The Rust parser.

NOTE: The crate is undergoing refactors, don’t believe everything the docs say :-)

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§

T

Structs§

Input
Input for the parser – a sequence of tokens.
LexedStr
Output
Output of the parser – a DFS traversal of a concrete syntax tree.
Reparser
A parsing function for a specific braced-block.

Enums§

Edition
PrefixEntryPoint
Parse a prefix of the input as a given syntactic construct.
Step
StrStep
SyntaxKind
The kind of syntax node, e.g. IDENT, USE_KW, or STRUCT.
TopEntryPoint
Parse the whole of the input as a given syntactic construct.