aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/pioasm/highlights.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/pioasm/highlights.scm')
-rw-r--r--runtime/queries/pioasm/highlights.scm93
1 files changed, 93 insertions, 0 deletions
diff --git a/runtime/queries/pioasm/highlights.scm b/runtime/queries/pioasm/highlights.scm
new file mode 100644
index 000000000..325005928
--- /dev/null
+++ b/runtime/queries/pioasm/highlights.scm
@@ -0,0 +1,93 @@
+[
+ (line_comment)
+ (block_comment)
+] @comment @spell
+
+(label_decl) @label
+
+(string) @string
+
+(instruction
+ opcode: _ @function.call)
+
+[
+ "pins"
+ "x"
+ "y"
+ "null"
+ "isr"
+ "osr"
+ "osre"
+ "status"
+ "pc"
+ "exec"
+] @constant.builtin
+
+(wait_source
+ [
+ "irq"
+ "gpio"
+ "pin"
+ ] @constant.builtin)
+
+(out_target
+ "pindirs" @constant.builtin)
+
+(set_target
+ "pindirs" @constant.builtin)
+
+(directive
+ "pindirs" @attribute)
+
+(condition
+ [
+ "--"
+ "!="
+ ] @operator)
+
+(expression
+ [
+ "+"
+ "-"
+ "*"
+ "/"
+ "|"
+ "&"
+ "^"
+ "::"
+ ] @operator)
+
+(not) @operator
+
+[
+ (optional)
+ (irq_modifiers)
+] @keyword.modifier
+
+[
+ "block"
+ "noblock"
+ "rel"
+] @attribute
+
+[
+ "iffull"
+ "ifempty"
+] @keyword.conditional
+
+"public" @keyword.modifier
+
+(integer) @number
+
+(directive
+ (identifier) @variable)
+
+(directive
+ (symbol_def
+ (identifier) @variable))
+
+(value
+ (identifier) @variable)
+
+(directive
+ directive: _ @keyword.directive)