/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to codeigniter/js/ace/mode-ftl.js

  • Committer: Gustav Hatvigsson
  • Date: 2013-05-30 12:02:31 UTC
  • mfrom: (85.1.28 lenasys)
  • Revision ID: gustav.hartvigsson@gmail.com-20130530120231-ttqgqjqw2w8enn7g
Merged Ohlsons changes:
added function to get ssn and name for the registrationspages in the user model.
added the registrationpage for students.
edited the registration page for instructors
edited the css for both the registrationpages
minor fix to registration css

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ***** BEGIN LICENSE BLOCK *****
 
2
 * Distributed under the BSD license:
 
3
 *
 
4
 * Copyright (c) 2010, Ajax.org B.V.
 
5
 * All rights reserved.
 
6
 * 
 
7
 * Redistribution and use in source and binary forms, with or without
 
8
 * modification, are permitted provided that the following conditions are met:
 
9
 *     * Redistributions of source code must retain the above copyright
 
10
 *       notice, this list of conditions and the following disclaimer.
 
11
 *     * Redistributions in binary form must reproduce the above copyright
 
12
 *       notice, this list of conditions and the following disclaimer in the
 
13
 *       documentation and/or other materials provided with the distribution.
 
14
 *     * Neither the name of Ajax.org B.V. nor the
 
15
 *       names of its contributors may be used to endorse or promote products
 
16
 *       derived from this software without specific prior written permission.
 
17
 * 
 
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 
19
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
20
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
21
 * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
 
22
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 
23
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 
24
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 
25
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
26
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 
27
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
28
 *
 
29
 * ***** END LICENSE BLOCK ***** */
 
30
 
 
31
define('ace/mode/ftl', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ftl_highlight_rules'], function(require, exports, module) {
 
32
 
 
33
 
 
34
var oop = require("../lib/oop");
 
35
var TextMode = require("./text").Mode;
 
36
var Tokenizer = require("../tokenizer").Tokenizer;
 
37
var FtlHighlightRules = require("./ftl_highlight_rules").FtlHighlightRules;
 
38
 
 
39
var Mode = function() {
 
40
    var highlighter = new FtlHighlightRules();
 
41
    this.$tokenizer = new Tokenizer(highlighter.getRules());
 
42
};
 
43
oop.inherits(Mode, TextMode);
 
44
 
 
45
(function() {
 
46
 
 
47
}).call(Mode.prototype);
 
48
 
 
49
exports.Mode = Mode;
 
50
});
 
