Collect javascript comments during parsing

SyntaxEditor for WPF Forum

Posted 6 years ago by LONG Philippe
Version: 18.1.0671


I am using SyntaxEditor with Javascript language.

I build an outline from editor content using JavaScriptSyntaxLanguage parser.

It works fine, and I get all the IAstNode I need.

But I would like to also get IAstNode on comment lines.

Is there a way to tell the parser to detect these nodes ?



Comments (2)

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA


Unfortunately not.  Comments are filtered out by the token reader that feeds tokens to the parser.  Otherwise we'd have to code the grammar to allow comments in every possible contextual location.  Thus there are no AST nodes available for comments.

Actipro Software Support

Posted 6 years ago by LONG Philippe


The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.