-
Notifications
You must be signed in to change notification settings - Fork 1
/
rlx.lang
86 lines (83 loc) · 3.49 KB
/
rlx.lang
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
<?xml version="1.0" encoding="UTF-8"?>
<language id="cg" _name="CG" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">text/plain</property>
<property name="globs">*.rlx</property>
</metadata>
<styles>
<style id="at" _name="stuff" map-to="def:constant" />
<style id="builtin-object" _name="Builtin Object" map-to="def:type"/>
<style id="hashtag" _name="# sign" map-to="def:comment" />
<style id="other" _name="other stuff" map-to="def:identifier" />
<style id="stuff" _name="more stuff" map-to="def:statement" />
<style id="module-handler" _name="Module Handler" map-to="def:preprocessor"/>
<style id="number" _name="more number" map-to="def:preprocessor"/>
<style id="chars" _name="chars Conversion" map-to="def:special-char"/>
<style id="escaped-character" _name="Escaped Character" map-to="def:special-char"/>
<style id="string" _name="String" map-to="def:string"/>
</styles>
<definitions>
<context id="cg">
<include>
<define-regex id="escaped-character" extended="true">
\\( # leading backslash
[\\\"\'nrbtfav\?] | # escaped character
[0-7]{1,3} | # one, two, or three octal digits
x[0-9A-Fa-f]+ # 'x' followed by hex digits
)
</define-regex>
<context id="at" style-ref="at">
<keyword>LIST</keyword>
<keyword>SET</keyword>
<keyword>DELIMITERS</keyword>
<keyword>SOFT-DELIMITERS</keyword>
</context>
<context id="other" style-ref="other">
<keyword>SELECT</keyword>
<keyword>REMOVE</keyword>
</context>
<context id="number" style-ref="number">
<prefix>(\-\*|\*\-|\-|\*|\*\*|)</prefix>
<suffix>(\*\-|\-\*|\*|\-|O|)</suffix>
<keyword>1C|2C|3C|4C|5C|6C|7C|8C|9C|0C</keyword>
</context>
<context id="number2" style-ref="number">
<prefix>(C\*|C\*\-|C\-\*|C\-|\*C\-|\-C\*|\-\*C|\-C|\-\*|\*\-C|\-|\*\*\-|\*\-|\*|\*C|C|)</prefix>
<suffix>(C\-|\*C\-|\-C\*|\*\-C|\-\*C|\-\*|\*C|\*\-|\*|pcC\…\*|CO|C|\-C|\-|O|)</suffix>
<keyword>1|2|3|4|5|6|7|8|9|0</keyword>
</context>
<context id="stuff" style-ref="stuff">
<keyword>IF</keyword>
<keyword>NOT</keyword>
<keyword>OR</keyword>
</context>
<context id="hashtag" style-ref="hashtag">
<start>(^#| #)</start>
<end>$</end>
</context>
<context id="chars" style-ref="chars" extend-parent="false">
<match extended="true">
\\\\|\\
(?:[1-9][0-9]*\$)? # argument
[#0\-\ \+\'I]* # flags
(?:[1-9][0-9]*|\*)? # width
(?:\.\-?(?:[0-9]+|\*))? # precision
(?:hh|ll|[hlLqjzt])? # length modifier
[diouxXeEfFgGaAcsCSpnm] # conversion specifier
</match>
</context>
<context id="builtin-object" style-ref="builtin-object" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>L?"</start>
<end>"</end>
<include>
<context ref="chars"/>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
<context ref="def:line-continue"/>
</include>
</context>
</include>
</context>
</definitions>
</language>