on master help sign in
add GNU assembler (gas) support #8291)
commit941dc6c614d684804c3580c4ae8b3c4368aab217 authorCyrill Schenkel <cyrill.schenkel@gmail.com> dateSat 16 Sep 2023, 02:04 (3 years ago) parent19d44b6
5 files changed+40−1
book/src/generated/lang-support.md+1 languages.toml+14−1 runtime/queries/gas/highlights.scm+21 runtime/queries/gas/injections.scm+2 runtime/queries/gas/textobjects.scm+2
book/src/generated/lang-support.md+1
@@ -44,6 +44,7 @@
4444| forth | ✓ | | | `forth-lsp` |
4545| fortran | ✓ | | ✓ | `fortls` |
4646| fsharp | ✓ | | | `fsautocomplete` |
47+| gas | ✓ | ✓ | | |
4748| gdscript | ✓ | ✓ | ✓ | |
4849| gemini | ✓ | | | |
4950| git-attributes | ✓ | | | |
languages.toml+14−1
@@ -2495,7 +2495,7 @@ source = { git = "https://github.com/erasin/tree-sitter-po", rev = "417cee9abb20
24952495[[language]]
24962496name = "nasm"
24972497scope = "source.nasm"
2498−file-types = ["asm", "s", "S", "nasm"]
2498+file-types = ["asm", "S", "nasm"]
24992499injection-regex = "n?asm"
25002500roots = []
25012501comment-token = ";"
@@ -2505,6 +2505,19 @@ indent = { tab-width = 8, unit = " " }
25052505name = "nasm"
25062506source = { git = "https://github.com/naclsn/tree-sitter-nasm", rev = "a0db15db6fcfb1bf2cc8702500e55e558825c48b" }
25072507
2508+[[language]]
2509+name = "gas"
2510+scope = "source.gas"
2511+file-types = ["s"]
2512+injection-regex = "gas"
2513+roots = []
2514+comment-token = "#"
2515+indent = { tab-width = 8, unit = " " }
2516+
2517+[[grammar]]
2518+name = "gas"
2519+source = { git = "https://github.com/sirius94/tree-sitter-gas", rev = "60f443646b20edee3b7bf18f3a4fb91dc214259a" }
2520+
25082521[[language]]
25092522name = "rst"
25102523scope = "source.rst"
runtime/queries/gas/highlights.scmnew file+21
@@ -0,0 +1,21 @@
1+(comment) @comment
2+(number) @constant.numeric
3+(directive_name) @keyword.directive
4+(symbol) @variable
5+(label) @function
6+(label)
7+(instruction_prefix) @keyword
8+(instruction_name) @function.special
9+(register) @constant.builtin
10+(string) @string
11+(char) @constant.character
12+(type) @type
13+(constant "$" @constant)
14+(operand_modifier) @attribute
15+
16+(expression
17+ ["-" "+" "*" "/" "="] @operator)
18+
19+["(" ")"] @punctuation.bracket
20+
21+["," ":"] @punctuation.delimiter
runtime/queries/gas/injections.scmnew file+2
@@ -0,0 +1,2 @@
1+((comment) @injection.content
2+ (#set! injection.language "comment"))
runtime/queries/gas/textobjects.scmnew file+2
@@ -0,0 +1,2 @@
1+(comment) @comment.inside
2+(comment)+ @comment.around