On this page

class webpack.javascript.JavascriptParser extends Parser

Defines the parser state base type used by this module.

new JavascriptParser(sourceType?, options?): JavascriptParser
Attributes
sourceType:"module" | "auto" | "script"
default source type
parse:(code: string, options: ParseOptions) => ParseResult
typescript:boolean

Creates an instance of JavascriptParser.

Attributes
destructuringAssignmentProperties:WeakMap<Expression, Set<DestructuringAssignmentProperty>>
hooks:Readonly<{ assign: HookMap<SyncBailHook<[AssignmentExpression], boolean | void>>; assignMemberChain: HookMap<SyncBailHook<[AssignmentExpression, string[]], boolean | void>>; binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>; blockPreStatement: SyncBailHook<[ImportDeclaration | ExportNamedDeclaration | ExportAllDeclaration | FunctionDeclaration | MaybeNamedFunctionDeclaration | VariableDeclaration | ClassDeclaration | MaybeNamedClassDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | ExportDefaultDeclaration], boolean | void>; call: HookMap<SyncBailHook<[CallExpression], boolean | void>>; callMemberChain: HookMap<SyncBailHook<[CallExpression, string[], boolean[], [number, number][]], boolean | void>>; callMemberChainOfCallMemberChain: HookMap<SyncBailHook<[CallExpression, string[], CallExpression, string[], [number, number][]], boolean | void>>; canRename: HookMap<SyncBailHook<[Expression], boolean | void>>; classBodyElement: SyncBailHook<[StaticBlock | MethodDefinition | PropertyDefinition, ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration], boolean | void>; classBodyValue: SyncBailHook<[Expression, MethodDefinition | PropertyDefinition, ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration], boolean | void>; classExtendsExpression: SyncBailHook<[Expression, ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration], boolean | void>; collectDestructuringAssignmentProperties: SyncBailHook<[Expression], boolean | void>; collectGuards: SyncBailHook<[Expression], void | ((walk: () => void) => void)>; declarator: SyncBailHook<[VariableDeclarator, Statement], boolean | void>; evaluate: HookMap<SyncBailHook<[ImportExpressionImport | UnaryExpression | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UpdateExpression | YieldExpression | SpreadElement | PrivateIdentifier | Super], undefined | null | BasicEvaluatedExpression>>; evaluateCallExpression: HookMap<SyncBailHook<[CallExpression], undefined | null | BasicEvaluatedExpression>>; evaluateCallExpressionMember: HookMap<SyncBailHook<[CallExpression, BasicEvaluatedExpression], undefined | null | BasicEvaluatedExpression>>; evaluateDefinedIdentifier: HookMap<SyncBailHook<[Identifier | MemberExpression | ThisExpression], undefined | null | BasicEvaluatedExpression>>; evaluateIdentifier: HookMap<SyncBailHook<[Identifier | MemberExpression | MetaProperty | ThisExpression], undefined | null | BasicEvaluatedExpression>>; evaluateNewExpression: HookMap<SyncBailHook<[NewExpression], undefined | null | BasicEvaluatedExpression>>; evaluateTypeof: HookMap<SyncBailHook<[UnaryExpression], undefined | null | BasicEvaluatedExpression>>; export: SyncBailHook<[ExportNamedDeclaration | ExportDefaultDeclaration], boolean | void>; exportDeclaration: SyncBailHook<[ExportNamedDeclaration | ExportAllDeclaration | ExportDefaultDeclaration, Declaration], boolean | void>; exportExpression: SyncBailHook<[ExportDefaultDeclaration, ImportExpressionImport | UnaryExpression | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UpdateExpression | YieldExpression | MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration], boolean | void>; exportImport: SyncBailHook<[ExportNamedDeclaration | ExportAllDeclaration, ImportSource], boolean | void>; exportImportSpecifier: SyncBailHook<[ExportNamedDeclaration | ExportAllDeclaration, ImportSource, null | string, null | string, undefined | number], boolean | void>; exportSpecifier: SyncBailHook<[ExportNamedDeclaration | ExportAllDeclaration | ExportDefaultDeclaration, string, string, undefined | number], boolean | void>; expression: HookMap<SyncBailHook<[Expression], boolean | void>>; expressionConditionalOperator: SyncBailHook<[ConditionalExpression], boolean | void>; expressionLogicalOperator: SyncBailHook<[LogicalExpression], boolean | void>; expressionMemberChain: HookMap<SyncBailHook<[MemberExpression, string[], boolean[], [number, number][]], boolean | void>>; finish: SyncBailHook<[Program, CommentJavascriptParser[]], boolean | void>; import: SyncBailHook<[ImportDeclaration, ImportSource], boolean | void>; importCall: SyncBailHook<[ImportExpressionJavascriptParser, undefined | SimpleCallExpression | NewExpression], boolean | void>; importSpecifier: SyncBailHook<[ImportDeclaration, ImportSource, null | string, string], boolean | void>; isPure: HookMap<SyncBailHook<[ImportExpressionImport | UnaryExpression | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UpdateExpression | YieldExpression | PrivateIdentifier | FunctionDeclaration | MaybeNamedFunctionDeclaration | VariableDeclaration | ClassDeclaration | MaybeNamedClassDeclaration, number], boolean | void>>; label: HookMap<SyncBailHook<[LabeledStatement], boolean | void>>; memberChainOfCallMemberChain: HookMap<SyncBailHook<[Expression, string[], CallExpression, string[], [number, number][]], boolean | void>>; new: HookMap<SyncBailHook<[NewExpression], boolean | void>>; optionalChaining: SyncBailHook<[ChainExpression], boolean | void>; pattern: HookMap<SyncBailHook<[Identifier], boolean | void>>; preDeclarator: SyncBailHook<[VariableDeclarator, VariableDeclaration], boolean | void>; preStatement: SyncBailHook<[ImportDeclaration | ExportNamedDeclaration | ExportAllDeclaration | FunctionDeclaration | MaybeNamedFunctionDeclaration | VariableDeclaration | ClassDeclaration | MaybeNamedClassDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | ExportDefaultDeclaration], boolean | void>; program: SyncBailHook<[Program, CommentJavascriptParser[]], boolean | void>; rename: HookMap<SyncBailHook<[Expression], boolean | void>>; statement: SyncBailHook<[ImportDeclaration | ExportNamedDeclaration | ExportAllDeclaration | FunctionDeclaration | MaybeNamedFunctionDeclaration | VariableDeclaration | ClassDeclaration | MaybeNamedClassDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | ExportDefaultDeclaration], boolean | void>; statementIf: SyncBailHook<[IfStatement], boolean | void>; terminate: SyncBailHook<[ReturnStatement | ThrowStatement], boolean | void>; topLevelAwait: SyncBailHook<[ImportExpressionImport | UnaryExpression | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UpdateExpression | YieldExpression | ForOfStatement], boolean | void>; typeof: HookMap<SyncBailHook<[Expression], boolean | void>>; unhandledExpressionMemberChain: HookMap<SyncBailHook<[MemberExpression, string[]], boolean | void>>; unusedStatement: SyncBailHook<[Statement], boolean | void>; varDeclaration: HookMap<SyncBailHook<[Identifier], boolean | void>>; varDeclarationConst: HookMap<SyncBailHook<[Identifier], boolean | void>>; varDeclarationLet: HookMap<SyncBailHook<[Identifier], boolean | void>>; varDeclarationUsing: HookMap<SyncBailHook<[Identifier], boolean | void>>; varDeclarationVar: HookMap<SyncBailHook<[Identifier], boolean | void>> }>
magicCommentContext:Context
options:{ parse?: (code: string, options: ParseOptions) => ParseResult; typescript?: boolean }
prevStatement:ClassDeclaration | MaybeNamedClassDeclaration | ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | FunctionDeclaration | MaybeNamedFunctionDeclaration | ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | VariableDeclaration
scope:ScopeInfo
semicolons:Set<number>
sourceType:"module" | "auto" | "script"
statementPath:StatementPathItem[]
ALLOWED_MEMBER_TYPES_ALL:3
ALLOWED_MEMBER_TYPES_CALL_EXPRESSION:1
ALLOWED_MEMBER_TYPES_EXPRESSION:2
getImportAttributes:(node: ImportDeclaration | ExportNamedDeclaration | ExportAllDeclaration | ImportExpressionJavascriptParser) => Record<string, string> | undefined
Gets import attributes.
VariableInfo:typeof VariableInfo
VariableInfoFlags:Readonly<{ Evaluated: 0; Free: 1; Normal: 2; Tagged: 4 }>
blockPreWalkClassDeclaration(statement): void
Attributes
statement:ClassDeclaration | MaybeNamedClassDeclaration
class declaration
Returns:void

