mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 17:30:08 -04:00
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>
This commit is contained in:
parent
1e7436ca37
commit
df06bfead2
4 changed files with 50 additions and 0 deletions
|
|
@ -191,6 +191,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [ocaml_interface](https://github.com/tree-sitter/tree-sitter-ocaml) (maintained by @undu)
|
- [x] [ocaml_interface](https://github.com/tree-sitter/tree-sitter-ocaml) (maintained by @undu)
|
||||||
- [x] [ocamllex](https://github.com/atom-ocaml/tree-sitter-ocamllex) (maintained by @undu)
|
- [x] [ocamllex](https://github.com/atom-ocaml/tree-sitter-ocamllex) (maintained by @undu)
|
||||||
- [x] [php](https://github.com/tree-sitter/tree-sitter-php) (maintained by @tk-shirasaka)
|
- [x] [php](https://github.com/tree-sitter/tree-sitter-php) (maintained by @tk-shirasaka)
|
||||||
|
- [x] [pioasm](https://github.com/leo60228/tree-sitter-pioasm) (maintained by @leo60228)
|
||||||
- [x] [python](https://github.com/tree-sitter/tree-sitter-python) (maintained by @stsewd, @theHamsta)
|
- [x] [python](https://github.com/tree-sitter/tree-sitter-python) (maintained by @stsewd, @theHamsta)
|
||||||
- [x] [ql](https://github.com/tree-sitter/tree-sitter-ql) (maintained by @pwntester)
|
- [x] [ql](https://github.com/tree-sitter/tree-sitter-ql) (maintained by @pwntester)
|
||||||
- [x] [Tree-sitter query language](https://github.com/nvim-treesitter/tree-sitter-query) (maintained by @steelsojka)
|
- [x] [Tree-sitter query language](https://github.com/nvim-treesitter/tree-sitter-query) (maintained by @steelsojka)
|
||||||
|
|
|
||||||
|
|
@ -693,6 +693,15 @@ list.json5 = {
|
||||||
maintainers = { "@Joakker" },
|
maintainers = { "@Joakker" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.pioasm = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/leo60228/tree-sitter-pioasm",
|
||||||
|
branch = "main",
|
||||||
|
files = { "src/parser.c", "src/scanner.c" },
|
||||||
|
},
|
||||||
|
maintainers = { "@leo60228" },
|
||||||
|
}
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
list = list,
|
list = list,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
30
queries/pioasm/highlights.scm
Normal file
30
queries/pioasm/highlights.scm
Normal file
|
|
@ -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)
|
||||||
10
queries/pioasm/injections.scm
Normal file
10
queries/pioasm/injections.scm
Normal file
|
|
@ -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)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue