Comment
A comment. Node type is Token.COMMENT.
JavaScript has five comment shapes: line comments, block comments, jsdoc comments (block comments with formatting conventions), and the two HTML forms. SpiderMonkey and Rhino support the HTML syntax, where everything from <!--` to the end of the line is a comment, and a line whose first non-whitespace token is `--> is a line comment. That exists to parse scripts hidden from very old browsers inside HTML comment delimiters.
The node start position is relative to the parent as usual, but comments are always stored directly in the AstRoot, so it is also an absolute offset.
Parameters
the length including the delimiters
Properties
The absolute document position, computed by adding this node's relative position to the relative positions of all its parents.
The comment style.
The innermost enclosing function, or null. The search begins with the parent.
Comments on the same line as the statement, for example the trailing comment in if (x == 2) // note.
The node type, e.g. Token.NAME.
Functions
A debugging representation of the parse tree starting at this node. Each line reads abs-pos name position length [identifier].
Checks that every return usage in a function body is consistent with strict mode. See the END_* flags for what the analysis reports.
Constructs an indentation string of indent steps.
Recursively unlabel every TARGET or YIELD node in the tree. Used only for inlining finally blocks where jsr instructions used to be.
Makes this node's position relative to a parent. The current position is assumed to be absolute and is decremented by parentPosition.
Comment nodes are not visited during normal traversals, but they honor the AstNode.visit contract.