51
 
 
52
define('ace/mode/ftl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
 
53
 
 
54
 
 
55
var oop = require("../lib/oop");
 
56
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
 
57
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 
58
 
 
59
var FtlLangHighlightRules = function () {
 
60
 
 
61
    var stringBuiltIns = "\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|"
 
62
        + "ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|"
 
63
        + "left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|"
 
64
        + "upper_case|word_list|xhtml|xml";
 
65
    var numberBuiltIns = "c|round|floor|ceiling";
 
66
    var dateBuiltIns = "iso_[a-z_]+";
 
67
    var seqBuiltIns = "first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk";
 
68
    var hashBuiltIns = "keys|values";
 
69
    var xmlBuiltIns = "children|parent|root|ancestors|node_name|node_type|node_namespace";
 
70
    var expertBuiltIns = "byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|"
 
71
        + "eval|has_content|interpret|is_[a-z_]+|namespacenew";
 
72
    var allBuiltIns = stringBuiltIns + numberBuiltIns + dateBuiltIns + seqBuiltIns + hashBuiltIns
 
73
        + xmlBuiltIns + expertBuiltIns;
 
74
 
 
75
    var deprecatedBuiltIns = "default|exists|if_exists|web_safe";
 
76
 
 
77
    var variables = "data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|"
 
78
        + "now|output_encoding|template_name|url_escaping_charset|vars|version";
 
79
 
 
80
    var operators = "gt|gte|lt|lte|as|in|using";
 
81
 
 
82
    var reserved = "true|false";
 
83
 
 
84
    var attributes = "encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|"
 
85
        + "url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|"
 
86
        + "attributes";
 
87
 
 
88
    this.$rules = {
 
89
        "start" : [{
 
90
            token : "constant.character.entity",
 
91
            regex : /&[^;]+;/
 
92
        }, {
 
93
            token : "support.function",
 
94
            regex : "\\?("+allBuiltIns+")"
 
95
        },  {
 
96
            token : "support.function.deprecated",
 
97
            regex : "\\?("+deprecatedBuiltIns+")"
 
98
        }, {
 
99
            token : "language.variable",
 
100
            regex : "\\.(?:"+variables+")"
 
101
        }, {
 
102
            token : "constant.language",
 
103
            regex : "\\b("+reserved+")\\b"
 
104
        }, {
 
105
            token : "keyword.operator",
 
106
            regex : "\\b(?:"+operators+")\\b"
 
107
        }, {
 
108
            token : "entity.other.attribute-name",
 
109
            regex : attributes
 
110
        }, {
 
111
            token : "string", //
 
112
            regex : /['"]/,
 
113
            next : "qstring"
 
114
        }, {
 
115
            token : function(value) {
 
116
                if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) {
 
117
                    return "constant.numeric";
 
118
                } else {
 
119
                    return "variable";
 
120
                }
 
121
            },
 
122
            regex : /[\w.+\-]+/
 
123
        }, {
 
124
            token : "keyword.operator",
 
125
            regex : "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="
 
126
        }, {
 
127
            token : "paren.lparen",
 
128
            regex : "[[({]"
 
129
        }, {
 
130
            token : "paren.rparen",
 
131
            regex : "[\\])}]"
 
132
        }, {
 
133
            token : "text",
 
134
            regex : "\\s+"
 
135
        }],
 
136
 
 
137
        "qstring" : [{
 
138
            token : "constant.character.escape",
 
139
            regex : '\\\\[nrtvef\\\\"$]'
 
140
        }, {
 
141
            token : "string",
 
142
            regex : /['"]/,
 
143
            next : "start"
 
144
        }, {
 
145
            defaultToken : "string"
 
146
        }]
 
147
    };
 
148
};
 
149
 
 
150
oop.inherits(FtlLangHighlightRules, TextHighlightRules);
 
151
 
 
152
var FtlHighlightRules = function() {
 
153
    var directives = "assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|"
 
154
        + "ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|"
 
155
        + "setting|stop|switch|t|visit";
 
156
 
 
157
    HtmlHighlightRules.call(this);
 
158
 
 
159
    for (var i in this.$rules) {
 
160
        this.$rules[i].unshift({
 
161
            token : "string.interpolated",
 
162
            regex : "\\${",
 
163
            push  : "ftl-start"
 
164
        }, {
 
165
            token : "keyword.function",
 
166
            regex :  "</?#("+directives+")",
 
167
            push : "ftl-start"
 
168
        }, {
 
169
            token : "keyword.other",
 
170
            regex : "</?@[a-zA-Z\\.]+",
 
171
            push : "ftl-start"
 
172
        });
 
173
    }
 
174
 
 
175
    this.embedRules(FtlLangHighlightRules, "ftl-");
 
176
 
 
177
    this.$rules["ftl-start"].unshift({
 
178
       token : "keyword",
 
179
        regex : "/?>",
 
180
        next  : "pop"
 
181
    }, {
 
182
        token : "string.interpolated",
 
183
        regex : "}",
 
184
        next  : "pop"
 
185
    });
 
186
 
 
187
    this.$rules.start.unshift({
 
188
        token : "comment",
 
189
        regex : "<#--",
 
190
        next : "comment"
 
191
    });
 
192
 
 
193
    this.$rules.comment.unshift({
 
194
        token : "comment",
 
195
        regex : ".*?-->",
 
196
        next : "start"
 
197
    }, {
 
198
        token : "comment",
 
199
        regex : ".+"
 
200
    });
 
201
 
 
202
    this.normalizeRules();
 
203
};
 
204
 
 
205
oop.inherits(FtlHighlightRules, HtmlHighlightRules);
 
206
 
 
207
exports.FtlHighlightRules = FtlHighlightRules;
 
208
});
 
209
 
 
210
define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
 
211
 
 
212
 
 
213
var oop = require("../lib/oop");
 
214
var lang = require("../lib/lang");
 
215
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
 
216
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
 
217
var xmlUtil = require("./xml_util");
 
218
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 
219
 
 
220
var tagMap = lang.createMap({
 
221
    a           : 'anchor',
 
222
    button          : 'form',
 
223
    form        : 'form',
 
224
    img         : 'image',
 
225
    input       : 'form',
 
226
    label       : 'form',
 
227
    script      : 'script',
 
228
    select      : 'form',
 
229
    textarea    : 'form',
 
230
    style       : 'style',
 
231
    table       : 'table',
 
232
    tbody       : 'table',
 
233
    td          : 'table',
 
234
    tfoot       : 'table',
 
235
    th          : 'table',
 
236
    tr          : 'table'
 
237
});
 
238
 
 
239
var HtmlHighlightRules = function() {
 
240
    this.$rules = {
 
241
        start : [{
 
242
            token : "text",
 
243
            regex : "<\\!\\[CDATA\\[",
 
244
            next : "cdata"
 
245
        }, {
 
246
            token : "xml-pe",
 
247
            regex : "<\\?.*?\\?>"
 
248
        }, {
 
249
            token : "comment",
 
250
            regex : "<\\!--",
 
251
            next : "comment"
 
252
        }, {
 
253
            token : "xml-pe",
 
254
            regex : "<\\!.*?>"
 
255
        }, {
 
256
            token : "meta.tag",
 
257
            regex : "<(?=script\\b)",
 
258
            next : "script"
 
259
        }, {
 
260
            token : "meta.tag",
 
261
            regex : "<(?=style\\b)",
 
262
            next : "style"
 
263
        }, {
 
264
            token : "meta.tag", // opening tag
 
265
            regex : "<\\/?",
 
266
            next : "tag"
 
267
        }, {
 
268
            token : "text",
 
269
            regex : "\\s+"
 
270
        }, {
 
271
            token : "constant.character.entity",
 
272
            regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
 
273
        }],
 
274
    
 
275
        cdata : [ {
 
276
            token : "text",
 
277
            regex : "\\]\\]>",
 
278
            next : "start"
 
279
        } ],
 
280
 
 
281
        comment : [ {
 
282
            token : "comment",
 
283
            regex : ".*?-->",
 
284
            next : "start"
 
285
        }, {
 
286
            defaultToken : "comment"
 
287
        } ]
 
288
    };
 
289
    
 
290
    xmlUtil.tag(this.$rules, "tag", "start", tagMap);
 
291
    xmlUtil.tag(this.$rules, "style", "css-start", tagMap);
 
292
    xmlUtil.tag(this.$rules, "script", "js-start", tagMap);
 
293
    
 
294
    this.embedRules(JavaScriptHighlightRules, "js-", [{
 
295
        token: "comment",
 
296
        regex: "\\/\\/.*(?=<\\/script>)",
 
297
        next: "tag"
 
298
    }, {
 
299
        token: "meta.tag",
 
300
        regex: "<\\/(?=script)",
 
301
        next: "tag"
 
302
    }]);
 
303
    
 
304
    this.embedRules(CssHighlightRules, "css-", [{
 
305
        token: "meta.tag",
 
306
        regex: "<\\/(?=style)",
 
307
        next: "tag"
 
308
    }]);
 
309
};
 
310
 
 
311
oop.inherits(HtmlHighlightRules, TextHighlightRules);
 
312
 
 
313
exports.HtmlHighlightRules = HtmlHighlightRules;
 
314
});
 
