-
Notifications
You must be signed in to change notification settings - Fork 0
/
source.yaml
53 lines (53 loc) · 1.05 KB
/
source.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
52
53
forit:
regex: ifor (.+?) in (.+):<i1>4<i2>
tokens: [var_name,lst,statements]
statements:
replace: [["\n$"]]
for_loop:
regex: for (.+?) in (.+):<i1>4<i2>
tokens: [var_name,list,statements]
list:
replace: [["\\.\\.",","]]
statements:
replace: [["\n$"]]
end:
regex: (.+):<i1>3<i2>
tokens: [start,inside]
inside:
replace: [["\n$"]]
elif:
regex: "elif ([^:]+):$"
tokens: [bool,end]
if:
regex: "if ([^:]+):$"
tokens: [bool,end]
while:
regex: "while ([^:]+):$"
tokens: [bool,end]
shorthand:
regex: ([A-Za-z0-9_ ]+)([+-/\*])=(.+)
tokens: [var,op,res]
not:
regex: "!="
tokens: []
require:
regex: import (.+)$
tokens: [module]
chk:
regex: chk (.+),(.+)$
tokens: [bool,message]
local:
regex: "!<var>(\\s*=)"
tokens: [var,end]
loc:
replace: [["!","local "]]
until:
regex: until (.+)<i1>3<i2>
tokens: [bool,statements]
statements:
replace: [["\n$"]]
settings:
variables:
i1: "(\n(\t+?).*(?:(?:\n\\"
i2: ".*)*\n*)*)"
var: ([A-Za-z0-9_]+)