mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
highlights(cpp): fix function highlighting of Foo::bar::baz()
Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/2396
This commit is contained in:
parent
0f6492506d
commit
974e2181a0
2 changed files with 22 additions and 0 deletions
|
|
@ -60,6 +60,16 @@
|
|||
(call_expression
|
||||
function: (qualified_identifier
|
||||
name: (identifier) @function))
|
||||
(call_expression
|
||||
function: (qualified_identifier
|
||||
name: (qualified_identifier
|
||||
name: (identifier) @function)))
|
||||
(call_expression
|
||||
function:
|
||||
(qualified_identifier
|
||||
name: (qualified_identifier
|
||||
name: (qualified_identifier
|
||||
name: (identifier) @function))))
|
||||
|
||||
(call_expression
|
||||
function: (field_expression
|
||||
|
|
|
|||
12
tests/query/highlights/cpp/static-namespace-functions.cpp
Normal file
12
tests/query/highlights/cpp/static-namespace-functions.cpp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// Issue #2396
|
||||
|
||||
int main()
|
||||
{
|
||||
B::foo();
|
||||
// ^ @function
|
||||
Foo::A::foo();
|
||||
// ^ @function
|
||||
Foo::a::A::foo();
|
||||
// ^ @function
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue