Node

Node

new Node()

A generic AST node

Properties:
Name Type Attributes Description
loc Location | null
leadingComments Array.<Comment>
trailingComments Array.<Comment> <nullable>
kind String
Source:

Methods

(static) extends(type, constructor) → {function}

Helper for extending the Node class

Parameters:
Name Type Description
type String
constructor function
Source:

destroy()

Destroying an unused node

Source:

includeToken(parser)

Includes current token position of the parser

Parameters:
Name Type Description
parser *
Source:

setTrailingComments(docs)

Attach comments to current node

Parameters:
Name Type Description
docs *
Source: