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

direct-list-initialization with primitive type "int{1}" is not parsed correctly.

Open hokein opened this issue 4 years ago • 0 comments

int {1}; // tree-sitter cannot parsed it.
Foo {1}; // ok: it is parsed as compound_literal_expression 

tree-sitter output for int {1};

 ERROR [0, 0] - [0, 3])
    primitive_type [0, 0] - [0, 3])
  compound_statement [0, 3] - [0, 6])
    ERROR [0, 4] - [0, 5])
      number_literal [0, 4] - [0, 5])

hokein avatar Mar 10 '21 08:03 hokein