From c32abac525257723879f1cfe5cc59528105d29c6 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Mon, 31 Oct 2022 23:29:26 +0200 Subject: [PATCH] highlights(pioasm): fix captures --- queries/pioasm/highlights.scm | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/queries/pioasm/highlights.scm b/queries/pioasm/highlights.scm index c455103f9..aa176aa24 100644 --- a/queries/pioasm/highlights.scm +++ b/queries/pioasm/highlights.scm @@ -4,21 +4,26 @@ (string) @string -(instruction - opcode: _ @keyword) +(instruction opcode: _ @function.call) -[ "pins" "x" "y" "null" "isr" "osr" "status" "pc" "exec" ] @variable.builtin +[ "pins" "x" "y" "null" "isr" "osr" "osre" "status" "pc" "exec" ] @constant.builtin +(wait_source [ "irq" "gpio" "pin" ] @constant.builtin) -(out_target "pindirs" @variable.builtin) -(directive "pindirs" @keyword) +(out_target "pindirs" @constant.builtin) +(set_target "pindirs" @constant.builtin) +(directive "pindirs" @attribute) (condition [ "--" "!=" ] @operator) (expression [ "+" "-" "*" "/" "|" "&" "^" "::" ] @operator) (not) @operator -[ "optional" "opt" "side" "sideset" "side_set" "pin" "gpio" "osre" ] @keyword -[ "block" "noblock" "iffull" "ifempty" "rel" ] @keyword -(irq_modifiers) @keyword +[ (optional) (irq_modifiers) ] @type.qualifier + +[ "block" "noblock" "rel" ] @attribute + +[ "iffull" "ifempty" ] @conditional + +"public" @storageclass (integer) @number @@ -26,5 +31,4 @@ (directive (symbol_def (identifier) @variable)) (value (identifier) @variable) -(directive - directive: _ @keyword) +(directive directive: _ @preproc)