-
-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Labels
Description
Did you check existing issues?
- I have read all the tree-sitter docs if it relates to using the parser
- I have searched the existing issues of tree-sitter-cpp
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)
tree-sitter 0.25.8 (f2f197b6b27ce75c280c20f131d4f71e906b86f7)
Describe the bug
google test's ASSERT_DEBUG_DEATH is not treated as an expression_statement like other test macros. See the picture from the treesitter playground:
EXPECT_FALSE is correctly shown as an expression statement while ASSERT_DEBUG_DEATH leads to an error. It has to do with the initialization of the class inside the macro.
Steps To Reproduce/Bad Parse Tree
- use gtest's assert debug death macro with an initialization inside it.
- tree-sitter can't parse the code
Expected Behavior/Parse Tree
The macro is resolved to an expression statement
Repro
EXPECT_FALSE( bool );
ASSERT_DEBUG_DEATH( const class Class() , "" );
class MockStream {
public:
MockStream(){};
};