aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/asm/highlights.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/asm/highlights.scm')
-rw-r--r--runtime/queries/asm/highlights.scm66
1 files changed, 66 insertions, 0 deletions
diff --git a/runtime/queries/asm/highlights.scm b/runtime/queries/asm/highlights.scm
new file mode 100644
index 000000000..eccf9c996
--- /dev/null
+++ b/runtime/queries/asm/highlights.scm
@@ -0,0 +1,66 @@
+; General
+(label
+ [
+ (ident)
+ (word)
+ ] @label)
+
+(reg) @variable.builtin
+
+(meta
+ kind: (_) @function.builtin)
+
+(instruction
+ kind: (_) @function.builtin)
+
+(const
+ name: (word) @constant)
+
+; Comments
+[
+ (line_comment)
+ (block_comment)
+] @comment @spell
+
+; Literals
+(int) @number
+
+(float) @number.float
+
+(string) @string
+
+; Keywords
+[
+ "byte"
+ "word"
+ "dword"
+ "qword"
+ "ptr"
+ "rel"
+ "label"
+ "const"
+] @keyword
+
+; Operators & Punctuation
+[
+ "+"
+ "-"
+ "*"
+ "/"
+ "%"
+ "|"
+ "^"
+ "&"
+] @operator
+
+[
+ "("
+ ")"
+ "["
+ "]"
+] @punctuation.bracket
+
+[
+ ","
+ ":"
+] @punctuation.delimiter