highlights(cpp): Highlight method with nested qualified_identifier

so that methods like these are correctly highlighted

```cpp

class A {
    class B {
       void foo();
    };
};

void A::B::foo() {
//         ^^^
}
```

This only increases the nesting level by one.
AFAIK abritrary nesting is difficult to do with current queries.

But this nesting is a pretty common case
This commit is contained in:
Fabian Viöl 2022-02-04 08:45:53 +01:00 committed by Stephan Seitz
parent b9c6f3ed45
commit 4990db79a8

View file

@ -51,6 +51,10 @@
(function_declarator
declarator: (qualified_identifier
name: (identifier) @function))
(function_declarator
declarator: (qualified_identifier
name: (qualified_identifier
name: (identifier) @function)))
((function_declarator
declarator: (qualified_identifier
name: (identifier) @constructor))