tree-sitter/tree-sitter-java

differentiate line and block comments

raghav-deepsource opened this issue · 1 comments

Problem description

It can be useful to differentiate between line, block and javadoc comments in a TS AST.

Expected parse tree output (optional)

for the input:

/** abc 
 *
 */

I expect to get an equivalent of:

program [0, 0] - [4, 0]
   block_comment [0, 0] - [2, 3]

Actual parse tree output (optional)

Instead, I get:

program [0, 0] - [4, 0]
  comment [0, 0] - [2, 3]

I am attempting to modify the grammar to accommodate this; would it be feasible to add to the official grammar?