feat: add tree-sitter-asm parser (#5946)

This commit is contained in:
wzy 2024-02-09 16:50:46 +08:00 committed by GitHub
parent 6d1ab048d2
commit cab95b2f96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 70 additions and 0 deletions

View file

@ -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)

View file

@ -14,6 +14,9 @@
"arduino": {
"revision": "ff1045f5da90344d547022c50f1756be4adaf721"
},
"asm": {
"revision": "c7b1167ac0b4ded65850d0751bbbb107ed527566"
},
"astro": {
"revision": "e924787e12e8a03194f36a113290ac11d6dc10f3"
},

View file

@ -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",

View 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

View file

@ -0,0 +1,5 @@
([
(line_comment)
(block_comment)
] @injection.content
(#set! injection.language "comment"))