diff options
author | Indrajith K L | 2022-12-03 17:00:20 +0530 |
---|---|---|
committer | Indrajith K L | 2022-12-03 17:00:20 +0530 |
commit | f5c4671bfbad96bf346bd7e9a21fc4317b4959df (patch) | |
tree | 2764fc62da58f2ba8da7ed341643fc359873142f /helix-22.03-x86_64-windows/runtime/queries/llvm | |
download | cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.tar.gz cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.tar.bz2 cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.zip |
Diffstat (limited to 'helix-22.03-x86_64-windows/runtime/queries/llvm')
5 files changed, 202 insertions, 0 deletions
diff --git a/helix-22.03-x86_64-windows/runtime/queries/llvm/highlights.scm b/helix-22.03-x86_64-windows/runtime/queries/llvm/highlights.scm new file mode 100644 index 0000000..cb70519 --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/llvm/highlights.scm @@ -0,0 +1,158 @@ +(type) @type +(type_keyword) @type.builtin + +(type [ + (local_var) + (global_var) + ] @type) + +(argument) @variable.parameter + +(_ inst_name: _ @keyword.operator) + +[ + "catch" + "filter" +] @keyword.operator + +[ + "to" + "nuw" + "nsw" + "exact" + "unwind" + "from" + "cleanup" + "swifterror" + "volatile" + "inbounds" + "inrange" + (icmp_cond) + (fcmp_cond) + (fast_math) +] @keyword.control + +(_ callee: _ @function) +(function_header name: _ @function) + +[ + "declare" + "define" + (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" + (linkage_aux) + (dso_local) + (visibility) + (dll_storage_class) + (unnamed_addr) + (attribute_name) +] @keyword + + +(function_header [ + (linkage) + (calling_conv) + (unnamed_addr) + ] @keyword.function) + +[ + (string) + (cstring) +] @string + +(number) @constant.numeric.integer +(comment) @comment +(label) @label +(_ inst_name: "ret" @keyword.control.return) +(float) @constant.numeric.float + +[ + (local_var) + (global_var) +] @variable + +[ + (struct_value) + (array_value) + (vector_value) +] @constructor + +[ + "(" + ")" + "[" + "]" + "{" + "}" + "<" + ">" + "<{" + "}>" +] @punctuation.bracket + +[ + "," + ":" +] @punctuation.delimiter + +[ + "=" + "|" + "x" + "..." +] @operator + +[ + "true" + "false" +] @constant.builtin.boolean + +[ + "undef" + "poison" + "null" + "none" + "zeroinitializer" +] @constant.builtin + +(ERROR) @error diff --git a/helix-22.03-x86_64-windows/runtime/queries/llvm/indents.toml b/helix-22.03-x86_64-windows/runtime/queries/llvm/indents.toml new file mode 100644 index 0000000..8cd603c --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/llvm/indents.toml @@ -0,0 +1,8 @@ +indent = [ + "function_body", + "instruction", +] + +outdent = [ + "}", +] diff --git a/helix-22.03-x86_64-windows/runtime/queries/llvm/injections.scm b/helix-22.03-x86_64-windows/runtime/queries/llvm/injections.scm new file mode 100644 index 0000000..321c90a --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/llvm/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/helix-22.03-x86_64-windows/runtime/queries/llvm/locals.scm b/helix-22.03-x86_64-windows/runtime/queries/llvm/locals.scm new file mode 100644 index 0000000..1946c28 --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/llvm/locals.scm @@ -0,0 +1,14 @@ +; Scopes + +(function_body) @local.scope + +; Definitions + +(argument + (value (var (local_var) @local.definition))) + +(instruction + (local_var) @local.definition) + +; References +(local_var) @local.reference diff --git a/helix-22.03-x86_64-windows/runtime/queries/llvm/textobjects.scm b/helix-22.03-x86_64-windows/runtime/queries/llvm/textobjects.scm new file mode 100644 index 0000000..dd15dc1 --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/llvm/textobjects.scm @@ -0,0 +1,20 @@ +(define + body: (_) @function.inside) @function.around + +(struct_type + (struct_body) @class.inside) @class.around + +(packed_struct_type + (struct_body) @class.inside) @class.around + +(array_type + (array_vector_body) @class.inside) @class.around + +(vector_type + (array_vector_body) @class.inside) @class.around + +(argument) @parameter.inside + +(comment) @comment.inside + +(comment)+ @comment.around |