You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The solution is probably to use _top_level_item instead of _expression inside argument_list since tree_sitter has no way to know that a particular call-like thing is a macro expansion.
This particular example seems to be extra haunted because tree-sitter makes different choices about where to put the ERROR fill tokens depending on the length of the DEBUG_CODE macro. If the last E is removed, there are still errors but tree-sitter recovers "better" and matches the curly braces correctly. Removing the 1 in the argument to a also fixes the problem.
The text was updated successfully, but these errors were encountered:
The following code does not parse correctly, or recover gracefully:
On the playground, this produces the node tree:
The solution is probably to use
_top_level_item
instead of_expression
insideargument_list
since tree_sitter has no way to know that a particular call-like thing is a macro expansion.This particular example seems to be extra haunted because tree-sitter makes different choices about where to put the ERROR fill tokens depending on the length of the
DEBUG_CODE
macro. If the lastE
is removed, there are still errors but tree-sitter recovers "better" and matches the curly braces correctly. Removing the1
in the argument toa
also fixes the problem.The text was updated successfully, but these errors were encountered: