-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhas.sublime-syntax
48 lines (46 loc) · 1.46 KB
/
has.sublime-syntax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
%YAML 1.2
---
name: X68000 HAS assembly
file_extensions: [s, S, has, HAS]
scope: source.s
# https://www.sublimetext.com/docs/3/scope_naming.html#markup
# https://www.sublimetext.com/docs/3/syntax.html
contexts:
main:
- match: \b([ad][0-7]|sp|pc|sr)\b
scope: variable.parameter
- match: \b(b(eq|sr|lt|ge|ne|ra|cs|mi|cc|ls|le|pl)|(cmp|move|sub|add|and|div|swap|clr|or)[qimua]?|[lp]ea|(ls|ro)[rl]|rt[es]|dbra|j(sr|mp)|stop|reset|t?st)(\.[bwls])?\b
scope: keyword.control.s
- match: ^\s*\.(cpu|text|data|include|bss|end|global|quad)\b
scope: storage.type.function
- match: \binclude\b
scope: keyword.control.s
push: include
- match: ^\s*[a-zA-Z_@][a-zA-Z0-9_@]+:\s*
scope: entity.name.function
- match: \@[fb]\b
scope: entity.name.function
- match: \$[0-9a-fA-F]+(\.[lwb])?
scope: constant.numeric.integer.hexadecimal
- match: \b[0-9]+\b(\.[lwb])?
scope: constant.numeric.integer.decimal
- match: \'
push: string
- match: (\*|\;).*$
scope: comment.line
- match: \s*\.d[cs]\.[bwl]\b
scope: support.type
- match: (DOS|IOCS|FEFUNC)\s+_[A-Z0-9_]+
scope: support.constant
- match: \b[a-zA-Z_][a-zA-Z0-9_]+\b
scope: entity.name.function
string:
- meta_scope: string.quoted.single.c
# - match: \\.
# scope: constant.character.escape.c
- match: \'
pop: true
include:
- meta_scope: string.quoted.single.c
- match: $
pop: true