[][src]Module rslint_parser::ast

AST definitions for converting untyped syntax nodes into typed AST nodes.

Every field of every AST node is optional, this is to allow the parser to recover from any error and produce an ast from any source code. If you don't want to account for optionals for everything, you can use ...

Structs

ArgList
ArrayExpr
ArrayPattern
ArrowExpr
AssignExpr
AssignPattern
AstChildren

An iterator over SyntaxNode children of a particular AST type.

AwaitExpr
BinExpr
BlockStmt
BracketExpr
BreakStmt
CallExpr
CaseClause
CatchClause
ClassBody
ClassDecl
ClassExpr
Comment
ComputedPropertyName
CondExpr
Condition
ContinueStmt
DebuggerStmt
Declarator
DefaultClause
DoWhileStmt
DotExpr
EmptyStmt
ExportDecl
ExportDefaultDecl
ExportDefaultExpr
ExportNamed
ExportWildcard
ExprStmt
Finalizer
FnDecl
FnExpr
ForInStmt
ForOfStmt
ForStmt
ForStmtInit
ForStmtTest
ForStmtUpdate
Getter
GroupingExpr
IdentProp
IfStmt
ImportCall
ImportDecl
ImportMeta
InitializedProp
KeyValuePattern
LabelledStmt
Literal
LiteralProp
Method
Module
Name
NameRef
NamedImports
NewExpr
NewTarget
ObjectExpr
ObjectPattern
ParameterList
RestPattern
ReturnStmt
Script
SequenceExpr
Setter
SinglePattern
Specifier
SpreadElement
SpreadProp
StaticMethod
String
SuperCall
SwitchStmt
Template
TemplateElement
ThisExpr
ThrowStmt
TryStmt
UnaryExpr
VarDecl
WhileStmt
Whitespace
WildcardImport
WithStmt
YieldExpr

Enums

ArrowExprParams
AssignOp
BinOp

A binary operation applied to two expressions

ClassElement
Decl
DefaultDecl
Expr
ExprOrBlock
ExprOrSpread
ForHead

The beginning to a For or For..in statement which can either be a variable declaration or an expression

ImportClause
LiteralKind
MethodDefinition
ModuleItem
ObjectPatternProp
ObjectProp
Pattern
PatternOrExpr
PropName
Stmt
StmtListItem

Either a statement or a declaration such as a function

SwitchCase
UnaryOp

Traits

AstNode

The main trait to go from untyped SyntaxNode to a typed ast. The conversion itself has zero runtime cost: ast and syntax nodes have exactly the same representation: a pointer to the tree root and a pointer to the node itself.

AstToken

Like AstNode, but wraps tokens rather than interior nodes.