2 <!-- $Id: javascript.xml,v 1.3 2008-01-01 23:43:36 ssttoo Exp $ -->
4 <highlight lang="javascript" case = "no">
7 <author name="Andrey Demenev" email ="demenev@gmail.com"/>
10 <default innerClass="code" />
12 <region name="block" delimClass="brackets" innerClass="code" start="\{" end="\}">
16 <region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)">
20 <region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]">
25 <region name="mlcomment" innerClass="comment" start="\/\*" end="\*\/" >
26 <contains block="cvstag"/>
29 <region name="strdouble" delimClass="quotes" innerClass="string" start=""" end="""/>
31 <region name="strsingle" delimClass="quotes" innerClass="string" start="'" end="'" />
33 <block name="escaped" match="\\\\|\\"|\\'|\\`" innerClass="special" contained="yes">
34 <onlyin region="strsingle"/>
37 <block name="descaped" match="\\\\|\\"|\\'|\\`|\\t|\\n|\\r" innerClass="special" contained="yes">
38 <onlyin region="strdouble"/>
41 <region name="comment" start="\/\/" end="/$/m" innerClass="comment">
42 <contains block="cvstag"/>
45 <block name="identifier" match="[a-z_]\w*" innerClass="identifier" case="no"/>
47 <block name="number" match="0x\d*|\d*\.?\d+" innerClass="number"/>
50 <block name="url" match="((https?|ftp):\/\/[\w\?\.\-\&=\/%+]+)|(^|[\s,!?])www\.\w+\.\w+[\w\?\.\&=\/%+]*" innerClass="url" contained="yes">
51 <onlyin region="mlcomment"/>
52 <onlyin region="comment"/>
55 <block name="email" match="\w+[\.\w\-]+@(\w+[\.\w\-])+" innerClass="url" contained="yes">
56 <onlyin region="mlcomment"/>
57 <onlyin region="comment"/>
60 <block name="note" match="\b(note|fixme):" innerClass="inlinedoc" contained="yes" case="no">
61 <onlyin region="mlcomment"/>
62 <onlyin region="comment"/>
66 <block name="cvstag" match="\$\w+:.+\$" innerClass="inlinedoc" contained="yes">
67 <onlyin region="mlcomment"/>
68 <onlyin region="comment"/>
71 <keywords name="builtin" inherits="identifier" innerClass="builtin" case = "yes">
72 <keyword match="String"/>
73 <keyword match="Array"/>
74 <keyword match="RegExp"/>
75 <keyword match="Function"/>
76 <keyword match="Math"/>
77 <keyword match="Number"/>
78 <keyword match="Date"/>
79 <keyword match="Image"/>
80 <keyword match="window"/>
81 <keyword match="document"/>
82 <keyword match="navigator"/>
83 <keyword match="onAbort"/>
84 <keyword match="onBlur"/>
85 <keyword match="onChange"/>
86 <keyword match="onClick"/>
87 <keyword match="onDblClick"/>
88 <keyword match="onDragDrop"/>
89 <keyword match="onError"/>
90 <keyword match="onFocus"/>
91 <keyword match="onKeyDown"/>
92 <keyword match="onKeyPress"/>
93 <keyword match="onKeyUp"/>
94 <keyword match="onLoad"/>
95 <keyword match="onMouseDown"/>
96 <keyword match="onMouseOver"/>
97 <keyword match="onMouseOut"/>
98 <keyword match="onMouseMove"/>
99 <keyword match="onMouseUp"/>
100 <keyword match="onMove"/>
101 <keyword match="onReset"/>
102 <keyword match="onResize"/>
103 <keyword match="onSelect"/>
104 <keyword match="onSubmit"/>
105 <keyword match="onUnload"/>
108 <keywords name="reserved" inherits="identifier" innerClass="reserved" case = "yes">
109 <keyword match="break"/>
110 <keyword match="continue"/>
111 <keyword match="do"/>
112 <keyword match="while"/>
113 <keyword match="do"/>
114 <keyword match="export"/>
115 <keyword match="for"/>
116 <keyword match="in"/>
117 <keyword match="if"/>
118 <keyword match="else"/>
119 <keyword match="import"/>
120 <keyword match="return"/>
121 <keyword match="label"/>
122 <keyword match="switch"/>
123 <keyword match="case"/>
124 <keyword match="var"/>
125 <keyword match="with"/>
126 <keyword match="delete"/>
127 <keyword match="new"/>
128 <keyword match="this"/>
129 <keyword match="typeof"/>
130 <keyword match="void"/>
131 <keyword match="abstract"/>
132 <keyword match="boolean"/>
133 <keyword match="byte"/>
134 <keyword match="catch"/>
135 <keyword match="char"/>
136 <keyword match="class"/>
137 <keyword match="const"/>
138 <keyword match="continue"/>
139 <keyword match="debugger"/>
140 <keyword match="default"/>
141 <keyword match="double"/>
142 <keyword match="enum"/>
143 <keyword match="extends"/>
144 <keyword match="false"/>
145 <keyword match="final"/>
146 <keyword match="finally"/>
147 <keyword match="float"/>
148 <keyword match="function"/>
149 <keyword match="implements"/>
150 <keyword match="goto"/>
151 <keyword match="in"/>
152 <keyword match="instanceof"/>
153 <keyword match="int"/>
154 <keyword match="interface"/>
155 <keyword match="long"/>
156 <keyword match="native"/>
157 <keyword match="null"/>
158 <keyword match="package"/>
159 <keyword match="private"/>
160 <keyword match="protected"/>
161 <keyword match="public"/>
162 <keyword match="short"/>
163 <keyword match="static"/>
164 <keyword match="super"/>
165 <keyword match="synchronized"/>
166 <keyword match="throw"/>
167 <keyword match="throws"/>
168 <keyword match="transient"/>
169 <keyword match="true"/>
170 <keyword match="try"/>
171 <keyword match="volatile"/>