mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -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
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