diff options
| author | Uy Ha <hchanuy@gmail.com> | 2022-02-05 00:13:08 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-02-05 00:28:48 +0100 |
| commit | 2dcfefa9da21a3b51767c9faf05d379f7c003d36 (patch) | |
| tree | 120178604561a94e88db30e6c5558c3642c76ceb /queries | |
| parent | 0a8842a4546d0fe12e8038622ef3aeede2af283a (diff) | |
Improve `set` queries
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/cmake/highlights.scm | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/queries/cmake/highlights.scm b/queries/cmake/highlights.scm index d1f59967..d7ba6f3d 100644 --- a/queries/cmake/highlights.scm +++ b/queries/cmake/highlights.scm @@ -51,17 +51,42 @@ ) (normal_command - (identifier) @function.builtin - . (argument) @variable - (#match? @function.builtin "\\c^(set)$")) + (identifier) @function.builtin + . (argument) @variable + (#match? @function.builtin "\\c^(set)$") +) (normal_command - (identifier) @function.builtin - . (argument) - . (argument) - (argument) @constant - (#any-of? @constant "PARENT_SCOPE" "CACHE" "FORCE") - (#match? @function.builtin "\\c^(set)$") + (identifier) @function.builtin + (#match? @function.builtin "\\c^(set)$") + ( + (argument) @constant + (#any-of? @constant "PARENT_SCOPE") + ) . +) + +(normal_command + (identifier) @function.builtin + (#match? @function.builtin "\\c^(set)$") + . (argument) + ( + (argument) @m_cache @constant + . + (argument) @m_type @constant + (#any-of? @m_cache "CACHE") + (#any-of? @m_type "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL") + ) +) +(normal_command + (identifier) @function.builtin + (#match? @function.builtin "\\c^(set)$") + . (argument) + (argument) @m_cache + (#any-of? @m_cache "CACHE") + ( + (argument) @m_force @constant + (#any-of? @m_force "FORCE") + ) . ) ((argument) @boolean |
