diff options
| author | leo60228 <leo@60228.dev> | 2021-08-29 13:10:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-29 12:10:15 -0500 |
| commit | 93f415029db18bda8b527754d048cc5f5063df53 (patch) | |
| tree | 51470f08d54377f6286131ad3a7871770cc98098 /queries | |
| parent | a90e5f4c5f7eb0d87b9bafa1825d31b1fc3a2581 (diff) | |
Add tree-sitter-pioasm with highlights and injections (#1759)
* add tree-sitter-pioasm with highlights and injections
* [docgen] Update README.md
skip-checks: true
* remove ada injection from pioasm
* address review
* remove unnecessary python predicate
Co-authored-by: Github Actions <actions@github>
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/pioasm/highlights.scm | 30 | ||||
| -rw-r--r-- | queries/pioasm/injections.scm | 10 |
2 files changed, 40 insertions, 0 deletions
diff --git a/queries/pioasm/highlights.scm b/queries/pioasm/highlights.scm new file mode 100644 index 00000000..c455103f --- /dev/null +++ b/queries/pioasm/highlights.scm @@ -0,0 +1,30 @@ +[ (line_comment) (block_comment) ] @comment + +(label_decl) @label + +(string) @string + +(instruction + opcode: _ @keyword) + +[ "pins" "x" "y" "null" "isr" "osr" "status" "pc" "exec" ] @variable.builtin + +(out_target "pindirs" @variable.builtin) +(directive "pindirs" @keyword) + +(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 + +(integer) @number + +(directive (identifier) @variable) +(directive (symbol_def (identifier) @variable)) +(value (identifier) @variable) + +(directive + directive: _ @keyword) diff --git a/queries/pioasm/injections.scm b/queries/pioasm/injections.scm new file mode 100644 index 00000000..a8a0cf49 --- /dev/null +++ b/queries/pioasm/injections.scm @@ -0,0 +1,10 @@ + [ (line_comment) (block_comment) ] @comment + +((code_block + (code_block_language) @_language + (code_block_body) @c) + (#eq? @_language "c-sdk")) + +(code_block + (code_block_language) @language + (code_block_body) @content) |
