1
/* ***** BEGIN LICENSE BLOCK *****
2
* Distributed under the BSD license:
4
* Copyright (c) 2010, Ajax.org B.V.
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.
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.
29
* ***** END LICENSE BLOCK ***** */
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) {
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;
39
var Mode = function() {
40
var highlighter = new FtlHighlightRules();
41
this.$tokenizer = new Tokenizer(highlighter.getRules());
43
oop.inherits(Mode, TextMode);
47
}).call(Mode.prototype);
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) {
55
var oop = require("../lib/oop");
56
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
57
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
59
var FtlLangHighlightRules = function () {
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;
75
var deprecatedBuiltIns = "default|exists|if_exists|web_safe";
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";
80
var operators = "gt|gte|lt|lte|as|in|using";
82
var reserved = "true|false";
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|"
90
token : "constant.character.entity",
93
token : "support.function",
94
regex : "\\?("+allBuiltIns+")"
96
token : "support.function.deprecated",
97
regex : "\\?("+deprecatedBuiltIns+")"
99
token : "language.variable",
100
regex : "\\.(?:"+variables+")"
102
token : "constant.language",
103
regex : "\\b("+reserved+")\\b"
105
token : "keyword.operator",
106
regex : "\\b(?:"+operators+")\\b"
108
token : "entity.other.attribute-name",
115
token : function(value) {
116
if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) {
117
return "constant.numeric";
124
token : "keyword.operator",
125
regex : "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="
127
token : "paren.lparen",
130
token : "paren.rparen",
138
token : "constant.character.escape",
139
regex : '\\\\[nrtvef\\\\"$]'
145
defaultToken : "string"
150
oop.inherits(FtlLangHighlightRules, TextHighlightRules);
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";
157
HtmlHighlightRules.call(this);
159
for (var i in this.$rules) {
160
this.$rules[i].unshift({
161
token : "string.interpolated",
165
token : "keyword.function",
166
regex : "</?#("+directives+")",
169
token : "keyword.other",
170
regex : "</?@[a-zA-Z\\.]+",
175
this.embedRules(FtlLangHighlightRules, "ftl-");
177
this.$rules["ftl-start"].unshift({
182
token : "string.interpolated",
187
this.$rules.start.unshift({
193
this.$rules.comment.unshift({
202
this.normalizeRules();
205
oop.inherits(FtlHighlightRules, HtmlHighlightRules);
207
exports.FtlHighlightRules = FtlHighlightRules;
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) {
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;
220
var tagMap = lang.createMap({
239
var HtmlHighlightRules = function() {
243
regex : "<\\!\\[CDATA\\[",
247
regex : "<\\?.*?\\?>"
257
regex : "<(?=script\\b)",
261
regex : "<(?=style\\b)",
264
token : "meta.tag", // opening tag
271
token : "constant.character.entity",
272
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
286
defaultToken : "comment"
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);
294
this.embedRules(JavaScriptHighlightRules, "js-", [{
296
regex: "\\/\\/.*(?=<\\/script>)",
300
regex: "<\\/(?=script)",
304
this.embedRules(CssHighlightRules, "css-", [{
306
regex: "<\\/(?=style)",
311
oop.inherits(HtmlHighlightRules, TextHighlightRules);
313
exports.HtmlHighlightRules = HtmlHighlightRules;
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) {
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";
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";
332
var CssHighlightRules = function() {
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
344
token : "comment", // multi line comment
346
next : "ruleset_comment"
348
token : "string", // single line
349
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
351
token : "string", // single line
352
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
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|%)"
357
token : "constant.numeric",
360
token : "constant.numeric", // hex6 color
361
regex : "#[a-f0-9]{6}"
363
token : "constant.numeric", // hex3 color
364
regex : "#[a-f0-9]{3}"
366
token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
367
regex : pseudoElements
369
token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
370
regex : pseudoClasses
372
token : ["support.function", "string", "support.function"],
373
regex : "(url\\()(.*)(\\))"
375
token : keywordMapper,
376
regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
378
caseInsensitive: true
382
var ruleset = lang.copyArray(base_ruleset);
384
token : "paren.rparen",
389
var media_ruleset = lang.copyArray( base_ruleset );
390
media_ruleset.unshift({
391
token : "paren.rparen",
396
var base_comment = [{
397
token : "comment", // comment spanning whole line
401
var comment = lang.copyArray(base_comment);
403
token : "comment", // closing comment
408
var media_comment = lang.copyArray(base_comment);
409
media_comment.unshift({
410
token : "comment", // closing comment
415
var ruleset_comment = lang.copyArray(base_comment);
416
ruleset_comment.unshift({
417
token : "comment", // closing comment
424
token : "comment", // multi line comment
428
token: "paren.lparen",
437
regex: "#[a-z0-9-_]+"
440
regex: "\\.[a-z0-9-_]+"
443
regex: ":[a-z0-9-_]+"
448
caseInsensitive: true
452
token : "comment", // multi line comment
454
next : "media_comment"
456
token: "paren.lparen",
458
next: "media_ruleset"
465
regex: "#[a-z0-9-_]+"
468
regex: "\\.[a-z0-9-_]+"
471
regex: ":[a-z0-9-_]+"
476
caseInsensitive: true
482
"ruleset_comment" : ruleset_comment,
484
"media_ruleset" : media_ruleset,
485
"media_comment" : media_comment
489
oop.inherits(CssHighlightRules, TextHighlightRules);
491
exports.CssHighlightRules = CssHighlightRules;
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) {
498
var oop = require("../lib/oop");
499
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
500
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
502
var JavaScriptHighlightRules = function() {
503
var keywordMapper = this.createKeywordMapper({
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
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",
522
"const|let|var|function",
524
"null|Infinity|NaN|undefined",
527
"constant.language.boolean": "true|false"
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";
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
537
"[4-7][0-7]?|" + //oct
546
DocCommentHighlightRules.getStartRule("doc-start"),
548
token : "comment", // multi line comment
560
token : "constant.numeric", // hex
561
regex : /0[xX][0-9a-fA-F]+\b/
563
token : "constant.numeric", // float
564
regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
567
"storage.type", "punctuation.operator", "support.function",
568
"punctuation.operator", "entity.name.function", "text","keyword.operator"
570
regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
571
next: "function_arguments"
574
"storage.type", "punctuation.operator", "entity.name.function", "text",
575
"keyword.operator", "text", "storage.type", "text", "paren.lparen"
577
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
578
next: "function_arguments"
581
"entity.name.function", "text", "keyword.operator", "text", "storage.type",
582
"text", "paren.lparen"
584
regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
585
next: "function_arguments"
588
"storage.type", "punctuation.operator", "entity.name.function", "text",
589
"keyword.operator", "text",
590
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
592
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
593
next: "function_arguments"
596
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
598
regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
599
next: "function_arguments"
602
"entity.name.function", "text", "punctuation.operator",
603
"text", "storage.type", "text", "paren.lparen"
605
regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
606
next: "function_arguments"
609
"text", "text", "storage.type", "text", "paren.lparen"
611
regex : "(:)(\\s*)(function)(\\s*)(\\()",
612
next: "function_arguments"
615
regex : "(?:" + kwBeforeRe + ")\\b",
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(?=\()/
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(?=\()/
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/
627
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
628
regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
630
token : keywordMapper,
633
token : "keyword.operator",
634
regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
637
token : "punctuation.operator",
638
regex : /\?|\:|\,|\;|\./,
641
token : "paren.lparen",
645
token : "paren.rparen",
648
token : "keyword.operator",
657
DocCommentHighlightRules.getStartRule("doc-start"),
659
token : "comment", // multi line comment
661
next : "comment_regex_allowed"
667
token: "string.regexp",
682
token: "regexp.keyword.operator",
683
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
685
token: "string.regexp",
690
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
692
token : "constant.language.escape",
693
regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
695
token : "constant.language.delimiter",
698
token: "constant.language.escape",
700
next: "regex_character_class",
706
defaultToken: "string.regexp"
709
"regex_character_class": [
711
token: "regexp.keyword.operator",
712
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
714
token: "constant.language.escape",
718
token: "constant.language.escape",
725
defaultToken: "string.regexp.charachterclass"
728
"function_arguments": [
730
token: "variable.parameter",
733
token: "punctuation.operator",
736
token: "punctuation.operator",
744
"comment_regex_allowed" : [
745
{token : "comment", regex : "\\*\\/", next : "start"},
746
{defaultToken : "comment"}
749
{token : "comment", regex : "\\*\\/", next : "no_regex"},
750
{defaultToken : "comment"}
754
token : "constant.language.escape",
765
defaultToken: "string"
770
token : "constant.language.escape",
781
defaultToken: "string"
786
this.embedRules(DocCommentHighlightRules, "doc-",
787
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
790
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
792
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
795
define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
798
var oop = require("../lib/oop");
799
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
801
var DocCommentHighlightRules = function() {
805
token : "comment.doc.tag",
806
regex : "@[\\w\\d_]+" // TODO: fix email addresses
808
token : "comment.doc.tag",
811
defaultToken : "comment.doc"
816
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
818
DocCommentHighlightRules.getStartRule = function(start) {
820
token : "comment.doc", // doc comment
821
regex : "\\/\\*(?=\\*)",
826
DocCommentHighlightRules.getEndRule = function (start) {
828
token : "comment.doc", // closing comment
835
exports.DocCommentHighlightRules = DocCommentHighlightRules;
839
define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
842
function string(state) {
846
next : state + "_qqstring"
850
next : state + "_qstring"
854
function multiLineString(quote, state) {
856
{token : "string", regex : quote, next : state},
858
token : "constant.language.escape",
859
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
861
{defaultToken : "string"}
865
exports.tag = function(states, name, nextState, tagMap) {
871
token : !tagMap ? "meta.tag.tag-name" : function(value) {
873
return "meta.tag.tag-name." + tagMap[value];
875
return "meta.tag.tag-name";
877
regex : "[-_a-zA-Z0-9:]+",
878
next : name + "_embed_attribute_list"
882
next : name + "_embed_attribute_list"
885
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
886
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
888
states[name + "_embed_attribute_list"] = [{
889
token : "meta.tag.r",
893
token : "keyword.operator",
896
token : "entity.other.attribute-name",
897
regex : "[-_a-zA-Z0-9:]+"
899
token : "constant.numeric", // float
900
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
904
}].concat(string(name));