diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-06-12 09:54:30 -0600 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2025-05-12 18:43:40 +0200 |
| commit | 692b051b09935653befdb8f7ba8afdb640adf17b (patch) | |
| tree | 167162b6b129ae04f68c5735078521a72917c742 /runtime/queries/pioasm | |
| parent | feat(c-family): inherit injections (diff) | |
| download | nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2 nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip | |
feat!: drop modules, general refactor and cleanup
Diffstat (limited to 'runtime/queries/pioasm')
| -rw-r--r-- | runtime/queries/pioasm/highlights.scm | 93 | ||||
| -rw-r--r-- | runtime/queries/pioasm/injections.scm | 15 |
2 files changed, 108 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) diff --git a/runtime/queries/pioasm/injections.scm b/runtime/queries/pioasm/injections.scm new file mode 100644 index 000000000..84d17cf2d --- /dev/null +++ b/runtime/queries/pioasm/injections.scm @@ -0,0 +1,15 @@ +([ + (line_comment) + (block_comment) +] @injection.content + (#set! injection.language "comment")) + +((code_block + (code_block_language) @_language + (code_block_body) @injection.content) + (#eq? @_language "c-sdk") + (#set! injection.language "c")) + +(code_block + (code_block_language) @injection.language + (code_block_body) @injection.content) |
