forked from zyedidia/micro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
perl.yaml
58 lines (47 loc) · 2.32 KB
/
perl.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
54
55
56
57
58
filetype: perl
detect:
filename: "\\.p[lmp]$"
header: "^#!.*/(env +)?perl( |$)"
rules:
- type: "\\b(accept|alarm|atan2|bin(d|mode)|c(aller|homp|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\\b|\\b(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\\b|\\b(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|say|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\\b|\\b(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\\b|\\b(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\\b"
- statement: "\\b(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\\b"
- special: "\\-\\>"
- symbol: "(,|\\.)"
#regexes
- identifier.macro: "m?\\/.*?\\/[a-z]*"
- identifier.macro: "m?\\|.*?\\|[a-z]*"
- identifier.macro: "\\bs/.*?/.*?/[a-z]*"
- identifier.macro: "\\bs\\|.*?\\|.*?\\|[a-z]*"
- constant.string:
start: '"'
end: '"'
skip: '\\"'
rules:
- identifier.var: '[\\$@%].[a-zA-Z0-9_]*'
- constant.string:
start: "'"
end: "'"
skip: "\\\\'"
rules: []
- comment:
start: "#"
end: "$"
rules: []
- constant.string: "\"\\(.*\\)\"|qq?\\|.*\\||qq?\\{.*\\}|qq?\\/.*\\/"
- constant.number: "\\b([0-9]*[.])?[0-9]+"
- constant.number: "\\b[0-9]+"
- constant.number: "\\b0x[a-f0-9]+"
- constant.string.url: "`(.+?)`"
- identifier.var: '[\\$@%].[a-zA-Z0-9_]*'
- preproc:
start: "(^use| = new)"
end: ";"
rules: []
- comment:
start: "^="
end: "^=cut"
rules: []
- identifier.macro:
start: "<< 'STOP'"
end: "STOP"
rules: []