On this page

  • {ParserClass}
new JavascriptParser(sourceType?, options?): void
  • comments {CommentJavascriptParser[]}
  • currentTagData {Record<string, any>|TopLevelSymbol|HarmonySettings|ImportSettings|CommonJsImportSettings|CompatibilitySettings|HarmonySpecifierGuards}
  • destructuringAssignmentProperties {WeakMap<Expression, Set>}
  • hooks {Readonly}
  • magicCommentContext {Context}
  • options <object>
  • 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}
  • sourceType {"module"|"auto"|"script"}
  • state {JavascriptParserState}
  • statementPath {StatementPathItem[]}
  • ALLOWED_MEMBER_TYPES_ALL {3}
  • ALLOWED_MEMBER_TYPES_CALL_EXPRESSION {1}
  • ALLOWED_MEMBER_TYPES_EXPRESSION {2}
  • getImportAttributes <object>
  • VariableInfo {VariableInfo}
  • VariableInfoFlags {Readonly}
    blockPreWalkClassDeclaration(statement): void
    • statement {ClassDeclaration|MaybeNamedClassDeclaration} class declaration
    • Returns: {void}

    blockPreWalkExportDefaultDeclaration(statement): void
    • statement {ExportDefaultDeclaration} statement
    • Returns: {void}

    blockPreWalkExportNamedDeclaration(statement): void
    • statement {ExportNamedDeclaration} statement
    • Returns: {void}

    blockPreWalkExpressionStatement(statement): void
    • statement {ExpressionStatement} expression statement
    • Returns: {void}

    blockPreWalkStatement(statement): void
    • 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}

    blockPreWalkStatements(statements): void
    • 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
    • statement {VariableDeclaration} variable declaration
    • Returns: {void}

    callHooksForExpression(hookMap, expr, ...args): void
    • 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} args for the hook
    • Returns: <undefined> result of hook

    callHooksForExpressionWithFallback(hookMap, expr, fallback, defined, ...args): void
    • 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 <object> | <undefined> callback when variable in not handled by hooks
    • defined <object> | <undefined> callback when variable is defined
    • args {AsArray} args for the hook
    • Returns: <undefined> result of hook

    callHooksForInfo(hookMap, info, ...args): void
    • hookMap {HookMap<SyncBailHook<T, R, UnsetAdditionalOptions>>} hooks that should be called
    • info {ExportedVariableInfo} variable info
    • args {AsArray} args for the hook
    • Returns: <undefined> result of hook

    callHooksForInfoWithFallback(hookMap, info, fallback, defined, ...args): void
    • hookMap {HookMap<SyncBailHook<T, R, UnsetAdditionalOptions>>} hooks the should be called
    • info {ExportedVariableInfo} variable info
    • fallback <object> | <undefined> callback when variable in not handled by hooks
    • defined <object> | <undefined> callback when variable is defined
    • args {AsArray} args for the hook
    • Returns: <undefined> result of hook

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

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

    defineVariable(name): void
    Attributes
    variable name
    Returns:
    {void}

    destructuringAssignmentPropertiesFor(node): void
    • node {Expression} node
    • Returns: {Set|undefined} destructured identifiers

    detectMode(statements): void
    • 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}

    enterArrayPattern(pattern, onIdent): void
    • pattern {ArrayPattern} object pattern
    • onIdent <object> callback
    • Returns: {void}

    enterAssignmentPattern(pattern, onIdent): void
    • pattern {AssignmentPattern} object pattern
    • onIdent <object> callback
    • Returns: {void}

    enterDeclaration(declaration, onIdent): void
    • declaration {Declaration} declaration
    • onIdent <object> on ident callback
    • Returns: {void}

    enterDestructuringAssignment(pattern, expression): void
    • pattern {Pattern} pattern
    • expression {Expression} assignment expression
    • Returns: <undefined> destructuring expression

    enterIdentifier(pattern, onIdent): void
    • pattern {Identifier} identifier pattern
    • onIdent <object> callback
    • Returns: {void}

    enterObjectPattern(pattern, onIdent): void
    • pattern {ObjectPattern} object pattern
    • onIdent <object> callback
    • Returns: {void}

    enterPattern(pattern, onIdent): void
    • pattern {Property|Identifier|MemberExpression|ObjectPattern|ArrayPattern|RestElement|AssignmentPattern} pattern
    • onIdent <object> on ident callback
    • Returns: {void}

    enterPatterns(patterns, onIdent): void
    Attributes
    patterns:<string>
    patterns
    onIdent:<object>
    on ident callback
    Returns:
    {void}

    enterRestElement(pattern, onIdent): void
    • pattern {RestElement} object pattern
    • onIdent <object> callback
    • Returns: {void}

    evaluate(source): BasicEvaluatedExpression
    Attributes
    source:<string>
    source code
    Returns:
    {BasicEvaluatedExpression} evaluation result

    evaluatedVariable(tagInfo): void
    • tagInfo {TagInfo} tag info
    • Returns: {VariableInfo} variable info

    evaluateExpression(expression): void
    • 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
    • Returns: {BasicEvaluatedExpression} evaluation result

    extractMemberExpressionChain(expression): void
    • 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: <object> member names (reverse order) and remaining object

    getComments(range): void
    • range {Tuple<number, number>} range
    • Returns: {CommentJavascriptParser[]} comments in the range

    getFreeInfoFromVariable(varName): object | undefined
    Attributes
    varName:<string>
    variable name
    name of the free variable and variable info for that

    getMemberExpressionInfo(expression, allowedTypes): void
    • 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
    • Returns: <undefined> expression info

    getNameForExpression(expression): void

    getNameInfoFromVariable(varName): object | undefined
    Attributes
    varName:<string>
    variable name
    name of the free variable and variable info for that

    getRenameIdentifier(expr): void
    • 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
    • Returns: <string> | <undefined> identifier

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

    getVariableInfo(name): ExportedVariableInfo
    Attributes
    variable name
    Returns:
    {ExportedVariableInfo} info for this variable

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

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

    inFunctionScope(hasThis, params, fn): void
    Attributes
    hasThis:<boolean>
    true, when this is defined
    params:<string>
    scope params
    inner function
    Returns:
    {void}

    inScope(params, fn): void
    Attributes
    params:<string>
    scope params
    inner function
    Returns:
    {void}

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

    isPure(expr, commentsStartPos): boolean
    Attributes
    an expression
    commentsStartPos:<number>
    source position from which annotation comments are checked
    Returns:<boolean>
    true, when the expression is pure

    isStatementLevelExpression(expr): void
    • expr {Expression} expression
    • Returns: <boolean> true, when the expression is a statement level expression

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

    modulePreWalkExportAllDeclaration(statement): void
    • statement {ExportAllDeclaration} statement
    • Returns: {void}

    modulePreWalkExportNamedDeclaration(statement): void
    • statement {ExportNamedDeclaration} statement
    • Returns: {void}

    modulePreWalkImportDeclaration(statement): void
    • statement {ImportDeclaration} statement
    • Returns: {void}

    modulePreWalkStatements(statements): void
    • 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): void
    • source {string|Buffer|PreparsedAst} the source to parse
    • state <ParserState> the parser state
    • Returns: <ParserState> the parser state

    parseCalculatedString(expression): void
    • expression {Expression} expression
    • Returns: {CalculatedStringResult} result

    parseCommentOptions(range): void
    • range {Tuple<number, number>} range of the comment
    • Returns: <object> result

    parseString(expression): void
    • expression {Expression} expression
    • Returns: <string> parsed string

    preWalkAssignmentExpression(expression): void
    • expression {AssignmentExpression} assignment expression
    • Returns: {void}

    preWalkBlockStatement(statement): void
    • statement {BlockStatement} block statement
    • Returns: {void}

    preWalkCatchClause(catchClause): void
    • catchClause {CatchClause} catch clause
    • Returns: {void}

    preWalkDoWhileStatement(statement): void
    • statement {DoWhileStatement} do while statement
    • Returns: {void}

    preWalkForInStatement(statement): void
    • statement {ForInStatement} for statement
    • Returns: {void}

    preWalkForOfStatement(statement): void
    • statement {ForOfStatement} statement
    • Returns: {void}

    preWalkForStatement(statement): void
    • statement {ForStatement} for statement
    • Returns: {void}

    preWalkFunctionDeclaration(statement): void
    • statement {FunctionDeclaration|MaybeNamedFunctionDeclaration} function declaration
    • Returns: {void}

    preWalkIfStatement(statement): void
    • statement {IfStatement} if statement
    • Returns: {void}

    preWalkLabeledStatement(statement): void
    • statement {LabeledStatement} with statement
    • Returns: {void}

    preWalkStatement(statement): void
    • 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
    • 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
    • switchCases {SwitchCase[]} switch statement
    • Returns: {void}

    preWalkSwitchStatement(statement): void
    • statement {SwitchStatement} switch statement
    • Returns: {void}

    preWalkTryStatement(statement): void
    • statement {TryStatement} try statement
    • Returns: {void}

    preWalkVariableDeclaration(statement): void
    • statement {VariableDeclaration} variable declaration
    • Returns: {void}

    preWalkVariableDeclarator(declarator): void
    • declarator {VariableDeclarator} variable declarator
    • Returns: {void}

    preWalkWhileStatement(statement): void
    • statement {WhileStatement} while statement
    • Returns: {void}

    preWalkWithStatement(statement): void
    • statement {WithStatement} with statement
    • Returns: {void}

    setAsiPosition(pos): void
    Attributes
    source code position
    Returns:
    {void}

    setVariable(name, variableInfo): void
    Attributes
    variable name
    variableInfo:
    {ExportedVariableInfo} new info for this variable
    Returns:
    {void}

    tagVariable(name, tag, data?, flags?): void
    Attributes
    name
    tag info
    data:
    {Record<string, any>|TopLevelSymbol|HarmonySettings|ImportSettings|CommonJsImportSettings|CompatibilitySettings|HarmonySpecifierGuards} data
    flags:
    {0|2|1|4} flags
    Returns:
    {void}

    undefineVariable(name): void
    Attributes
    variable name
    Returns:
    {void}

    unsetAsiPosition(pos): void
    Attributes
    source code position
    Returns:
    {void}

    walkArrayExpression(expression): void
    • expression {ArrayExpression} array expression
    • Returns: {void}

    walkArrayPattern(pattern): void
    • pattern {ArrayPattern} array pattern
    • Returns: {void}

    walkArrowFunctionExpression(expression): void
    • expression {ArrowFunctionExpression} arrow function expression
    • Returns: {void}

    walkAssignmentExpression(expression): void
    • expression {AssignmentExpression} assignment expression
    • Returns: {void}

    walkAssignmentPattern(pattern): void
    • pattern {AssignmentPattern} assignment pattern
    • Returns: {void}

    walkAwaitExpression(expression): void
    • expression {AwaitExpression} await expression
    • Returns: {void}

    walkBinaryExpression(expression): void
    • expression {BinaryExpression} the binary expression
    • Returns: {void}

    walkBlockStatement(statement): void
    • statement {BlockStatement|StaticBlock} block statement
    • Returns: {void}

    walkCallExpression(expression): void
    • expression {CallExpression} expression
    • Returns: {void}

    walkCatchClause(catchClause): void
    • catchClause {CatchClause} catch clause
    • Returns: {void}

    walkChainExpression(expression): void
    • expression {ChainExpression} expression
    • Returns: {void}

    walkClass(classy): void
    • classy {ClassDeclaration|MaybeNamedClassDeclaration|ClassExpression} a class node
    • Returns: {void}

    walkClassDeclaration(statement): void
    • statement {ClassDeclaration|MaybeNamedClassDeclaration} class declaration
    • Returns: {void}

    walkClassExpression(expression): void
    • expression {ClassExpression} the class expression
    • Returns: {void}

    walkConditionalExpression(expression): void
    • expression {ConditionalExpression} conditional expression
    • Returns: {void}

    walkDoWhileStatement(statement): void
    • statement {DoWhileStatement} do while statement
    • Returns: {void}

    walkExportDefaultDeclaration(statement): void
    • statement {ExportDefaultDeclaration} statement
    • Returns: {void}

    walkExportNamedDeclaration(statement): void
    • statement {ExportNamedDeclaration} the statement
    • Returns: {void}

    walkExpression(expression): void
    • 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}

    walkExpressions(expressions): void
    Attributes
    expressions:<null[]>
    expressions
    Returns:
    {void}

    walkExpressionStatement(statement): void
    • statement {ExpressionStatement} expression statement
    • Returns: {void}

    walkForInStatement(statement): void
    • statement {ForInStatement} for statement
    • Returns: {void}

    walkForOfStatement(statement): void
    • statement {ForOfStatement} for statement
    • Returns: {void}

    walkForStatement(statement): void
    • statement {ForStatement} for statement
    • Returns: {void}

    walkFunctionDeclaration(statement): void
    • statement {FunctionDeclaration|MaybeNamedFunctionDeclaration} function declaration
    • Returns: {void}

    walkFunctionExpression(expression): void
    • expression {FunctionExpression} arrow function expression
    • Returns: {void}

    walkIdentifier(expression): void
    • expression {Identifier} identifier
    • Returns: {void}

    walkIfStatement(statement): void
    • statement {IfStatement} if statement
    • Returns: {void}

    walkImportExpression(expression): void
    • expression {ImportExpressionJavascriptParser} import expression
    • Returns: {void}

    walkLabeledStatement(statement): void
    • statement {LabeledStatement} with statement
    • Returns: {void}

    walkLeftRightExpression(expression): void
    • expression {BinaryExpression|LogicalExpression} the expression
    • Returns: {void}

    walkLogicalExpression(expression): void
    • expression {LogicalExpression} the logical expression
    • Returns: {void}

    walkMemberExpression(expression): void
    • expression {MemberExpression} member expression
    • Returns: {void}

    walkMemberExpressionWithExpressionName(expression, name, rootInfo, members, onUnhandled): void
    • expression {MemberExpression} member expression
    • name <string> name
    • rootInfo <string> root info
    • members <string[]> members
    • onUnhandled <object> on unhandled callback
    • Returns: {void}

    walkMetaProperty(metaProperty): void
    • metaProperty {MetaProperty} meta property
    • Returns: {void}

    walkNestedStatement(statement): void
    • 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
    • expression {NewExpression} new expression
    • Returns: {void}

    walkObjectExpression(expression): void
    • expression {ObjectExpression} object expression
    • Returns: {void}

    walkObjectPattern(pattern): void
    • pattern {ObjectPattern} pattern
    • Returns: {void}

    walkPattern(pattern): void
    • pattern {Pattern} pattern
    • Returns: {void}

    walkProperty(prop): void
    • prop {Property|SpreadElement} property or spread element
    • Returns: {void}

    walkRestElement(pattern): void
    • pattern {RestElement} rest element
    • Returns: {void}

    walkReturnStatement(statement): void
    • statement {ReturnStatement} return statement
    • Returns: {void}

    walkSequenceExpression(expression): void
    • expression {SequenceExpression} the sequence
    • Returns: {void}

    walkSpreadElement(expression): void
    • expression {SpreadElement} spread element
    • Returns: {void}

    walkStatement(statement): void
    • 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}

    walkStatements(statements): void
    • 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
    • switchCases {SwitchCase[]} switch statement
    • Returns: {void}

    walkSwitchStatement(statement): void
    • statement {SwitchStatement} switch statement
    • Returns: {void}

    walkTaggedTemplateExpression(expression): void
    • expression {TaggedTemplateExpression} tagged template expression
    • Returns: {void}

    walkTemplateLiteral(expression): void
    • expression {TemplateLiteral} template literal
    • Returns: {void}

    walkTerminatingStatement(statement): void
    • statement {ReturnStatement|ThrowStatement} return or throw statement
    • Returns: {void}

    walkThisExpression(expression): void
    • expression {ThisExpression} this expression
    • Returns: {void}

    walkThrowStatement(statement): void
    • statement {ThrowStatement} return statement
    • Returns: {void}

    walkTryStatement(statement): void
    • statement {TryStatement} try statement
    • Returns: {void}

    walkUnaryExpression(expression): void
    • expression {UnaryExpression} the unary expression
    • Returns: {void}

    walkUpdateExpression(expression): void
    • expression {UpdateExpression} the update expression
    • Returns: {void}

    walkVariableDeclaration(statement): void
    • statement {VariableDeclaration} variable declaration
    • Returns: {void}

    walkWhileStatement(statement): void
    • statement {WhileStatement} while statement
    • Returns: {void}

    walkWithStatement(statement): void
    • statement {WithStatement} with statement
    • Returns: {void}

    walkYieldExpression(expression): void
    • expression {YieldExpression} yield expression
    • Returns: {void}

    Attributes
    plugins:<object[]>
    parser plugin
    parser