Block pre walk class declaration.


blockPreWalkExportDefaultDeclaration(statement): void
Attributes
statement:ExportDefaultDeclaration
statement
Returns:void

Block pre walk export default declaration.


blockPreWalkExportNamedDeclaration(statement): void
Attributes
statement:ExportNamedDeclaration
statement
Returns:void

Block pre walk export named declaration.


blockPreWalkExpressionStatement(statement): void
Attributes
statement:ExpressionStatement
expression statement
Returns:void

Block pre walk expression statement.


blockPreWalkStatement(statement): void
Attributes
statement:ClassDeclaration | MaybeNamedClassDeclaration | FunctionDeclaration | MaybeNamedFunctionDeclaration | ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | VariableDeclaration
statement
Returns:void

Block pre walk statement.


blockPreWalkStatements(statements): void
Attributes
statements:(ClassDeclaration | FunctionDeclaration | ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | VariableDeclaration)[]
statements
Returns:void

Block pre walking iterates the scope for block variable declarations


blockPreWalkVariableDeclaration(statement): void
Attributes
statement:VariableDeclaration
variable declaration
Returns:void

Block pre walk variable declaration.


callHooksForExpression(hookMap, expr, ...args?): R | undefined
Attributes
hookMap:HookMap<SyncBailHook<T, R, UnsetAdditionalOptions>>
hooks the should be called
expr:ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | Super
expression
args:AsArray<T>
args for the hook
Returns:R | undefined
result of hook

