tree-sitter-java icon indicating copy to clipboard operation
tree-sitter-java copied to clipboard

Parsing error for unicode in string literals

Open theawless opened this issue 7 months ago • 0 comments

The character A can be represented as \uuu0041. I noticed that it parses for character literals correctly but not string literals.

'\uuu0041';
program [0, 0] - [1, 0]
  expression_statement [0, 0] - [0, 11]
    character_literal [0, 0] - [0, 10]
    ; [0, 10] - [0, 11]
"\uuu0041";
program [0, 0] - [1, 0]
  ERROR [0, 0] - [0, 3]
    " [0, 0] - [0, 1]
  expression_statement [0, 3] - [0, 11]
    identifier [0, 3] - [0, 9]
    ERROR [0, 9] - [0, 10]
      " [0, 9] - [0, 10]
    ; [0, 10] - [0, 11]

theawless avatar Jun 10 '25 19:06 theawless