summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUy Ha <hchanuy@gmail.com>2021-09-10 15:19:10 +0200
committerStephan Seitz <stephan.seitz@fau.de>2021-09-10 17:01:54 +0200
commite31bba5d97bfbc59d94a47f40e7ad9e36a5a53ee (patch)
treec9b91af741fe423ea28f6074b8c16a5ce30748ca
parent5cc7358dd485205606ac23139d5c2c826a0f44e8 (diff)
[cmake] add highlights for `if` command constant
-rw-r--r--queries/cmake/highlights.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/queries/cmake/highlights.scm b/queries/cmake/highlights.scm
index 9be78c1b..cecf2f84 100644
--- a/queries/cmake/highlights.scm
+++ b/queries/cmake/highlights.scm
@@ -64,3 +64,15 @@
(#match? @function.builtin "\\c^(set)$")
)
+(if_command
+ (if)
+ (argument) @keyword.operator
+ (#any-of? @keyword.operator "NOT" "AND" "OR"
+ "COMMAND" "POLICY" "TARGET" "TEST" "DEFINED" "IN_LIST"
+ "EXISTS" "IS_NEWER_THAN" "IS_DIRECTORY" "IS_SYMLINK" "IS_ABSOLUTE"
+ "MATCHES"
+ "LESS" "GREATER" "EQUAL" "LESS_EQUAL" "GREATER_EQUAL"
+ "STRLESS" "STRGREATER" "STREQUAL" "STRLESS_EQUAL" "STRGREATER_EQUAL"
+ "VERSION_LESS" "VERSION_GREATER" "VERSION_EQUAL" "VERSION_LESS_EQUAL" "VERSION_GREATER_EQUAL"
+ )
+)