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

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