Call hooks for expression.


callHooksForExpressionWithFallback(hookMap, expr, fallback, defined, ...args?): R | undefined
Attributes
hookMap:HookMap<SyncBailHook<T, R, UnsetAdditionalOptions>>
hooks the should be called
expr:ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | Super
expression info
fallback:((name: string, rootInfo: string | VariableInfo | ScopeInfo, getMembers: () => string[]) => R) | undefined
callback when variable in not handled by hooks
defined:((result?: string) => R | undefined) | undefined
callback when variable is defined
args:AsArray<T>
args for the hook
Returns:R | undefined
result of hook

Call hooks for expression with fallback.


callHooksForInfo(hookMap, info, ...args?): R | undefined
Attributes
hookMap:HookMap<SyncBailHook<T, R, UnsetAdditionalOptions>>
hooks that should be called
variable info
args:AsArray<T>
args for the hook
Returns:R | undefined
result of hook

Call hooks for info.


callHooksForInfoWithFallback(hookMap, info, fallback, defined, ...args?): R | undefined
Attributes
hookMap:HookMap<SyncBailHook<T, R, UnsetAdditionalOptions>>
hooks the should be called
variable info
fallback:((name: string) => R | undefined) | undefined
callback when variable in not handled by hooks
defined:((result?: string) => R | undefined) | undefined
callback when variable is defined
args:AsArray<T>
args for the hook
Returns:R | undefined
result of hook

Call hooks for info with fallback.


callHooksForName(hookMap, name, ...args?): R | undefined
Attributes
hookMap:HookMap<SyncBailHook<T, R, UnsetAdditionalOptions>>
hooks the should be called
name:string
key in map
args:AsArray<T>
args for the hook
Returns:R | undefined
result of hook

Call hooks for name.


callHooksForNameWithFallback(hookMap, name, fallback, defined, ...args?): R | undefined
Attributes
hookMap:HookMap<SyncBailHook<T, R, UnsetAdditionalOptions>>
hooks the should be called
name:string
key in map
fallback:((value: string) => R | undefined) | undefined
callback when variable in not handled by hooks
defined:(() => R) | undefined
callback when variable is defined
args:AsArray<T>
args for the hook
Returns:R | undefined
result of hook

Call hooks for name with fallback.


defineVariable(name): void
Attributes
name:string
variable name
Returns:void

Processes the provided name.


destructuringAssignmentPropertiesFor(node): Set<DestructuringAssignmentProperty> | undefined
Attributes
node
destructured identifiers

Destructuring assignment properties for.


detectMode(statements): void
Attributes
statements:(ClassDeclaration | FunctionDeclaration | ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | VariableDeclaration | Directive)[]
statements
Returns:void

