mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
feat: add tree-sitter-asm parser (#5946)
This commit is contained in:
parent
6d1ab048d2
commit
cab95b2f96
5 changed files with 70 additions and 0 deletions
|
|
@ -178,6 +178,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [angular](https://github.com/dlvandenberg/tree-sitter-angular) (experimental, maintained by @dlvandenberg)
|
- [x] [angular](https://github.com/dlvandenberg/tree-sitter-angular) (experimental, maintained by @dlvandenberg)
|
||||||
- [x] [apex](https://github.com/aheber/tree-sitter-sfapex) (maintained by @aheber)
|
- [x] [apex](https://github.com/aheber/tree-sitter-sfapex) (maintained by @aheber)
|
||||||
- [x] [arduino](https://github.com/ObserverOfTime/tree-sitter-arduino) (maintained by @ObserverOfTime)
|
- [x] [arduino](https://github.com/ObserverOfTime/tree-sitter-arduino) (maintained by @ObserverOfTime)
|
||||||
|
- [x] [asm](https://github.com/rush-rs/tree-sitter-asm) (maintained by @RubixDev)
|
||||||
- [x] [astro](https://github.com/virchau13/tree-sitter-astro) (maintained by @virchau13)
|
- [x] [astro](https://github.com/virchau13/tree-sitter-astro) (maintained by @virchau13)
|
||||||
- [x] [authzed](https://github.com/mleonidas/tree-sitter-authzed) (maintained by @mattpolzin)
|
- [x] [authzed](https://github.com/mleonidas/tree-sitter-authzed) (maintained by @mattpolzin)
|
||||||
- [ ] [awk](https://github.com/Beaglefoot/tree-sitter-awk)
|
- [ ] [awk](https://github.com/Beaglefoot/tree-sitter-awk)
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,9 @@
|
||||||
"arduino": {
|
"arduino": {
|
||||||
"revision": "ff1045f5da90344d547022c50f1756be4adaf721"
|
"revision": "ff1045f5da90344d547022c50f1756be4adaf721"
|
||||||
},
|
},
|
||||||
|
"asm": {
|
||||||
|
"revision": "c7b1167ac0b4ded65850d0751bbbb107ed527566"
|
||||||
|
},
|
||||||
"astro": {
|
"astro": {
|
||||||
"revision": "e924787e12e8a03194f36a113290ac11d6dc10f3"
|
"revision": "e924787e12e8a03194f36a113290ac11d6dc10f3"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,14 @@ list.arduino = {
|
||||||
maintainers = { "@ObserverOfTime" },
|
maintainers = { "@ObserverOfTime" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.asm = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/RubixDev/tree-sitter-asm",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
},
|
||||||
|
maintainers = { "@RubixDev" },
|
||||||
|
}
|
||||||
|
|
||||||
list.astro = {
|
list.astro = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/virchau13/tree-sitter-astro",
|
url = "https://github.com/virchau13/tree-sitter-astro",
|
||||||
|
|
|
||||||
53
queries/asm/highlights.scm
Normal file
53
queries/asm/highlights.scm
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
; General
|
||||||
|
(label
|
||||||
|
(ident) @label)
|
||||||
|
|
||||||
|
(reg) @variable.builtin
|
||||||
|
|
||||||
|
(meta
|
||||||
|
kind: (_) @function.builtin)
|
||||||
|
|
||||||
|
(instruction
|
||||||
|
kind: (_) @function.builtin)
|
||||||
|
|
||||||
|
; Comments
|
||||||
|
[
|
||||||
|
(line_comment)
|
||||||
|
(block_comment)
|
||||||
|
] @comment @spell
|
||||||
|
|
||||||
|
; Literals
|
||||||
|
(int) @number
|
||||||
|
|
||||||
|
(float) @number.float
|
||||||
|
|
||||||
|
(string) @string
|
||||||
|
|
||||||
|
; Keywords
|
||||||
|
[
|
||||||
|
"byte"
|
||||||
|
"word"
|
||||||
|
"dword"
|
||||||
|
"qword"
|
||||||
|
"ptr"
|
||||||
|
"rel"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
; Operators & Punctuation
|
||||||
|
[
|
||||||
|
"+"
|
||||||
|
"-"
|
||||||
|
"*"
|
||||||
|
] @operator
|
||||||
|
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
[
|
||||||
|
","
|
||||||
|
":"
|
||||||
|
] @punctuation.delimiter
|
||||||
5
queries/asm/injections.scm
Normal file
5
queries/asm/injections.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
([
|
||||||
|
(line_comment)
|
||||||
|
(block_comment)
|
||||||
|
] @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue