Skip to content

Commit 126caa1

Browse files
authored
feat: Add Assembly support (#246)
* feat: Add Assembly support * ignore elc
1 parent 2f0f97a commit 126caa1

File tree

6 files changed

+44
-0
lines changed

6 files changed

+44
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/dist
55

66
*.tar.gz
7+
*.elc

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,3 +382,9 @@
382382
branch = master
383383
update = none
384384
ignore = dirty
385+
[submodule "repos/asm"]
386+
path = repos/asm
387+
url = https://github.com/rush-rs/tree-sitter-asm
388+
branch = main
389+
update = none
390+
ignore = dirty

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
## Unreleased
4+
- Add `Assembly` support
45

56
## 0.12.49 - 2023-09-10
67
- Improve `CMake` highlight.scm

queries/asm/highlights.scm

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
; General
2+
(label (ident) @label)
3+
(reg) @variable.builtin
4+
(meta
5+
kind: (_) @function.builtin)
6+
(instruction
7+
kind: (_) @function.call)
8+
9+
; Comments
10+
(line_comment) @comment
11+
12+
; Literals
13+
(int) @number
14+
(float) @number
15+
(string) @string
16+
17+
; Keywords
18+
[
19+
"byte"
20+
"word"
21+
"dword"
22+
"qword"
23+
"ptr"
24+
"rel"
25+
] @keyword
26+
27+
; Operators & Punctuation
28+
["+" "-" "*"] @operator
29+
30+
["(" ")" "[" "]"] @punctuation.bracket
31+
32+
["," ":"] @punctuation.delimiter

repos/asm

Submodule asm added at 36dc26a

tree-sitter-langs.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ See `tree-sitter-langs-repos'."
101101
'((ada-mode . ada)
102102
(agda-mode . agda)
103103
(agda2-mode . agda)
104+
(fasm-mode . asm)
105+
(masm-mode . asm)
106+
(nasm-mode . asm)
104107
(sh-mode . bash)
105108
(beancount-mode . beancount)
106109
(bibtex-mode . bibtex)

0 commit comments

Comments
 (0)