-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsyntax.yaml
51 lines (41 loc) · 1.07 KB
/
syntax.yaml
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
49
50
51
%YAML 1.2
---
name: Simplez
file_extensions: [sz]
scope: source.sz
# Syntax: http://www.sublimetext.com/docs/syntax.html#include-syntax
# Scope naming: https://www.sublimetext.com/docs/scope_naming.html#punctuation
contexts:
main:
- match: "[a-zA-Z][a-zA-Z0-9]*"
scope: entity.name.label.sz
push: instruction
- match: "\\s"
push: instruction
instruction:
- match: "(?i:\\b(ld|st|add|br|bz)\\b)"
scope: keyword.control.sz
push: param
- match: "(?i:\\b(org|data|res)\\b)"
scope: keyword.control.sz
push: param
- match: "(?i:\\b(dec|clr|halt)\\b)"
scope: keyword.control.sz
- match: "(?i:\\b(end)\\b)"
scope: keyword.control.sz
- match: ;
scope: punctuation.definition.comment.sz
push: comment
- match: "\n"
pop: true
param:
- match: "/?[0-9]+"
scope: constant.numeric.integer.decimal.sz
pop: true
- match: "/?[a-zA-Z][a-zA-Z0-9]*"
scope: entity.name.label.sz
pop: true
comment:
- match: "[^\\n]+"
scope: comment.line.sz
pop: 2