feat: add objdump to the supported languages (#5548)

This commit is contained in:
Colin Kennedy 2023-10-22 02:05:20 -07:00 committed by GitHub
parent 07dbb3845c
commit 0179a89656
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 0 deletions

View file

@ -305,6 +305,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [norg](https://github.com/nvim-neorg/tree-sitter-norg) (maintained by @JoeyGrajciar, @vhyrro)
- [x] [nqc](https://github.com/amaanq/tree-sitter-nqc) (maintained by @amaanq)
- [x] [objc](https://github.com/amaanq/tree-sitter-objc) (maintained by @amaanq)
- [x] [objdump](https://github.com/ColinKennedy/tree-sitter-objdump) (maintained by @ColinKennedy)
- [x] [ocaml](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)

View file

@ -395,6 +395,9 @@
"objc": {
"revision": "62e61b6f5c0289c376d61a8c91faf6435cde9012"
},
"objdump": {
"revision": "64e4741d58345c36ded639f5a3bcd7811be7f8f8"
},
"ocaml": {
"revision": "694c57718fd85d514f8b81176038e7a4cfabcaaf"
},

View file

@ -1188,6 +1188,14 @@ list.objc = {
maintainers = { "@amaanq" },
}
list.objdump = {
install_info = {
url = "https://github.com/ColinKennedy/tree-sitter-objdump",
files = { "src/parser.c", "src/scanner.c" },
},
maintainers = { "@ColinKennedy" },
}
list.ocaml = {
install_info = {
url = "https://github.com/tree-sitter/tree-sitter-ocaml",

View file

@ -0,0 +1,35 @@
(byte) @constant
[
(hexadecimal)
(integer)
(address)
] @number
[
"file" "format"
"File" "Offset:"
"discriminator"
] @text
"Disassembly of section " @text.title
(section_address) @number @text.underline
(identifier) @variable
(code_location (identifier) @function.call)
(header (identifier) @keyword)
(disassembly_section_label (identifier) @namespace)
(disassembly_section (identifier) @namespace)
[(file_offset) (discriminator)] @field
(file_path) @string
(instruction) @function
(bad_instruction) @text.warning
(label) @label
["<" ">"] @punctuation.special
["(" ")"] @punctuation.bracket
["+" ":"] @punctuation.delimiter
(comment) @comment.documentation

View file

@ -0,0 +1,6 @@
; TODO: https://github.com/nvim-treesitter/nvim-treesitter/pull/5548#issuecomment-1773707396
;
; To be added once a compatible Assembly parser is merged into nvim-treesitter
;
; ((instruction) @injection.content
; (#set! injection.language "asm"))