# Functions
NewComment creates a new comment.
NewComments returns a new Comments.
Walk traverses an AST in depth-first order: It starts by calling v.Enter(node); node must not be nil.
# Constants
COLON is after a colon in a field declaration.
DO is after do keyword.
FINAL is the final comments in a block, not belonging to a specific expression or the comment after a trailing , in an array or object literal.
FOR is after a for keyword.
IF is after an if keyword.
KEY is before a key in an object.
LEADING is before the pertinent expression.
TBD is unknown.
TRAILING is after the pertinent expression.
WHILE is after a while keyword.
WITH is after a with keyword.
# Structs
ArrayLiteral represents an array literal.
AssignExpression represents an assignment expression.
BadExpression represents a bad expression.
BadStatement represents a bad statement.
BinaryExpression represents a binary expression.
BlockStatement represents a block statement.
BooleanLiteral represents a boolean expression.
BracketExpression represents a bracketed expression.
BranchStatement represents a branch statement.
CallExpression represents a call expression.
CaseStatement represents a case statement.
CatchStatement represents a catch statement.
Comment contains the data of the comment.
Comments defines the current view of comments from the parser.
ConditionalExpression represents a conditional expression.
DebuggerStatement represents a debugger statement.
DotExpression represents a dot expression.
DoWhileStatement represents a do while statement.
EmptyExpression represents an empty expression.
EmptyStatement represents a empty statement.
ExpressionStatement represents a expression statement.
ForInStatement represents a for in statement.
ForStatement represents a for statement.
FunctionDeclaration represents a function declaration.
FunctionLiteral represents a function literal.
FunctionStatement represents a function statement.
Identifier represents an identifier.
IfStatement represents a if statement.
LabelledStatement represents a labelled statement.
NewExpression represents a new expression.
NullLiteral represents a null literal.
NumberLiteral represents a number literal.
ObjectLiteral represents an object literal.
ParameterList represents a parameter list.
Program represents a full program.
Property represents a property.
RegExpLiteral represents a regular expression literal.
ReturnStatement represents a return statement.
SequenceExpression represents a sequence literal.
StringLiteral represents a string literal.
SwitchStatement represents a switch statement.
ThisExpression represents a this expression.
ThrowStatement represents a throw statement.
TryStatement represents a try statement.
UnaryExpression represents a unary expression.
VariableDeclaration represents a variable declaration.
VariableExpression represents a variable expression.
VariableStatement represents a variable statement.
WhileStatement represents a while statement.
WithStatement represents a with statement.
# Interfaces
Declaration is implemented by type which represent declarations.
Expression is implemented by types that represent an Expression.
Node is implemented by types that represent a node.
Statement is implemented by types which represent a statement.
Visitor Enter method is invoked for each node encountered by Walk.
# Type aliases
CommentMap is the data structure where all found comments are stored.
CommentPosition determines where the comment is in a given context.