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

constexpr macro parsing issue

Open hashinclude opened this issue 5 years ago • 1 comments

Declaring a constexpr macro works well if the total length of the line is less than 38 chars -
Screen Shot 2020-08-13 at 5 04 42 AM

However, adding one more char to the line containing the macro causes the following class definition to be incorrectly handled. Screen Shot 2020-08-13 at 5 06 46 AM

hashinclude avatar Aug 13 '20 12:08 hashinclude

Yeah, the error recovery heuristics take into account the size of text that must be wrapped in an error (in addition to the number of syntax nodes), so it is going to depend on the text of the code that's causing the parse error.

maxbrunsfeld avatar Aug 13 '20 17:08 maxbrunsfeld