Ende.lint.SourceCode
interface · experimental
interface Ende.lint.SourceCodeProperties
text
text: stringGet the full source code.
ast
ast: ProgramGet the root node of the file. It's always the Program node.
Methods
getText
getText(node?: Node): stringGet the source test of a node. Omit node to get the
full source code.
getAncestors
getAncestors(node: Node): Node[]Returns array of ancestors of the current node, excluding the current node.
getAllComments
getAllComments(): Array<LineComment | BlockComment>Get all comments inside the source.
getCommentsBefore
getCommentsBefore(node: Node): Array<LineComment | BlockComment>Get leading comments before a node.
getCommentsAfter
getCommentsAfter(node: Node): Array<LineComment | BlockComment>Get trailing comments after a node.
getCommentsInside
getCommentsInside(node: Node): Array<LineComment | BlockComment>Get comments inside a node.