mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-05 13:00:08 -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] [apex](https://github.com/aheber/tree-sitter-sfapex) (maintained by @aheber)
|
||||
- [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] [authzed](https://github.com/mleonidas/tree-sitter-authzed) (maintained by @mattpolzin)
|
||||
- [ ] [awk](https://github.com/Beaglefoot/tree-sitter-awk)
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@
|
|||
"arduino": {
|
||||
"revision": "ff1045f5da90344d547022c50f1756be4adaf721"
|
||||
},
|
||||
"asm": {
|
||||
"revision": "c7b1167ac0b4ded65850d0751bbbb107ed527566"
|
||||
},
|
||||
"astro": {
|
||||
"revision": "e924787e12e8a03194f36a113290ac11d6dc10f3"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -120,6 +120,14 @@ list.arduino = {
|
|||
maintainers = { "@ObserverOfTime" },
|
||||
}
|
||||
|
||||
list.asm = {
|
||||
install_info = {
|
||||
url = "https://github.com/RubixDev/tree-sitter-asm",
|
||||
files = { "src/parser.c" },
|
||||
},
|
||||
maintainers = { "@RubixDev" },
|
||||
}
|
||||
|
||||
list.astro = {
|
||||
install_info = {
|
||||
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