Json5Lexer.nextTokenWithComments

Json5Token nextTokenWithComments() @safe

Return the next token, emitting COMMENT tokens instead of skipping them.

This method is used by the CDM parser to preserve comments. It behaves like nextToken() but returns comments as Json5TokenKind.COMMENT tokens instead of skipping them.

Returns

The next token from the stream, including COMMENT tokens.