Processes the provided statement.


enterArrayPattern(pattern, onIdent): void
Attributes
pattern:ArrayPattern
object pattern
onIdent:(ident: string, identifier: Identifier) => void
callback
Returns:void

Enter array pattern.


enterAssignmentPattern(pattern, onIdent): void
Attributes
pattern:AssignmentPattern
object pattern
onIdent:(ident: string, identifier: Identifier) => void
callback
Returns:void

Enter assignment pattern.


enterDeclaration(declaration, onIdent): void
Attributes
declaration:Declaration
declaration
onIdent:(ident: string, identifier: Identifier) => void
on ident callback
Returns:void

Processes the provided declaration.


enterDestructuringAssignment(pattern, expression): ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | undefined
Attributes
pattern:Pattern
pattern
expression:Expression
assignment expression
Returns:ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | undefined
destructuring expression

Enter destructuring assignment.


enterIdentifier(pattern, onIdent): void
Attributes
pattern:Identifier
identifier pattern
onIdent:(ident: string, identifier: Identifier) => void
callback
Returns:void

Processes the provided pattern.


enterObjectPattern(pattern, onIdent): void
Attributes
pattern:ObjectPattern
object pattern
onIdent:(ident: string, identifier: Identifier) => void
callback
Returns:void

Enter object pattern.


enterPattern(pattern, onIdent): void
Attributes
pattern:Property | Identifier | MemberExpression | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern
pattern
onIdent:(ident: string, identifier: Identifier) => void
on ident callback
Returns:void

Processes the provided pattern.


enterPatterns(patterns, onIdent): void
Attributes
patterns:(string | Property | Identifier | MemberExpression | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern)[]
patterns
onIdent:(ident: string) => void
on ident callback
Returns:void

Processes the provided pattern.


enterRestElement(pattern, onIdent): void
Attributes
pattern:RestElement
object pattern
onIdent:(ident: string, identifier: Identifier) => void
callback
Returns:void

Enter rest element.


evaluate(source): BasicEvaluatedExpression
Attributes
source:string
source code
evaluation result

Returns evaluation result.


evaluatedVariable(tagInfo): VariableInfo
Attributes
tagInfo:TagInfo
tag info
Returns:VariableInfo
variable info

Evaluated variable.


evaluateExpression(expression): BasicEvaluatedExpression
Attributes
expression:ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateIdentifier | SpreadElement | Super
expression node
evaluation result

Evaluate expression.


extractMemberExpressionChain(expression): { memberRanges: [number, number][]; members: string[]; membersOptionals: boolean[]; object: ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | Super }
Attributes
expression:ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | Super
a member expression
Returns:{ memberRanges: [number, number][]; members: string[]; membersOptionals: boolean[]; object: ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | Super }
member names (reverse order) and remaining object

Extract member expression chain.


getComments(range): CommentJavascriptParser[]
Attributes
range:[number, number]
range
comments in the range

Returns comments in the range.


getFreeInfoFromVariable(varName): { info: string | VariableInfo; name: string } | undefined
Attributes
varName:string
variable name
Returns:{ info: string | VariableInfo; name: string } | undefined
name of the free variable and variable info for that

Gets free info from variable.


getMemberExpressionInfo(expression, allowedTypes): CallExpressionInfo | ExpressionExpressionInfo | undefined
Attributes
expression:ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | Super
a member expression
allowedTypes:number
which types should be returned, presented in bit mask

Gets member expression info.


getNameForExpression(expression): { getMembers: () => string[]; name: string; rootInfo: ExportedVariableInfo } | undefined
Attributes
expression:Expression
an expression
Returns:{ getMembers: () => string[]; name: string; rootInfo: ExportedVariableInfo } | undefined
name info

Gets name for expression.


getNameInfoFromVariable(varName): { info: string | VariableInfo; name: string } | undefined
Attributes
varName:string
variable name
Returns:{ info: string | VariableInfo; name: string } | undefined
name of the free variable and variable info for that

Gets name info from variable.


getRenameIdentifier(expr): string | VariableInfo | undefined
Attributes
expr:ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | SpreadElement
expression
identifier

Gets rename identifier.


getTagData(name, tag): Record<string, any> | TopLevelSymbol | HarmonySettings | ImportSettings | CommonJsImportSettings | CompatibilitySettings | HarmonySpecifierGuards | undefined
Attributes

Returns tag data.


getVariableInfo(name): ExportedVariableInfo
Attributes
name:string
variable name
info for this variable

Gets variable info.


inBlockScope(fn, inExecutedPath?): void
Attributes
fn:() => void
inner function
inExecutedPath:boolean
executed state
Returns:void

Processes the provided fn.


inClassScope(hasThis, params, fn): void
Attributes
hasThis:boolean
true, when this is defined
params:Identifier[]
scope params
fn:() => void
inner function
Returns:void

Processes the provided has thi.


inFunctionScope(hasThis, params, fn): void
Attributes
hasThis:boolean
true, when this is defined
params:(string | Identifier | MemberExpression | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern)[]
scope params
fn:() => void
inner function
Returns:void

Processes the provided has thi.


inScope(params, fn): void
Attributes
params:(string | Property | Identifier | MemberExpression | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern)[]
scope params
fn:() => void
inner function
Returns:void

Processes the provided param.


isAsiPosition(pos): boolean
Attributes
pos:number
source code position
Returns:boolean
true when a semicolon has been inserted before this position, false if not

Checks whether this javascript parser is asi position.


isPure(expr, commentsStartPos): boolean
Attributes
expr:ClassDeclaration | MaybeNamedClassDeclaration | ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | FunctionDeclaration | MaybeNamedFunctionDeclaration | PrivateIdentifier | VariableDeclaration | null | undefined
an expression
commentsStartPos:number
source position from which annotation comments are checked
Returns:boolean
true, when the expression is pure

Checks whether this javascript parser is pure.


isStatementLevelExpression(expr): boolean
Attributes
expression
Returns:boolean
true, when the expression is a statement level expression

Checks whether this javascript parser is statement level expression.


isVariableDefined(name): boolean
Attributes
name:string
variable name
Returns:boolean
true, when variable is defined

Checks whether this javascript parser is variable defined.


modulePreWalkExportAllDeclaration(statement): void
Attributes
statement:ExportAllDeclaration
statement
Returns:void

Module pre walk export all declaration.


modulePreWalkExportNamedDeclaration(statement): void
Attributes
statement:ExportNamedDeclaration
statement
Returns:void

Module pre walk export named declaration.


modulePreWalkImportDeclaration(statement): void
Attributes
statement:ImportDeclaration
statement
Returns:void

Module pre walk import declaration.


modulePreWalkStatements(statements): void
Attributes
statements:(ClassDeclaration | FunctionDeclaration | ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | VariableDeclaration)[]
statements
Returns:void

Module pre walking iterates the scope for import entries


parse(source, state): ParserState
Attributes
source:string | Buffer<ArrayBufferLike> | PreparsedAst
the source to parse
the parser state
Returns:ParserState
the parser state

Parses the provided source and updates the parser state.


parseCalculatedString(expression): CalculatedStringResult
Attributes
expression:Expression
expression

Parses calculated string.


parseCommentOptions(range): { errors: (Error & { comment: CommentJavascriptParser })[] | null; options: Record<string, any> | null }
Attributes
range:[number, number]
range of the comment
Returns:{ errors: (Error & { comment: CommentJavascriptParser })[] | null; options: Record<string, any> | null }
result

Parses comment options.


parseString(expression): string
Attributes
expression:Expression
expression
Returns:string
parsed string

Returns parsed string.


preWalkAssignmentExpression(expression): void
Attributes
expression:AssignmentExpression
assignment expression
Returns:void

Pre walk assignment expression.


preWalkBlockStatement(statement): void
Attributes
statement:BlockStatement
block statement
Returns:void

Pre walk block statement.


preWalkCatchClause(catchClause): void
Attributes
catchClause:CatchClause
catch clause
Returns:void

Pre walk catch clause.


preWalkDoWhileStatement(statement): void
Attributes
statement:DoWhileStatement
do while statement
Returns:void

Pre walk do while statement.


preWalkForInStatement(statement): void
Attributes
statement:ForInStatement
for statement
Returns:void

Pre walk for in statement.


preWalkForOfStatement(statement): void
Attributes
statement:ForOfStatement
statement
Returns:void

Pre walk for of statement.


preWalkForStatement(statement): void
Attributes
statement:ForStatement
for statement
Returns:void

