-
Notifications
You must be signed in to change notification settings - Fork 0
/
udfs.xshd
70 lines (59 loc) · 2.08 KB
/
udfs.xshd
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
<?xml version="1.0" encoding="utf-8" ?>
<SyntaxDefinition name="Udfs" extensions=".udfs" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<Color name="Comment" foreground="Green" exampleText="// comment" />
<Color name="Operator" foreground="Red" />
<Color name="Punctuation" exampleText="a(b.c);" />
<Color name="MethodCall" foreground="MidnightBlue" fontWeight="bold" exampleText="o.ToString();"/>
<Color name="NumberLiteral" foreground="DarkBlue" exampleText="3.1415f"/>
<Color name="Keywords" fontWeight="bold" foreground="Blue" exampleText="if (a) {} else {}"/>
<Color name="TrueFalse" fontWeight="bold" foreground="DarkCyan" exampleText="b = false; a = true;" />
<Color name="TypeKeywords" fontWeight="bold" foreground="DarkCyan" exampleText=""/>
<Property name="DocCommentMarker" value="!!" />
<!-- This is the main ruleset. -->
<RuleSet>
<Span color="Comment">
<Begin color="XmlDoc/DocComment">!!</Begin>
<RuleSet>
<Import ruleSet="XmlDoc/DocCommentSet"/>
</RuleSet>
</Span>
<Span color="Comment">
<Begin>!!</Begin>
</Span>
<Keywords color="TrueFalse">
<Word>nan</Word>
<Word>posinf</Word>
<Word>neginf</Word>
</Keywords>
<Keywords color="Keywords">
<Word>function</Word>
<Word>const</Word>
<Word>declvar</Word>
<Word>while</Word>
<Word>global</Word>
<Word>if</Word>
<Word>else</Word>
<Word>resultis</Word>
</Keywords>
<!-- Mark previous rule-->
<Rule color="MethodCall">
\b
[\d\w_]+ # an identifier
(?=\s*\() # followed by (
</Rule>
<!-- Digits -->
<Rule color="NumberLiteral">
(\b0[xX][0-9a-fA-F]+ # hex number
|
( \b\d+(\.[0-9]+)? #number with optional floating point
| \.[0-9]+ #or just starting with floating point
)
([eE][+-]?[0-9]+)? # optional exponent
)
</Rule>
<Rule color="Operator">:= | != | = | \+ | \- | \* | \/ | \% | ,</Rule>
<Rule color="Punctuation">
[()\[\]{}]+
</Rule>
</RuleSet>
</SyntaxDefinition>