Skip to content

Commit d21d689

Browse files
committed
syntax highlighting for Sublime Text
1 parent 190c5da commit d21d689

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

editor/Crabox.sublime-syntax

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
%YAML 1.2
2+
---
3+
4+
name: Crabox
5+
file_extensions:
6+
- crabox
7+
scope: source.crabox
8+
contexts:
9+
main:
10+
- match: ';'
11+
scope: punctuation.definition.comment.crabox
12+
push: line_comment
13+
14+
- match: '\b(zero|inc|dec|load|store|brnz|j|jal|or|add|sub|inv|noop)\b'
15+
scope: keyword.other.crabox
16+
comment: 'Instruction'
17+
18+
- match: '\b(r0|r1|r2|r3|r4|r5|r6|ap)\b'
19+
scope: constant.other.crabox
20+
comment: 'Register'
21+
22+
- match: '\b(-)?[0-9.]+\b'
23+
scope: constant.numeric.crabox
24+
25+
line_comment:
26+
- meta_scope: comment.line.crabox
27+
- match: $
28+
pop: true

0 commit comments

Comments
 (0)