mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat: add m68k parser and queries
This commit is contained in:
parent
5c2bc57ced
commit
7a01241ba6
4 changed files with 86 additions and 0 deletions
|
|
@ -179,6 +179,9 @@
|
|||
"lua": {
|
||||
"revision": "2b4ffd5a5ffd0c6b4c84f0d9e003050a70db2a37"
|
||||
},
|
||||
"m68k": {
|
||||
"revision": "4760f19a60e0d0598032ddd6683999284c3c2bb4"
|
||||
},
|
||||
"make": {
|
||||
"revision": "a4b9187417d6be349ee5fd4b6e77b4172c6827dd"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1041,6 +1041,15 @@ list.wgsl = {
|
|||
filetype = "wgsl",
|
||||
}
|
||||
|
||||
list.m68k = {
|
||||
install_info = {
|
||||
url = "https://github.com/grahambates/tree-sitter-m68k",
|
||||
files = { "src/parser.c" },
|
||||
},
|
||||
maintainers = { "@grahambates" },
|
||||
filetype = "asm68k",
|
||||
}
|
||||
|
||||
local M = {
|
||||
list = list,
|
||||
filetype_to_parsername = filetype_to_parsername,
|
||||
|
|
|
|||
1
queries/m68k/folds.scm
Normal file
1
queries/m68k/folds.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(element_list) @fold
|
||||
73
queries/m68k/highlights.scm
Normal file
73
queries/m68k/highlights.scm
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
(symbol) @variable
|
||||
|
||||
(label name: (symbol) @constant)
|
||||
|
||||
[
|
||||
(instruction_mnemonic)
|
||||
(directive_mnemonic)
|
||||
] @function.builtin
|
||||
|
||||
(include (directive_mnemonic) @include)
|
||||
(include_bin (directive_mnemonic) @include)
|
||||
(include_dir (directive_mnemonic) @include)
|
||||
|
||||
|
||||
(size) @attribute
|
||||
|
||||
(macro_definition name: (symbol) @function.macro)
|
||||
(macro_call name: (symbol) @function.macro)
|
||||
|
||||
[
|
||||
(path)
|
||||
(string_literal)
|
||||
] @string
|
||||
|
||||
[
|
||||
(decimal_literal)
|
||||
(hexadecimal_literal)
|
||||
(octal_literal)
|
||||
(binary_literal)
|
||||
] @number
|
||||
|
||||
[
|
||||
(reptn)
|
||||
(carg)
|
||||
(narg)
|
||||
(macro_arg)
|
||||
] @variable.builtin
|
||||
|
||||
[
|
||||
(control_mnemonic)
|
||||
(address_register)
|
||||
(data_register)
|
||||
(float_register)
|
||||
(named_register)
|
||||
] @keyword
|
||||
|
||||
(repeat (control_mnemonic) @repeat)
|
||||
(conditional (control_mnemonic) @conditional)
|
||||
|
||||
(interpolated (macro_arg) @embedded)
|
||||
|
||||
(comment) @comment
|
||||
|
||||
[
|
||||
(operator)
|
||||
"="
|
||||
"#"
|
||||
] @operator
|
||||
|
||||
[
|
||||
"."
|
||||
","
|
||||
"/"
|
||||
"-"
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
")+"
|
||||
] @punctuation.bracket
|
||||
|
||||
(section) @namespace
|
||||
Loading…
Add table
Add a link
Reference in a new issue