Closed TwitchBronBron closed 4 months ago
Now that we removed CommentStatement from the AST as nodes, we need a way to discover all comments when walking the AST.
CommentStatement
Maybe a new WalkMode option that includes comments?
Goal for usage:
file.ast.walk(createVisitor({ CommentToken: (comment) -> { // this is a comment! }), { walkMode: WalkMode.visitAllRecursive & WalkMode.VisitComments } );
Now that we removed
CommentStatement
from the AST as nodes, we need a way to discover all comments when walking the AST.Maybe a new WalkMode option that includes comments?