diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2022-01-06 20:36:32 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-01-09 20:17:08 +0100 |
| commit | 0d53066533643fac8d9a1a247bde3cf9132077ad (patch) | |
| tree | 22943905e952347d867fafb42f3746c9b639cf68 | |
| parent | 80dcc237aca0961ce449e4d7b88e028ad9340e8a (diff) | |
highlights(llvm): import highlight queries from upstream
| -rw-r--r-- | queries/llvm/highlights.scm | 158 |
1 files changed, 150 insertions, 8 deletions
diff --git a/queries/llvm/highlights.scm b/queries/llvm/highlights.scm index 787e0f14..d61d5293 100644 --- a/queries/llvm/highlights.scm +++ b/queries/llvm/highlights.scm @@ -1,14 +1,156 @@ (type) @type -(statement) @keyword.operator +(type_keyword) @type.builtin + +(type [ + (local_var) + (global_var) + ] @type) + +(argument) @parameter + +(_ inst_name: _ @keyword.operator) + +[ + "catch" + "filter" +] @keyword.operator + +[ + "to" + "nuw" + "nsw" + "exact" + "unwind" + "from" + "cleanup" + "swifterror" + "volatile" + "inbounds" + "inrange" +] @keyword +(icmp_cond) @keyword +(fcmp_cond) @keyword + +(fast_math) @keyword + +(_ callee: _ @function) +(function_header name: _ @function) + +[ + "declare" + "define" +] @keyword.function +(calling_conv) @keyword.function + +[ + "target" + "triple" + "datalayout" + "source_filename" + "addrspace" + "blockaddress" + "align" + "syncscope" + "within" + "uselistorder" + "uselistorder_bb" + "module" + "asm" + "sideeffect" + "alignstack" + "inteldialect" + "unwind" + "type" + "global" + "constant" + "externally_initialized" + "alias" + "ifunc" + "section" + "comdat" + "thread_local" + "localdynamic" + "initialexec" + "localexec" + "any" + "exactmatch" + "largest" + "nodeduplicate" + "samesize" + "distinct" + "attributes" + "vscale" + "no_cfi" +] @keyword + +(linkage_aux) @keyword +(dso_local) @keyword +(visibility) @keyword +(dll_storage_class) @keyword +(unnamed_addr) @keyword +(attribute_name) @keyword + +(function_header [ + (linkage) + (calling_conv) + (unnamed_addr) + ] @keyword.function) + (number) @number (comment) @comment (string) @string +(cstring) @string (label) @label -(keyword) @keyword -"ret" @keyword.return -(boolean) @boolean +(_ inst_name: "ret" @keyword.return) (float) @float -(constant) @constant -(identifier) @variable -(symbol) @punctuation.delimiter -(bracket) @punctuation.bracket + +[ + (local_var) + (global_var) +] @variable + +[ + (struct_value) + (array_value) + (vector_value) +] @constructor + +[ + "(" + ")" + "[" + "]" + "{" + "}" + "<" + ">" + "<{" + "}>" +] @punctuation.bracket + +[ + "," + ":" +] @punctuation.delimiter + +[ + "=" + "|" + "x" + "..." +] @operator + +[ + "true" + "false" +] @boolean + +[ + "undef" + "poison" + "null" + "none" + "zeroinitializer" +] @constant.builtin + +(ERROR) @error |