315
 
 
316
define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
 
317
 
 
318
 
 
319
var oop = require("../lib/oop");
 
320
var lang = require("../lib/lang");
 
321
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 
322
var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
 
323
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
 
324
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
 
325
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
 
326
var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
 
327
 
 
328
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
 
329
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
 
330
var pseudoClasses  = exports.pseudoClasses =  "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
 
331
 
 
332
var CssHighlightRules = function() {
 
333
 
 
334
    var keywordMapper = this.createKeywordMapper({
 
335
        "support.function": supportFunction,
 
336
        "support.constant": supportConstant,
 
337
        "support.type": supportType,
 
338
        "support.constant.color": supportConstantColor,
 
339
        "support.constant.fonts": supportConstantFonts
 
340
    }, "text", true);
 
341
 
 
342
    var base_ruleset = [
 
343
        {
 
344
            token : "comment", // multi line comment
 
345
            regex : "\\/\\*",
 
346
            next : "ruleset_comment"
 
347
        }, {
 
348
            token : "string", // single line
 
349
            regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
 
350
        }, {
 
351
            token : "string", // single line
 
352
            regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
 
353
        }, {
 
354
            token : ["constant.numeric", "keyword"],
 
355
            regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
 
356
        }, {
 
357
            token : "constant.numeric",
 
358
            regex : numRe
 
359
        }, {
 
360
            token : "constant.numeric",  // hex6 color
 
361
            regex : "#[a-f0-9]{6}"
 
362
        }, {
 
363
            token : "constant.numeric", // hex3 color
 
364
            regex : "#[a-f0-9]{3}"
 
365
        }, {
 
366
            token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
 
367
            regex : pseudoElements
 
368
        }, {
 
369
            token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
 
370
            regex : pseudoClasses
 
371
        }, {
 
372
            token : ["support.function", "string", "support.function"],
 
373
            regex : "(url\\()(.*)(\\))"
 
374
        }, {
 
375
            token : keywordMapper,
 
376
            regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
 
377
        }, {
 
378
            caseInsensitive: true
 
379
        }
 
380
      ];
 
381
 
 
382
    var ruleset = lang.copyArray(base_ruleset);
 
383
    ruleset.unshift({
 
384
        token : "paren.rparen",
 
385
        regex : "\\}",
 
386
        next:   "start"
 
387
    });
 
388
 
 
389
    var media_ruleset = lang.copyArray( base_ruleset );
 
390
    media_ruleset.unshift({
 
391
        token : "paren.rparen",
 
392
        regex : "\\}",
 
393
        next:   "media"
 
394
    });
 
395
 
 
396
    var base_comment = [{
 
397
          token : "comment", // comment spanning whole line
 
398
          regex : ".+"
 
399
    }];
 
400
 
 
401
    var comment = lang.copyArray(base_comment);
 
402
    comment.unshift({
 
403
          token : "comment", // closing comment
 
404
          regex : ".*?\\*\\/",
 
405
          next : "start"
 
406
    });
 
407
 
 
408
    var media_comment = lang.copyArray(base_comment);
 
409
    media_comment.unshift({
 
410
          token : "comment", // closing comment
 
411
          regex : ".*?\\*\\/",
 
412
          next : "media"
 
413
    });
 
414
 
 
415
    var ruleset_comment = lang.copyArray(base_comment);
 
416
    ruleset_comment.unshift({
 
417
          token : "comment", // closing comment
 
418
          regex : ".*?\\*\\/",
 
419
          next : "ruleset"
 
420
    });
 
421
 
 
422
    this.$rules = {
 
423
        "start" : [{
 
424
            token : "comment", // multi line comment
 
425
            regex : "\\/\\*",
 
426
            next : "comment"
 
427
        }, {
 
428
            token: "paren.lparen",
 
429
            regex: "\\{",
 
430
            next:  "ruleset"
 
431
        }, {
 
432
            token: "string",
 
433
            regex: "@.*?{",
 
434
            next:  "media"
 
435
        },{
 
436
            token: "keyword",
 
437
            regex: "#[a-z0-9-_]+"
 
438
        },{
 
439
            token: "variable",
 
440
            regex: "\\.[a-z0-9-_]+"
 
441
        },{
 
442
            token: "string",
 
443
            regex: ":[a-z0-9-_]+"
 
444
        },{
 
445
            token: "constant",
 
446
            regex: "[a-z0-9-_]+"
 
447
        },{
 
448
            caseInsensitive: true
 
449
        }],
 
450
 
 
451
        "media" : [ {
 
452
            token : "comment", // multi line comment
 
453
            regex : "\\/\\*",
 
454
            next : "media_comment"
 
455
        }, {
 
456
            token: "paren.lparen",
 
457
            regex: "\\{",
 
458
            next:  "media_ruleset"
 
459
        },{
 
460
            token: "string",
 
461
            regex: "\\}",
 
462
            next:  "start"
 
463
        },{
 
464
            token: "keyword",
 
465
            regex: "#[a-z0-9-_]+"
 
466
        },{
 
467
            token: "variable",
 
468
            regex: "\\.[a-z0-9-_]+"
 
469
        },{
 
470
            token: "string",
 
471
            regex: ":[a-z0-9-_]+"
 
472
        },{
 
473
            token: "constant",
 
474
            regex: "[a-z0-9-_]+"
 
475
        },{
 
476
            caseInsensitive: true
 
477
        }],
 
478
 
 
479
        "comment" : comment,
 
480
 
 
481
        "ruleset" : ruleset,
 
482
        "ruleset_comment" : ruleset_comment,
 
483
 
 
484
        "media_ruleset" : media_ruleset,
 
485
        "media_comment" : media_comment
 
486
    };
 
487
};
 
