feat(c): use @constant.macro for macro identifiers (#7266)

This commit is contained in:
Omar Valdez 2024-10-20 10:53:45 -07:00 committed by GitHub
parent d53df0c987
commit 18cf02f5ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)