Pre walk for statement.


preWalkFunctionDeclaration(statement): void
Attributes
statement:FunctionDeclaration | MaybeNamedFunctionDeclaration
function declaration
Returns:void

Pre walk function declaration.


preWalkIfStatement(statement): void
Attributes
statement:IfStatement
if statement
Returns:void

Pre walk if statement.


preWalkLabeledStatement(statement): void
Attributes
statement:LabeledStatement
with statement
Returns:void

Pre walk labeled statement.


preWalkStatement(statement): void
Attributes
statement:ClassDeclaration | MaybeNamedClassDeclaration | FunctionDeclaration | MaybeNamedFunctionDeclaration | ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | VariableDeclaration
statement
Returns:void

Walking iterates the statements and expressions and processes them


preWalkStatements(statements): void
Attributes
statements:(ClassDeclaration | FunctionDeclaration | ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | VariableDeclaration)[]
statements
Returns:void

Pre walking iterates the scope for variable declarations


preWalkSwitchCases(switchCases): void
Attributes
switchCases:SwitchCase[]
switch statement
Returns:void

Pre walk switch cases.


preWalkSwitchStatement(statement): void
Attributes
statement:SwitchStatement
switch statement
Returns:void

Pre walk switch statement.


preWalkTryStatement(statement): void
Attributes
statement:TryStatement
try statement
Returns:void

Pre walk try statement.


preWalkVariableDeclaration(statement): void
Attributes
statement:VariableDeclaration
variable declaration
Returns:void

Pre walk variable declaration.


preWalkVariableDeclarator(declarator): void
Attributes
declarator:VariableDeclarator
variable declarator
Returns:void

Pre walk variable declarator.


preWalkWhileStatement(statement): void
Attributes
statement:WhileStatement
while statement
Returns:void

Pre walk while statement.


preWalkWithStatement(statement): void
Attributes
statement:WithStatement
with statement
Returns:void

Pre walk with statement.


setAsiPosition(pos): void
Attributes
pos:number
source code position
Returns:void

Updates asi position using the provided po.


setVariable(name, variableInfo): void
Attributes
name:string
variable name
new info for this variable
Returns:void

Updates variable using the provided name.


tagVariable(name, tag, data?, flags?): void
Attributes
name:string
name
tag:symbol
tag info
flags:0 | 2 | 1 | 4
flags
Returns:void

Processes the provided name.


undefineVariable(name): void
Attributes
name:string
variable name
Returns:void

Processes the provided name.


unsetAsiPosition(pos): void
Attributes
pos:number
source code position
Returns:void

Unset asi position.


walkArrayExpression(expression): void
Attributes
expression:ArrayExpression
array expression
Returns:void

Walk array expression.


walkArrayPattern(pattern): void
Attributes
pattern:ArrayPattern
array pattern
Returns:void

Walk array pattern.


walkArrowFunctionExpression(expression): void
Attributes
expression:ArrowFunctionExpression
arrow function expression
Returns:void

Walk arrow function expression.


walkAssignmentExpression(expression): void
Attributes
expression:AssignmentExpression
assignment expression
Returns:void

Walk assignment expression.


walkAssignmentPattern(pattern): void
Attributes
pattern:AssignmentPattern
assignment pattern
Returns:void

Walk assignment pattern.


walkAwaitExpression(expression): void
Attributes
expression:AwaitExpression
await expression
Returns:void

Walk await expression.


walkBinaryExpression(expression): void
Attributes
expression:BinaryExpression
the binary expression
Returns:void

Walk binary expression.


walkBlockStatement(statement): void
Attributes
statement:BlockStatement | StaticBlock
block statement
Returns:void

Walk block statement.


walkCallExpression(expression): void
Attributes
expression:CallExpression
expression
Returns:void

Walk call expression.


walkCatchClause(catchClause): void
Attributes
catchClause:CatchClause
catch clause
Returns:void

Processes the provided catch clause.


walkChainExpression(expression): void
Attributes
expression:ChainExpression
expression
Returns:void

Walk chain expression.


walkClass(classy): void
Attributes
classy:ClassDeclaration | MaybeNamedClassDeclaration | ClassExpression
a class node
Returns:void

Processes the provided classy.


walkClassDeclaration(statement): void
Attributes
statement:ClassDeclaration | MaybeNamedClassDeclaration
class declaration
Returns:void

Walk class declaration.


walkClassExpression(expression): void
Attributes
expression:ClassExpression
the class expression
Returns:void

Walk class expression.


walkConditionalExpression(expression): void
Attributes
expression:ConditionalExpression
conditional expression
Returns:void

Walk conditional expression.


walkDoWhileStatement(statement): void
Attributes
statement:DoWhileStatement
do while statement
Returns:void

Walk do while statement.


walkExportDefaultDeclaration(statement): void
Attributes
statement:ExportDefaultDeclaration
statement
Returns:void

Walk export default declaration.


walkExportNamedDeclaration(statement): void
Attributes
statement:ExportNamedDeclaration
the statement
Returns:void

Walk export named declaration.


walkExpression(expression): void
Attributes
expression:ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateIdentifier | SpreadElement | Super
expression
Returns:void

Processes the provided expression.


walkExpressions(expressions): void
Attributes
expressions:(ClassExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | ImportExpression | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | SpreadElement | null)[]
expressions
Returns:void

Processes the provided expression.


walkExpressionStatement(statement): void
Attributes
statement:ExpressionStatement
expression statement
Returns:void

Walk expression statement.


walkForInStatement(statement): void
Attributes
statement:ForInStatement
for statement
Returns:void

Walk for in statement.


walkForOfStatement(statement): void
Attributes
statement:ForOfStatement
for statement
Returns:void

Walk for of statement.


walkForStatement(statement): void
Attributes
statement:ForStatement
for statement
Returns:void

Walk for statement.


walkFunctionDeclaration(statement): void
Attributes
statement:FunctionDeclaration | MaybeNamedFunctionDeclaration
function declaration
Returns:void

Walk function declaration.


walkFunctionExpression(expression): void
Attributes
expression:FunctionExpression
arrow function expression
Returns:void

Walk function expression.


walkIdentifier(expression): void
Attributes
expression:Identifier
identifier
Returns:void

Processes the provided expression.


walkIfStatement(statement): void
Attributes
statement:IfStatement
if statement
Returns:void

Processes the provided statement.


walkImportExpression(expression): void
Attributes
import expression
Returns:void

Walk import expression.


walkLabeledStatement(statement): void
Attributes
statement:LabeledStatement
with statement
Returns:void

Walk labeled statement.


walkLeftRightExpression(expression): void
Attributes
expression:BinaryExpression | LogicalExpression
the expression
Returns:void

Walk left right expression.


walkLogicalExpression(expression): void
Attributes
expression:LogicalExpression
the logical expression
Returns:void

Walk logical expression.


walkMemberExpression(expression): void
Attributes
expression:MemberExpression
member expression
Returns:void

Walk member expression.


walkMemberExpressionWithExpressionName(expression, name, rootInfo, members, onUnhandled): void
Attributes
expression:MemberExpression
member expression
name:string
name
rootInfo:string | VariableInfo
root info
members:string[]
members
onUnhandled:() => R | undefined
on unhandled callback
Returns:void

Walk member expression with expression name.


walkMetaProperty(metaProperty): void
Attributes
metaProperty:MetaProperty
meta property
Returns:void

Walk meta property.


walkNestedStatement(statement): void
Attributes
statement:Statement
the nested statement
Returns:void

Walks a statements that is nested within a parent statement and can potentially be a non-block statement. This enforces the nested statement to never be in ASI position.


walkNewExpression(expression): void
Attributes
expression:NewExpression
new expression
Returns:void

Walk new expression.


walkObjectExpression(expression): void
Attributes
expression:ObjectExpression
object expression
Returns:void

Walk object expression.


walkObjectPattern(pattern): void
Attributes
pattern:ObjectPattern
pattern
Returns:void

Walk object pattern.


walkPattern(pattern): void
Attributes
pattern:Pattern
pattern
Returns:void

Processes the provided pattern.


walkProperty(prop): void
Attributes
prop:Property | SpreadElement
property or spread element
Returns:void

Processes the provided prop.


walkRestElement(pattern): void
Attributes
pattern:RestElement
rest element
Returns:void

Processes the provided pattern.


walkReturnStatement(statement): void
Attributes
statement:ReturnStatement
return statement
Returns:void

Walk return statement.


walkSequenceExpression(expression): void
Attributes
expression:SequenceExpression
the sequence
Returns:void

Walk sequence expression.


walkSpreadElement(expression): void
Attributes
expression:SpreadElement
spread element
Returns:void

Walk spread element.


walkStatement(statement): void
Attributes
statement:ClassDeclaration | MaybeNamedClassDeclaration | FunctionDeclaration | MaybeNamedFunctionDeclaration | ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | VariableDeclaration
statement
Returns:void

Processes the provided statement.


walkStatements(statements): void
Attributes
statements:(ClassDeclaration | FunctionDeclaration | ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | VariableDeclaration)[]
statements
Returns:void

Walking iterates the statements and expressions and processes them


walkSwitchCases(switchCases): void
Attributes
switchCases:SwitchCase[]
switch statement
Returns:void

Processes the provided switch case.


walkSwitchStatement(statement): void
Attributes
statement:SwitchStatement
switch statement
Returns:void

Walk switch statement.


walkTaggedTemplateExpression(expression): void
Attributes
expression:TaggedTemplateExpression
tagged template expression
Returns:void

Walk tagged template expression.


walkTemplateLiteral(expression): void
Attributes
expression:TemplateLiteral
template literal
Returns:void

Walk template literal.


walkTerminatingStatement(statement): void
Attributes
statement:ReturnStatement | ThrowStatement
return or throw statement
Returns:void

Walk terminating statement.


walkThisExpression(expression): void
Attributes
expression:ThisExpression
this expression
Returns:void

Walk this expression.


walkThrowStatement(statement): void
Attributes
statement:ThrowStatement
return statement
Returns:void

Walk throw statement.


walkTryStatement(statement): void
Attributes
statement:TryStatement
try statement
Returns:void

Walk try statement.


walkUnaryExpression(expression): void
Attributes
expression:UnaryExpression
the unary expression
Returns:void

Walk unary expression.


walkUpdateExpression(expression): void
Attributes
expression:UpdateExpression
the update expression
Returns:void

Walk update expression.


walkVariableDeclaration(statement): void
Attributes
statement:VariableDeclaration
variable declaration
Returns:void

Walk variable declaration.


walkWhileStatement(statement): void
Attributes
statement:WhileStatement
while statement
Returns:void

Walk while statement.


walkWithStatement(statement): void
Attributes
statement:WithStatement
with statement
Returns:void

Walk with statement.


walkYieldExpression(expression): void
Attributes
expression:YieldExpression
yield expression
Returns:void

Walk yield expression.


Attributes
plugins:((BaseParser: typeof Parser) => typeof Parser)[]
parser plugin
Returns:typeof JavascriptParser
parser

Returns parser.

Attributes
code:boolean
conditional:false | CalculatedStringResult[]
range:[number, number]
value:string

Attributes
calleeName:string
getCalleeMembers:() => string[]
getMemberRanges:() => [number, number][]
getMembers:() => string[]
getMembersOptionals:() => boolean[]
name:string
rootInfo:string | VariableInfo
type:"call"

Type:FunctionDeclaration | VariableDeclaration | ClassDeclaration

Helper function for joining two ranges into a single range. This is useful when working with AST nodes, as it allows you to combine the ranges of child nodes to create the range of the parent node.

Attributes
loc:SourceLocation
range:[number, number]
shorthand:string | boolean


Type:ImportExpressionImport | UnaryExpression | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UpdateExpression | YieldExpression

Attributes
getMemberRanges:() => [number, number][]
getMembers:() => string[]
getMembersOptionals:() => boolean[]
name:string
rootInfo:string | VariableInfo
type:"expression"

Type:undefined | null | string | SimpleLiteral | RegExpLiteral | BigIntLiteral


Attributes
harmonyNamedExports:Set<string>
harmonyStarExports:HarmonyStarExportsList
lastHarmonyImportOrder:number
localModules:LocalModule[]

Type:Identifier | MemberExpression | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern

Type:FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement

Type:ImportDeclaration | ExportNamedDeclaration | ExportAllDeclaration | ImportExpressionImport | UnaryExpression | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UpdateExpression | YieldExpression | FunctionDeclaration | MaybeNamedFunctionDeclaration | VariableDeclaration | ClassDeclaration | MaybeNamedClassDeclaration | ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | ExportDefaultDeclaration