]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/raku.yaml
Raku syntax: fix comments (#2318)
[micro.git] / runtime / syntax / raku.yaml
1 filetype: raku
2
3 detect:
4     filename: "(\\.p6$|\\.pl6$|\\.pm6$|\\.raku$|\\.rakumod$|\\.rakudoc$)"
5
6 rules:
7     - type: "\\b(accept|alarm|atan2|bin(d|mode)|c(aller|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)|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|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|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|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|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\\b"
8     - 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"
9     - special: "\\b(has|is|class|role|given|when|BUILD|multi|returns|method|submethod|slurp|say|sub)\\b"
10
11     - identifier: "[$@%&](\\.|!|\\^)?([[:alpha:]]|_)"
12     - identifier: "[$@%&](\\.|!|^)?([[:alpha:]]|_)([[:alnum:]]|-|_)*([[:alnum:]]|_)"
13     - identifier: "[$@%&](\\?|\\*)([A-Z])([A-Z]|-)*([A-Z])"
14
15     - constant.string:
16         start: "\""
17         end: "\""
18         skip: "\\\\."
19         rules:
20             - constant.specialChar: "\\\\."
21
22     - constant.string:
23         start: "'"
24         end: "'"
25         skip: "\\\\."
26         rules:
27             - constant.specialChar: "\\\\."
28
29     - preproc:
30         start: "(^use| = new)"
31         end: ";"
32         rules: []
33
34     - identifier.macro:
35         start: "<<EOSQL"
36         end: "EOSQL"
37         rules: []
38
39     - comment:
40         start: "#"
41         end: "$"
42         rules: []