aboutsummaryrefslogtreecommitdiff
path: root/helix-22.03-x86_64-windows/runtime/queries/llvm-mir
diff options
context:
space:
mode:
Diffstat (limited to 'helix-22.03-x86_64-windows/runtime/queries/llvm-mir')
-rw-r--r--helix-22.03-x86_64-windows/runtime/queries/llvm-mir/highlights.scm136
-rw-r--r--helix-22.03-x86_64-windows/runtime/queries/llvm-mir/indents.toml7
-rw-r--r--helix-22.03-x86_64-windows/runtime/queries/llvm-mir/injections.scm2
-rw-r--r--helix-22.03-x86_64-windows/runtime/queries/llvm-mir/textobjects.scm12
4 files changed, 157 insertions, 0 deletions
diff --git a/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/highlights.scm b/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/highlights.scm
new file mode 100644
index 0000000..7923461
--- /dev/null
+++ b/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/highlights.scm
@@ -0,0 +1,136 @@
+[
+ (label)
+ (bb_ref)
+] @label
+
+[
+ (comment)
+ (multiline_comment)
+] @comment
+
+[
+ "("
+ ")"
+ "["
+ "]"
+ "{"
+ "}"
+ "<"
+ ">"
+] @punctuation.bracket
+
+[
+ ","
+ ":"
+ "|"
+ "*"
+] @punctuation.delimiter
+
+[
+ "="
+ "x"
+] @operator
+
+[
+ "true"
+ "false"
+] @constant.builtin.boolean
+
+[
+ "null"
+ "_"
+ "unknown-address"
+] @constant.builtin
+
+[
+ (stack_object)
+ (constant_pool_index)
+ (jump_table_index)
+ (var)
+ (physical_register)
+ (ir_block)
+ (external_symbol)
+ (global_var)
+ (ir_local_var)
+ (metadata_ref)
+ (mnemonic)
+] @variable
+
+(low_level_type) @type
+
+[
+ (immediate_type)
+ (primitive_type)
+] @type.builtin
+
+(number) @constant.numeric.integer
+(float) @constant.numeric.float
+(string) @string
+
+(instruction name: _ @keyword.operator)
+
+[
+ "successors"
+ "liveins"
+ "pre-instr-symbol"
+ "post-instr-symbol"
+ "heap-alloc-marker"
+ "debug-instr-number"
+ "debug-location"
+ "mcsymbol"
+ "tied-def"
+ "target-flags"
+ "CustomRegMask"
+ "same_value"
+ "def_cfa_register"
+ "restore"
+ "undefined"
+ "offset"
+ "rel_offset"
+ "def_cfa"
+ "llvm_def_aspace_cfa"
+ "register"
+ "escape"
+ "remember_state"
+ "restore_state"
+ "window_save"
+ "negate_ra_sign_state"
+ "intpred"
+ "floatpred"
+ "shufflemask"
+ "liveout"
+ "target-index"
+ "blockaddress"
+ "intrinsic"
+ "load"
+ "store"
+ "unknown-size"
+ "on"
+ "from"
+ "into"
+ "align"
+ "basealign"
+ "addrspace"
+ "call-entry"
+ "custom"
+ "constant-pool"
+ "stack"
+ "got"
+ "jump-table"
+ "syncscope"
+ "address-taken"
+ "landing-pad"
+ "inlineasm-br-indirect-target"
+ "ehfunclet-entry"
+ "bbsections"
+
+ (intpred)
+ (floatpred)
+ (memory_operand_flag)
+ (atomic_ordering)
+ (register_flag)
+ (instruction_flag)
+ (float_keyword)
+] @keyword
+
+(ERROR) @error
diff --git a/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/indents.toml b/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/indents.toml
new file mode 100644
index 0000000..6a70e5a
--- /dev/null
+++ b/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/indents.toml
@@ -0,0 +1,7 @@
+indent = [
+ "basic_block",
+]
+
+outdent = [
+ "label",
+]
diff --git a/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/injections.scm b/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/injections.scm
new file mode 100644
index 0000000..0b476f8
--- /dev/null
+++ b/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/injections.scm
@@ -0,0 +1,2 @@
+([ (comment) (multiline_comment)] @injection.content
+ (#set! injection.language "comment"))
diff --git a/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/textobjects.scm b/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/textobjects.scm
new file mode 100644
index 0000000..003ce59
--- /dev/null
+++ b/helix-22.03-x86_64-windows/runtime/queries/llvm-mir/textobjects.scm
@@ -0,0 +1,12 @@
+(basic_block) @function.around
+
+(argument) @parameter.inside
+
+[
+ (comment)
+ (multiline_comment)
+] @comment.inside
+
+(comment)+ @comment.around
+
+(multiline_comment) @comment.around