-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpnach.sublime-syntax
92 lines (82 loc) · 2.25 KB
/
pnach.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
%YAML 1.2
---
name: pnach
file_extensions:
- pnach
scope: source.pnach
contexts:
main:
- include: valid
- include: comment
# - include: invalid_all
comment:
- match: (?i)^\s*(//)(.*)
scope: comment.line.pnach
captures:
1: punctuation.definition.comment.pnach
valid:
- match: (?i)(gametitle)\s*(=)\s*(.*)
captures:
1: keyword.declaration.class.pnach
2: keyword.operator.assignment.pnach
3: string.unquoted.title.pnach
- match: (?i)(comment)\s*(=)\s*(.*)
captures:
1: keyword.declaration.interface.pnach
2: keyword.operator.assignment.pnach
3: string.unquoted.comment.pnach
- match: (?i)(patch)\s*(=)
captures:
1: keyword.declaration.function.pnach
2: keyword.operator.assignment.pnach
set: code_state
code_state:
- match: (?i)((0)|(1)|(.))(,)
captures:
1: keyword.control.conditional.select.pnach
2: markup.deleted.pnach
3: markup.inserted.pnach
4: invalid.illegal.pnach
5: punctuation.separator.sequence.pnach
set: code_target
- match: .
pop: true
code_target:
- match: (?i)((EE|IOP)|(\w+))(,)
captures:
1: storage.type.impl.pnach
3: invalid.illegal.pnach
4: punctuation.separator.sequence.pnach
set: code_address
- match: .
pop: true
code_address:
- match: (?i)((([0-4DE])|(9F)|(.))(([0-9A-F]{7})|(.*)))(,)
captures:
1: constant.numeric.integer.hexadecimal.pnach
2: keyword.control.conditional.case.pnach
4: invalid.deprecated.pnach
5: invalid.illegal.pnach
6: variable.parameter.pnach
8: invalid.illegal.pnach
9: punctuation.separator.sequence.pnach
set: code_type
- match: .
pop: true
code_type:
- match: (?i)((extended|byte|short|word)|(.*))(,)
captures:
1: storage.type.trait.pnach
3: invalid.illegal.pnach
4: punctuation.separator.sequence.pnach
set: code_value
- match: .
pop: true
code_value:
- match: (?i)(([0-9A-F]{8})|(.*))$
captures:
1: constant.numeric.integer.hexadecimal.pnach
3: invalid.illegal.pnach
pop: true
- match: .
pop: true