488
 
 
489
oop.inherits(CssHighlightRules, TextHighlightRules);
 
490
 
 
491
exports.CssHighlightRules = CssHighlightRules;
 
492
 
 
493
});
 
494
 
 
495
define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
 
496
 
 
497
 
 
498
var oop = require("../lib/oop");
 
499
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
 
500
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 
501
 
 
502
var JavaScriptHighlightRules = function() {
 
503
    var keywordMapper = this.createKeywordMapper({
 
504
        "variable.language":
 
505
            "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|"  + // Constructors
 
506
            "Namespace|QName|XML|XMLList|"                                             + // E4X
 
507
            "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|"   +
 
508
            "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|"                    +
 
509
            "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|"   + // Errors
 
510
            "SyntaxError|TypeError|URIError|"                                          +
 
511
            "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
 
512
            "isNaN|parseFloat|parseInt|"                                               +
 
513
            "JSON|Math|"                                                               + // Other
 
514
            "this|arguments|prototype|window|document"                                 , // Pseudo
 
515
        "keyword":
 
516
            "const|yield|import|get|set|" +
 
517
            "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
 
518
            "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
 
519
            "__parent__|__count__|escape|unescape|with|__proto__|" +
 
520
            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
 
521
        "storage.type":
 
522
            "const|let|var|function",
 
523
        "constant.language":
 
524
            "null|Infinity|NaN|undefined",
 
525
        "support.function":
 
526
            "alert",
 
527
        "constant.language.boolean": "true|false"
 
528
    }, "identifier");
 
529
    var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
 
530
    var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
 
531
 
 
532
    var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
 
533
        "u[0-9a-fA-F]{4}|" + // unicode
 
534
        "[0-2][0-7]{0,2}|" + // oct
 
535
        "3[0-6][0-7]?|" + // oct
 
536
        "37[0-7]?|" + // oct
 
537
        "[4-7][0-7]?|" + //oct
 
538
        ".)";
 
539
 
 
540
    this.$rules = {
 
541
        "no_regex" : [
 
542
            {
 
543
                token : "comment",
 
544
                regex : /\/\/.*$/
 
545
            },
 
546
            DocCommentHighlightRules.getStartRule("doc-start"),
 
547
            {
 
548
                token : "comment", // multi line comment
 
549
                regex : /\/\*/,
 
550
                next : "comment"
 
551
            }, {
 
552
                token : "string",
 
553
                regex : "'(?=.)",
 
554
                next  : "qstring"
 
555
            }, {
 
556
                token : "string",
 
557
                regex : '"(?=.)',
 
558
                next  : "qqstring"
 
559
            }, {
 
560
                token : "constant.numeric", // hex
 
561
                regex : /0[xX][0-9a-fA-F]+\b/
 
562
            }, {
 
563
                token : "constant.numeric", // float
 
564
                regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
 
565
            }, {
 
566
                token : [
 
567
                    "storage.type", "punctuation.operator", "support.function",
 
568
                    "punctuation.operator", "entity.name.function", "text","keyword.operator"
 
569
                ],
 
570
                regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
 
571
                next: "function_arguments"
 
572
            }, {
 
573
                token : [
 
574
                    "storage.type", "punctuation.operator", "entity.name.function", "text",
 
575
                    "keyword.operator", "text", "storage.type", "text", "paren.lparen"
 
576
                ],
 
577
                regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
 
578
                next: "function_arguments"
 
579
            }, {
 
580
                token : [
 
581
                    "entity.name.function", "text", "keyword.operator", "text", "storage.type",
 
582
                    "text", "paren.lparen"
 
583
                ],
 
584
                regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
 
585
                next: "function_arguments"
 
586
            }, {
 
587
                token : [
 
588
                    "storage.type", "punctuation.operator", "entity.name.function", "text",
 
589
                    "keyword.operator", "text",
 
590
                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
 
591
                ],
 
592
                regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
 
593
                next: "function_arguments"
 
594
            }, {
 
595
                token : [
 
596
                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
 
597
                ],
 
598
                regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
 
599
                next: "function_arguments"
 
600
            }, {
 
601
                token : [
 
602
                    "entity.name.function", "text", "punctuation.operator",
 
603
                    "text", "storage.type", "text", "paren.lparen"
 
604
                ],
 
605
                regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
 
606
                next: "function_arguments"
 
607
            }, {
 
608
                token : [
 
609
                    "text", "text", "storage.type", "text", "paren.lparen"
 
610
                ],
 
611
                regex : "(:)(\\s*)(function)(\\s*)(\\()",
 
612
                next: "function_arguments"
 
613
            }, {
 
614
                token : "keyword",
 
615
                regex : "(?:" + kwBeforeRe + ")\\b",
 
616
                next : "start"
 
617
            }, {
 
618
                token : ["punctuation.operator", "support.function"],
 
619
                regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
 
620
            }, {
 
621
                token : ["punctuation.operator", "support.function.dom"],
 
622
                regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
 
623
            }, {
 
624
                token : ["punctuation.operator", "support.constant"],
 
625
                regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
 
626
            }, {
 
627
                token : ["storage.type", "punctuation.operator", "support.function.firebug"],
 
628
                regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
 
629
            }, {
 
630
                token : keywordMapper,
 
631
                regex : identifierRe
 
632
            }, {
 
633
                token : "keyword.operator",
 
634
                regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
 
635
                next  : "start"
 
636
            }, {
 
637
                token : "punctuation.operator",
 
638
                regex : /\?|\:|\,|\;|\./,
 
639
                next  : "start"
 
640
            }, {
 
641
                token : "paren.lparen",
 
642
                regex : /[\[({]/,
 
643
                next  : "start"
 
644
            }, {
 
645
                token : "paren.rparen",
 
646
                regex : /[\])}]/
 
647
            }, {
 
648
                token : "keyword.operator",
 
649
                regex : /\/=?/,
 
650
                next  : "start"
 
651
            }, {
 
652
                token: "comment",
 
653
                regex: /^#!.*$/
 
654
            }
 
655
        ],
 
656
        "start": [
 
657
            DocCommentHighlightRules.getStartRule("doc-start"),
 
658
            {
 
659
                token : "comment", // multi line comment
 
660
                regex : "\\/\\*",
 
661
                next : "comment_regex_allowed"
 
662
            }, {
 
663
                token : "comment",
 
664
                regex : "\\/\\/.*$",
 
665
                next : "start"
 
666
            }, {
 
667
                token: "string.regexp",
 
668
                regex: "\\/",
 
669
                next: "regex",
 
670
            }, {
 
671
                token : "text",
 
672
                regex : "\\s+|^$",
 
673
                next : "start"
 
674
            }, {
 
675
                token: "empty",
 
676
                regex: "",
 
677
                next: "no_regex"
 
678
            }
 
679
        ],
 
680
        "regex": [
 
681
            {
 
682
                token: "regexp.keyword.operator",
 
683
                regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
 
684
            }, {
 
685
                token: "string.regexp",
 
686
                regex: "/\\w*",
 
687
                next: "no_regex",
 
688
            }, {
 
689
                token : "invalid",
 
690
                regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
 
691
            }, {
 
692
                token : "constant.language.escape",
 
693
                regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
 
694
            }, {
 
695
                token : "constant.language.delimiter",
 
696
                regex: /\|/
 
697
            }, {
 
698
                token: "constant.language.escape",
 
699
                regex: /\[\^?/,
 
700
                next: "regex_character_class",
 
701
            }, {
 
702
                token: "empty",
 
703
                regex: "$",
 
704
                next: "no_regex"
 
705
            }, {
 
706
                defaultToken: "string.regexp"
 
707
            }
 
708
        ],
 
709
        "regex_character_class": [
 
710
            {
 
711
                token: "regexp.keyword.operator",
 
712
                regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
 
713
            }, {
 
714
                token: "constant.language.escape",
 
715
                regex: "]",
 
716
                next: "regex",
 
717
            }, {
 
718
                token: "constant.language.escape",
 
719
                regex: "-"
 
720
            }, {
 
721
                token: "empty",
 
722
                regex: "$",
 
723
                next: "no_regex"
 
724
            }, {
 
725
                defaultToken: "string.regexp.charachterclass"
 
726
            }
 
727
        ],
 
728
        "function_arguments": [
 
729
            {
 
730
                token: "variable.parameter",
 
731
                regex: identifierRe
 
732
            }, {
 
733
                token: "punctuation.operator",
 
734
                regex: "[, ]+",
 
735
            }, {
 
736
                token: "punctuation.operator",
 
737
                regex: "$",
 
738
            }, {
 
739
                token: "empty",
 
740
                regex: "",
 
741
                next: "no_regex"
 
742
            }
 
743
        ],
 
744
        "comment_regex_allowed" : [
 
745
            {token : "comment", regex : "\\*\\/", next : "start"},
 
746
            {defaultToken : "comment"}
 
747
        ],
 
748
        "comment" : [
 
749
            {token : "comment", regex : "\\*\\/", next : "no_regex"},
 
750
            {defaultToken : "comment"}
 
751
        ],
 
752
        "qqstring" : [
 
753
            {
 
754
                token : "constant.language.escape",
 
755
                regex : escapedRe
 
756
            }, {
 
757
                token : "string",
 
758
                regex : "\\\\$",
 
759
                next  : "qqstring",
 
760
            }, {
 
761
                token : "string",
 
762
                regex : '"|$',
 
763
                next  : "no_regex",
 
764
            }, {
 
765
                defaultToken: "string"
 
766
            }
 
767
        ],
 
768
        "qstring" : [
 
769
            {
 
770
                token : "constant.language.escape",
 
771
                regex : escapedRe
 
772
            }, {
 
773
                token : "string",
 
774
                regex : "\\\\$",
 
775
                next  : "qstring",
 
776
            }, {
 
777
                token : "string",
 
778
                regex : "'|$",
 
779
                next  : "no_regex",
 
780
            }, {
 
781
                defaultToken: "string"
 
782
            }
 
783
        ]
 
784
    };
 
785
 
 
786
    this.embedRules(DocCommentHighlightRules, "doc-",
 
787
        [ DocCommentHighlightRules.getEndRule("no_regex") ]);
 
788
};
 
789
 
 
790
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
 
791
 
 
792
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
 
793
});
 
794
 
 
795
define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
 
796
 
 
797
 
 
798
var oop = require("../lib/oop");
 
799
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 
800
 
 
801
var DocCommentHighlightRules = function() {
 
802
 
 
803
    this.$rules = {
 
804
        "start" : [ {
 
805
            token : "comment.doc.tag",
 
806
            regex : "@[\\w\\d_]+" // TODO: fix email addresses
 
807
        }, {
 
808
            token : "comment.doc.tag",
 
809
            regex : "\\bTODO\\b"
 
810
        }, {
 
811
            defaultToken : "comment.doc"
 
812
        }]
 
813
    };
 
814
};
 
815
 
 
816
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
 
817
 
 
818
DocCommentHighlightRules.getStartRule = function(start) {
 
819
    return {
 
820
        token : "comment.doc", // doc comment
 
821
        regex : "\\/\\*(?=\\*)",
 
822
        next  : start
 
823
    };
 
824
};
 
825
 
 
826
DocCommentHighlightRules.getEndRule = function (start) {
 
827
    return {
 
828
        token : "comment.doc", // closing comment
 
829
        regex : "\\*\\/",
 
830
        next  : start
 
831
    };
 
832
};
 
833
 
 
834
 
 
835
exports.DocCommentHighlightRules = DocCommentHighlightRules;
 
