-
Notifications
You must be signed in to change notification settings - Fork 1
/
SFLK.sublime-syntax
149 lines (138 loc) · 3.98 KB
/
SFLK.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
%YAML 1.2
---
name: SFLK
file_extensions: [sflk, Sflk, SFLK]
scope: source.sflk
variables:
name: '\b([a-zA-Z]|([a-zA-Z]{3,}))\b'
contexts:
main:
- match: '#####'
scope: punctuation.definition.comment.begin.sflk
push: comment_5
- match: '####'
scope: punctuation.definition.comment.begin.sflk
push: comment_4
- match: '###'
scope: punctuation.definition.comment.begin.sflk
push: comment_3
- match: '##'
scope: punctuation.definition.comment.begin.sflk
push: comment_2
- match: '(#\!)(.*)$'
captures:
0: comment.line.sflk
1: punctuation.definition.comment.begin.sflk
- match: '#'
scope: punctuation.definition.comment.begin.sflk
push: comment_1
- match: '\(\s*\)'
scope: constant.language.null.sflk
- match: '\('
scope: punctuation.section.parens.begin.sflk
push: paren
- match: '\)'
scope: invalid.illegal.sflk
- match: '\{'
scope: punctuation.section.braces.begin.sflk
push: curly
- match: '\}'
scope: invalid.illegal.sflk
- match: '"'
scope: punctuation.definition.string.begin.sflk
push: string_litteral
- match: '[0-9]+'
scope: constant.numeric.integer.decimal.sflk
- match: '(<)'
scope: keyword.other.sflk
- match: '\+|\-|\*|/'
scope: keyword.operator.arithmetic.sflk
- match: '(>)\s*({{name}})'
captures:
1: keyword.operator.sflk
2: variable.function.sflk
- match: '\b(do|wi|dh|ri)\b\s*({{name}})'
captures:
1: keyword.other.sflk
2: variable.function.sflk
- match: '\,\,|\,'
scope: keyword.operator.sflk
- match: '(\.)({{name}})'
captures:
1: punctuation.definition.string.begin.sflk string.other.sflk
2: string.other.sflk
- match: '\.'
scope: keyword.operator.sflk
- match: '>'
scope: keyword.operator.sflk
- match: '\b(ix)\b'
scope: punctuation.accessor.sflk
- match: '\b(if|th|el)\b'
scope: keyword.control.conditional.if.sflk
- match: '\b(lp|wh|bd|sp|ao)\b'
scope: keyword.control.loop.sflk
- match: '\b(fi)\b'
scope: keyword.import.sflk
- match: '\b(np|pr|nl|do|dh|ev|ri|em|rs|in|cx|cy|wi|od|os|ln|gs|ag)\b'
scope: keyword.other.sflk
- match: '\b(v)\b'
scope: variable.parameter.sflk
- match: '({{name}})\s*(\!)'
captures:
1: entity.name.function.sflk
2: punctuation.definition.variable.end.sflk
- match: '{{name}}'
scope: variable.sflk
comment_1:
- meta_scope: comment.block.sflk
- match: '##'
- match: '#'
scope: punctuation.definition.comment.end.sflk
pop: true
comment_2:
- meta_scope: comment.block.sflk
- match: '###'
- match: '##'
scope: punctuation.definition.comment.end.sflk
pop: true
comment_3:
- meta_scope: comment.block.sflk
- match: '####'
- match: '###'
scope: punctuation.definition.comment.end.sflk
pop: true
comment_4:
- meta_scope: comment.block.sflk
- match: '#####'
- match: '####'
scope: punctuation.definition.comment.end.sflk
pop: true
comment_5:
- meta_scope: comment.block.sflk
- match: '######'
- match: '#####'
scope: punctuation.definition.comment.end.sflk
pop: true
paren:
- match: '\)'
scope: punctuation.section.parens.end.sflk
pop: true
- include: main
curly:
- match: '\}'
scope: punctuation.section.braces.end.sflk
pop: true
- include: main
string_litteral:
- meta_scope: string.quoted.double.sflk
- match: '\\$'
scope: constant.character.escape.sflk
- match: '\\x\([0-9a-fA-F]*\)'
scope: constant.character.escape.sflk
- match: '\\d\([0-9]*\)'
scope: constant.character.escape.sflk
- match: '\\(\\|\"|\?|n|t|e|a|b|v|f|r|(x[0-9a-fA-F]{2})|(d[0-9]{2}))'
scope: constant.character.escape.sflk
- match: '"'
scope: punctuation.definition.string.end.sflk
pop: true