tree-sitter-cpp
tree-sitter-cpp copied to clipboard
Struct with __attribute__
Structures with attributes are parsed incorrectly. For example:
struct __attribute__((packed)) struct1_t {
static constexpr int A = 1;
static constexpr int B = 2;
};
It seems to me, that they are taken for function_definition somehow.
This will help to resolve this issue.
Thank you very much.
What version of tree-sitter-cpp are you using? This looks like it should have been fixed by https://github.com/tree-sitter/tree-sitter-c/pull/19, which would be included in [email protected].
Nevermind, just checked your linked repository and it appears you are already on that version.
I use the latest version 0.15.0.
It seems that __attribute__ was fixed for function declarations, but not structs.