836
 
 
837
});
 
838
 
 
839
define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
 
840
 
 
841
 
 
842
function string(state) {
 
843
    return [{
 
844
        token : "string",
 
845
        regex : '"',
 
846
        next : state + "_qqstring"
 
847
    }, {
 
848
        token : "string",
 
849
        regex : "'",
 
850
        next : state + "_qstring"
 
851
    }];
 
852
}
 
853
 
 
854
function multiLineString(quote, state) {
 
855
    return [
 
856
        {token : "string", regex : quote, next : state},
 
857
        {
 
858
            token : "constant.language.escape",
 
859
            regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" 
 
860
        },
 
861
        {defaultToken : "string"}
 
862
    ];
 
863
}
 
864
 
 
865
exports.tag = function(states, name, nextState, tagMap) {
 
866
    states[name] = [{
 
867
        token : "text",
 
868
        regex : "\\s+"
 
869
    }, {
 
870
        
 
871
    token : !tagMap ? "meta.tag.tag-name" : function(value) {
 
872
            if (tagMap[value])
 
873
                return "meta.tag.tag-name." + tagMap[value];
 
874
            else
 
875
                return "meta.tag.tag-name";
 
876
        },
 
877
        regex : "[-_a-zA-Z0-9:]+",
 
878
        next : name + "_embed_attribute_list" 
 
879
    }, {
 
880
        token: "empty",
 
881
        regex: "",
 
882
        next : name + "_embed_attribute_list"
 
883
    }];
 
884
 
 
885
    states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
 
886
    states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
 
887
    
 
888
    states[name + "_embed_attribute_list"] = [{
 
889
        token : "meta.tag.r",
 
890
        regex : "/?>",
 
891
        next : nextState
 
892
    }, {
 
893
        token : "keyword.operator",
 
894
        regex : "="
 
895
    }, {
 
896
        token : "entity.other.attribute-name",
 
897
        regex : "[-_a-zA-Z0-9:]+"
 
898
    }, {
 
899
        token : "constant.numeric", // float
 
900
        regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
 
901
    }, {
 
902
        token : "text",
 
903
        regex : "\\s+"
 
904
    }].concat(string(name));
 
905
};
 
906
 
 
907
});