Crate boa_ast

Source
Expand description

Boa’s boa_ast crate implements an ECMAScript abstract syntax tree.

§Crate Overview

boa_ast contains representations of Parse Nodes as defined by the ECMAScript spec. Some Parse Nodes are not represented by Boa’s AST, because a lot of grammar productions are only used to throw Early Errors, and don’t influence the evaluation of the AST itself.

Boa’s AST is mainly split in three main components: Declarations, Expressions and Statements, with StatementList being the primordial Parse Node that combines all of them to create a proper AST.

§About Boa

Boa is an open-source, experimental ECMAScript Engine written in Rust for lexing, parsing and executing ECMAScript/JavaScript. Currently, Boa supports some of the language. More information can be viewed at Boa’s website.

Try out the most recent release with Boa’s live demo playground.

§Boa Crates

Re-exports§

pub use self::declaration::Declaration;
pub use self::expression::Expression;
pub use self::keyword::Keyword;
pub use self::statement::Statement;

Modules§

declaration
The Declaration Parse Node, as defined by the spec.
expression
The Expression Parse Node, as defined by the spec.
function
This module contains Function and Class AST nodes.
keyword
The Keyword AST node, which represents reserved words of the ECMAScript language.
operations
Definitions of various Syntax-Directed Operations used in the spec.
pattern
A pattern binding or assignment node.
property
Property definition related types, used in object literals and class definitions.
scope
This module implements the binding scope for various AST nodes.
scope_analyzer
This module implements the scope analysis for the AST.
statement
The Statement Parse Node, as defined by the spec.
visitor
ECMAScript Abstract Syntax Tree visitors.

Macros§

try_break
Try-like conditional unwrapping of ControlFlow.

Structs§

Module
A Module source.
ModuleItemList
Module item list AST node.
Position
A position in the ECMAScript source code.
Script
A Script source.
Span
A span in the ECMAScript source code.
StatementList
List of statements.

Enums§

ModuleItem
Module item AST node.
Punctuator
All of the punctuators used in ECMAScript.
StatementListItem
An item inside a StatementList Parse Node, as defined by the spec.