summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2020-11-22 22:17:16 +0100
committerThomas Vigouroux <tomvig38@gmail.com>2020-11-22 22:33:56 +0100
commit049028ef3e639d948e9e1ee464ad7b9fd317f2c4 (patch)
treec4bdcacb06931ba71ccd113a3cfb2a71c52e87c9
parente45ab15cf35709e274f2a460d1aa820a320ddc38 (diff)
c highlights: fix define/undef arguments
-rw-r--r--queries/c/highlights.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/queries/c/highlights.scm b/queries/c/highlights.scm
index af401281..c73405ac 100644
--- a/queries/c/highlights.scm
+++ b/queries/c/highlights.scm
@@ -143,6 +143,15 @@
((identifier) @constant
(#match? @constant "^[A-Z][A-Z0-9_]+$"))
+;; Preproc def / undef
+(preproc_def
+ name: (_) @constant)
+(preproc_call
+ directive: (preproc_directive) @_u
+ argument: (_) @constant
+ (#eq? @_u "#undef"))
+
+
(comment) @comment
;; Parameters