Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveProjectManagement/HeuristicLab.ExtLibs/HeuristicLab.AvalonEdit/5.0.1/AvalonEdit-5.0.1/Highlighting/Resources/JavaScript-Mode.xshd @ 15377

Last change on this file since 15377 was 11700, checked in by jkarder, 10 years ago

#2077: created branch and added first version

File size: 3.7 KB
Line 
1<?xml version="1.0"?>
2<!-- syntaxdefinition for JavaScript 2.0 by Svante Lidman -->
3<!-- converted to AvalonEdit format by Siegfried Pammer in 2010 -->
4<SyntaxDefinition name="JavaScript" extensions=".js" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
5  <Color name="Digits" foreground="DarkBlue" exampleText="3.14" />
6  <Color name="Comment" foreground="Green" exampleText="// comment" />
7  <Color name="String" foreground="Sienna" exampleText="var text = &quot;Hello, World!&quot;;" />
8  <Color name="Character" foreground="Sienna" exampleText="var char = 'a';" />
9  <Color name="Regex" foreground="Sienna" exampleText="/abc/m" />
10  <Color name="JavaScriptKeyWords" foreground="Blue" exampleText="return myVariable;" />
11  <Color name="JavaScriptIntrinsics" foreground="Blue" exampleText="Math.random()" />
12  <Color name="JavaScriptLiterals" foreground="Blue" exampleText="return false;" />
13  <Color name="JavaScriptGlobalFunctions" foreground="Blue" exampleText="escape(myString);" />
14  <RuleSet ignoreCase="false">
15    <Keywords color="JavaScriptKeyWords">
16      <Word>break</Word>
17      <Word>continue</Word>
18      <Word>delete</Word>
19      <Word>else</Word>
20      <Word>for</Word>
21      <Word>function</Word>
22      <Word>if</Word>
23      <Word>in</Word>
24      <Word>new</Word>
25      <Word>return</Word>
26      <Word>this</Word>
27      <Word>typeof</Word>
28      <Word>var</Word>
29      <Word>void</Word>
30      <Word>while</Word>
31      <Word>with</Word>
32      <Word>abstract</Word>
33      <Word>boolean</Word>
34      <Word>byte</Word>
35      <Word>case</Word>
36      <Word>catch</Word>
37      <Word>char</Word>
38      <Word>class</Word>
39      <Word>const</Word>
40      <Word>debugger</Word>
41      <Word>default</Word>
42      <Word>do</Word>
43      <Word>double</Word>
44      <Word>enum</Word>
45      <Word>export</Word>
46      <Word>extends</Word>
47      <Word>final</Word>
48      <Word>finally</Word>
49      <Word>float</Word>
50      <Word>goto</Word>
51      <Word>implements</Word>
52      <Word>import</Word>
53      <Word>instanceof</Word>
54      <Word>int</Word>
55      <Word>interface</Word>
56      <Word>long</Word>
57      <Word>native</Word>
58      <Word>package</Word>
59      <Word>private</Word>
60      <Word>protected</Word>
61      <Word>public</Word>
62      <Word>short</Word>
63      <Word>static</Word>
64      <Word>super</Word>
65      <Word>switch</Word>
66      <Word>synchronized</Word>
67      <Word>throw</Word>
68      <Word>throws</Word>
69      <Word>transient</Word>
70      <Word>try</Word>
71      <Word>volatile</Word>
72    </Keywords>
73    <Keywords color="JavaScriptIntrinsics">
74      <Word>Array</Word>
75      <Word>Boolean</Word>
76      <Word>Date</Word>
77      <Word>Function</Word>
78      <Word>Global</Word>
79      <Word>Math</Word>
80      <Word>Number</Word>
81      <Word>Object</Word>
82      <Word>RegExp</Word>
83      <Word>String</Word>
84    </Keywords>
85    <Keywords color="JavaScriptLiterals">
86      <Word>false</Word>
87      <Word>null</Word>
88      <Word>true</Word>
89      <Word>NaN</Word>
90      <Word>Infinity</Word>
91    </Keywords>
92    <Keywords color="JavaScriptGlobalFunctions">
93      <Word>eval</Word>
94      <Word>parseInt</Word>
95      <Word>parseFloat</Word>
96      <Word>escape</Word>
97      <Word>unescape</Word>
98      <Word>isNaN</Word>
99      <Word>isFinite</Word>
100    </Keywords>
101    <Span color="Comment">
102      <Begin>//</Begin>
103    </Span>
104    <Span color="Comment" multiline="true">
105      <Begin>/\*</Begin>
106      <End>\*/</End>
107    </Span>
108    <!--<Rule color="Regex">/.*/</Rule>-->
109    <Span color="Regex">
110      <Begin>/</Begin>
111      <End>/</End>
112      <RuleSet>
113        <Span begin="\\/" end="." />
114      </RuleSet>
115    </Span>
116    <Span color="String" multiline="true">
117      <Begin>"</Begin>
118      <End>"</End>
119      <RuleSet>
120        <Span begin="\\" end="." />
121      </RuleSet>
122    </Span>
123    <Span color="Character">
124      <Begin>'</Begin>
125      <End>'</End>
126      <RuleSet>
127        <Span begin="\\" end="." />
128      </RuleSet>
129    </Span>
130    <Rule color="Digits">\b0[xX][0-9a-fA-F]+|(\b\d+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?</Rule>
131  </RuleSet>
132</SyntaxDefinition>
Note: See TracBrowser for help on using the repository browser.