mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 00:40:06 -04:00
feat(c): use @constant.macro for macro identifiers (#7266)
This commit is contained in:
parent
d53df0c987
commit
18cf02f5ef
1 changed files with 11 additions and 2 deletions
|
|
@ -252,13 +252,22 @@
|
||||||
|
|
||||||
; Preproc def / undef
|
; Preproc def / undef
|
||||||
(preproc_def
|
(preproc_def
|
||||||
name: (_) @constant)
|
name: (_) @constant.macro)
|
||||||
|
|
||||||
(preproc_call
|
(preproc_call
|
||||||
directive: (preproc_directive) @_u
|
directive: (preproc_directive) @_u
|
||||||
argument: (_) @constant
|
argument: (_) @constant.macro
|
||||||
(#eq? @_u "#undef"))
|
(#eq? @_u "#undef"))
|
||||||
|
|
||||||
|
(preproc_ifdef
|
||||||
|
name: (identifier) @constant.macro)
|
||||||
|
|
||||||
|
(preproc_elifdef
|
||||||
|
name: (identifier) @constant.macro)
|
||||||
|
|
||||||
|
(preproc_defined
|
||||||
|
(identifier) @constant.macro)
|
||||||
|
|
||||||
(call_expression
|
(call_expression
|
||||||
function: (identifier) @function.call)
|
function: (identifier) @function.call)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue