Crate parse_tree [] [src]

parse_tree is a library to represent so-called parse tree. A parse tree is a non-abstract AST: it's a generic syntax tree which remembers all whitespace, comments and other trivia.

Modules

search

Macros

symbols

Structs

BottomUpBuilder

A builder for creating parse trees by a bottom-up walk over the tree nodes.

Children
Node

A reference to a node in a parse tree.

ParseTree

The parse tree for a single source file.

Symbol

A type of a syntactic construct, including both leaf tokens and composite nodes, like "a comma" or "a function".

TextRange

A range of text in a source file

TextUnit

An text position in a source file

Token

A token of source code.

TopDownBuilder

A builder for creating parse trees by a top-down walk over the tree nodes. Each start_internal call must be paired with a finish_internal call. Nodes created within a pair of start_internal / finish_internal calls become children of the internal node.

Functions

debug_dump

Debug representation of a subtree at node.