ace-rails-ap 4.0.1 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ace/rails/version.rb +1 -1
- data/vendor/assets/javascripts/ace/ace.js +187 -175
- data/vendor/assets/javascripts/ace/ext-chromevox.js +5 -5
- data/vendor/assets/javascripts/ace/ext-emmet.js +4 -5
- data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +1 -1
- data/vendor/assets/javascripts/ace/ext-language_tools.js +23 -22
- data/vendor/assets/javascripts/ace/ext-modelist.js +11 -5
- data/vendor/assets/javascripts/ace/ext-settings_menu.js +13 -7
- data/vendor/assets/javascripts/ace/ext-textarea.js +0 -72
- data/vendor/assets/javascripts/ace/keybinding-emacs.js +3 -2
- data/vendor/assets/javascripts/ace/keybinding-vim.js +23 -18
- data/vendor/assets/javascripts/ace/mode-abap.js +3 -19
- data/vendor/assets/javascripts/ace/mode-c_cpp.js +21 -29
- data/vendor/assets/javascripts/ace/mode-cirru.js +15 -15
- data/vendor/assets/javascripts/ace/mode-coffee.js +3 -22
- data/vendor/assets/javascripts/ace/mode-coldfusion.js +40 -54
- data/vendor/assets/javascripts/ace/mode-csharp.js +6 -0
- data/vendor/assets/javascripts/ace/mode-css.js +3 -3
- data/vendor/assets/javascripts/ace/mode-curly.js +40 -54
- data/vendor/assets/javascripts/ace/mode-dart.js +21 -29
- data/vendor/assets/javascripts/ace/mode-django.js +40 -54
- data/vendor/assets/javascripts/ace/mode-eiffel.js +2 -2
- data/vendor/assets/javascripts/ace/mode-ejs.js +41 -55
- data/vendor/assets/javascripts/ace/mode-elm.js +3 -3
- data/vendor/assets/javascripts/ace/mode-ftl.js +36 -50
- data/vendor/assets/javascripts/ace/mode-gherkin.js +6 -6
- data/vendor/assets/javascripts/ace/mode-glsl.js +21 -29
- data/vendor/assets/javascripts/ace/mode-gobstones.js +1273 -0
- data/vendor/assets/javascripts/ace/mode-golang.js +2 -2
- data/vendor/assets/javascripts/ace/mode-groovy.js +33 -47
- data/vendor/assets/javascripts/ace/mode-haml.js +981 -27
- data/vendor/assets/javascripts/ace/mode-handlebars.js +40 -54
- data/vendor/assets/javascripts/ace/mode-html.js +40 -54
- data/vendor/assets/javascripts/ace/mode-html_elixir.js +40 -54
- data/vendor/assets/javascripts/ace/mode-html_ruby.js +41 -55
- data/vendor/assets/javascripts/ace/mode-jade.js +83 -189
- data/vendor/assets/javascripts/ace/mode-java.js +35 -49
- data/vendor/assets/javascripts/ace/mode-javascript.js +33 -47
- data/vendor/assets/javascripts/ace/mode-jsp.js +38 -52
- data/vendor/assets/javascripts/ace/mode-lean.js +1 -1
- data/vendor/assets/javascripts/ace/mode-less.js +368 -136
- data/vendor/assets/javascripts/ace/mode-liquid.js +36 -50
- data/vendor/assets/javascripts/ace/mode-livescript.js +3 -18
- data/vendor/assets/javascripts/ace/mode-logiql.js +11 -11
- data/vendor/assets/javascripts/ace/mode-lua.js +1 -4
- data/vendor/assets/javascripts/ace/mode-luapage.js +41 -58
- data/vendor/assets/javascripts/ace/mode-markdown.js +40 -54
- data/vendor/assets/javascripts/ace/mode-mask.js +36 -50
- data/vendor/assets/javascripts/ace/mode-matlab.js +1 -1
- data/vendor/assets/javascripts/ace/mode-mel.js +1 -1
- data/vendor/assets/javascripts/ace/mode-nix.js +21 -29
- data/vendor/assets/javascripts/ace/mode-nsis.js +304 -0
- data/vendor/assets/javascripts/ace/mode-objectivec.js +21 -29
- data/vendor/assets/javascripts/ace/mode-pascal.js +1 -1
- data/vendor/assets/javascripts/ace/mode-pgsql.js +33 -47
- data/vendor/assets/javascripts/ace/mode-php.js +42 -57
- data/vendor/assets/javascripts/ace/mode-powershell.js +86 -57
- data/vendor/assets/javascripts/ace/mode-praat.js +1 -1
- data/vendor/assets/javascripts/ace/mode-protobuf.js +21 -29
- data/vendor/assets/javascripts/ace/mode-r.js +20 -20
- data/vendor/assets/javascripts/ace/mode-razor.js +3136 -0
- data/vendor/assets/javascripts/ace/mode-rdoc.js +20 -20
- data/vendor/assets/javascripts/ace/mode-rhtml.js +60 -74
- data/vendor/assets/javascripts/ace/mode-rst.js +249 -0
- data/vendor/assets/javascripts/ace/mode-ruby.js +1 -1
- data/vendor/assets/javascripts/ace/mode-rust.js +4 -8
- data/vendor/assets/javascripts/ace/mode-scala.js +33 -47
- data/vendor/assets/javascripts/ace/mode-sjs.js +42 -56
- data/vendor/assets/javascripts/ace/mode-smarty.js +40 -54
- data/vendor/assets/javascripts/ace/mode-soy_template.js +41 -55
- data/vendor/assets/javascripts/ace/mode-sqlserver.js +3 -3
- data/vendor/assets/javascripts/ace/mode-stylus.js +1 -1
- data/vendor/assets/javascripts/ace/mode-svg.js +34 -48
- data/vendor/assets/javascripts/ace/mode-swift.js +5 -5
- data/vendor/assets/javascripts/ace/mode-tex.js +24 -24
- data/vendor/assets/javascripts/ace/mode-twig.js +40 -54
- data/vendor/assets/javascripts/ace/mode-typescript.js +33 -47
- data/vendor/assets/javascripts/ace/mode-velocity.js +40 -54
- data/vendor/assets/javascripts/ace/mode-vhdl.js +2 -2
- data/vendor/assets/javascripts/ace/mode-wollok.js +1256 -0
- data/vendor/assets/javascripts/ace/mode-xml.js +1 -1
- data/vendor/assets/javascripts/ace/worker-coffee.js +1 -1
- data/vendor/assets/javascripts/ace/worker-css.js +1 -1
- data/vendor/assets/javascripts/ace/worker-html.js +2 -2
- data/vendor/assets/javascripts/ace/worker-javascript.js +1 -1
- data/vendor/assets/javascripts/ace/worker-json.js +1 -1
- data/vendor/assets/javascripts/ace/worker-lua.js +1 -1
- data/vendor/assets/javascripts/ace/worker-php.js +2 -4
- data/vendor/assets/javascripts/ace/worker-xml.js +1 -1
- data/vendor/assets/javascripts/ace/worker-xquery.js +1 -1
- metadata +8 -3
@@ -87,25 +87,17 @@ var JavaScriptHighlightRules = function(options) {
|
|
87
87
|
|
88
88
|
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
|
89
89
|
"u[0-9a-fA-F]{4}|" + // unicode
|
90
|
+
"u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
|
90
91
|
"[0-2][0-7]{0,2}|" + // oct
|
91
|
-
"3[0-
|
92
|
-
"37[0-7]?|" + // oct
|
92
|
+
"3[0-7][0-7]?|" + // oct
|
93
93
|
"[4-7][0-7]?|" + //oct
|
94
94
|
".)";
|
95
95
|
|
96
96
|
this.$rules = {
|
97
97
|
"no_regex" : [
|
98
|
-
{
|
99
|
-
token : "comment",
|
100
|
-
regex : "\\/\\/",
|
101
|
-
next : "line_comment"
|
102
|
-
},
|
103
98
|
DocCommentHighlightRules.getStartRule("doc-start"),
|
99
|
+
comments("no_regex"),
|
104
100
|
{
|
105
|
-
token : "comment", // multi line comment
|
106
|
-
regex : /\/\*/,
|
107
|
-
next : "comment"
|
108
|
-
}, {
|
109
101
|
token : "string",
|
110
102
|
regex : "'(?=.)",
|
111
103
|
next : "qstring"
|
@@ -115,10 +107,10 @@ var JavaScriptHighlightRules = function(options) {
|
|
115
107
|
next : "qqstring"
|
116
108
|
}, {
|
117
109
|
token : "constant.numeric", // hex
|
118
|
-
regex : /0[xX][0-9a-fA-F]
|
110
|
+
regex : /0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/
|
119
111
|
}, {
|
120
112
|
token : "constant.numeric", // float
|
121
|
-
regex : /[+-]?\d
|
113
|
+
regex : /[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
|
122
114
|
}, {
|
123
115
|
token : [
|
124
116
|
"storage.type", "punctuation.operator", "support.function",
|
@@ -186,7 +178,7 @@ var JavaScriptHighlightRules = function(options) {
|
|
186
178
|
next : "property"
|
187
179
|
}, {
|
188
180
|
token : "keyword.operator",
|
189
|
-
regex : /--|\+\+|\.{3}
|
181
|
+
regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
|
190
182
|
next : "start"
|
191
183
|
}, {
|
192
184
|
token : "punctuation.operator",
|
@@ -238,15 +230,8 @@ var JavaScriptHighlightRules = function(options) {
|
|
238
230
|
],
|
239
231
|
"start": [
|
240
232
|
DocCommentHighlightRules.getStartRule("doc-start"),
|
233
|
+
comments("start"),
|
241
234
|
{
|
242
|
-
token : "comment", // multi line comment
|
243
|
-
regex : "\\/\\*",
|
244
|
-
next : "comment_regex_allowed"
|
245
|
-
}, {
|
246
|
-
token : "comment",
|
247
|
-
regex : "\\/\\/",
|
248
|
-
next : "line_comment_regex_allowed"
|
249
|
-
}, {
|
250
235
|
token: "string.regexp",
|
251
236
|
regex: "\\/",
|
252
237
|
next: "regex"
|
@@ -324,26 +309,6 @@ var JavaScriptHighlightRules = function(options) {
|
|
324
309
|
next: "no_regex"
|
325
310
|
}
|
326
311
|
],
|
327
|
-
"comment_regex_allowed" : [
|
328
|
-
DocCommentHighlightRules.getTagRule(),
|
329
|
-
{token : "comment", regex : "\\*\\/", next : "start"},
|
330
|
-
{defaultToken : "comment", caseInsensitive: true}
|
331
|
-
],
|
332
|
-
"comment" : [
|
333
|
-
DocCommentHighlightRules.getTagRule(),
|
334
|
-
{token : "comment", regex : "\\*\\/", next : "no_regex"},
|
335
|
-
{defaultToken : "comment", caseInsensitive: true}
|
336
|
-
],
|
337
|
-
"line_comment_regex_allowed" : [
|
338
|
-
DocCommentHighlightRules.getTagRule(),
|
339
|
-
{token : "comment", regex : "$|^", next : "start"},
|
340
|
-
{defaultToken : "comment", caseInsensitive: true}
|
341
|
-
],
|
342
|
-
"line_comment" : [
|
343
|
-
DocCommentHighlightRules.getTagRule(),
|
344
|
-
{token : "comment", regex : "$|^", next : "no_regex"},
|
345
|
-
{defaultToken : "comment", caseInsensitive: true}
|
346
|
-
],
|
347
312
|
"qqstring" : [
|
348
313
|
{
|
349
314
|
token : "constant.language.escape",
|
@@ -385,9 +350,8 @@ var JavaScriptHighlightRules = function(options) {
|
|
385
350
|
this.next = val == "{" ? this.nextState : "";
|
386
351
|
if (val == "{" && stack.length) {
|
387
352
|
stack.unshift("start", state);
|
388
|
-
return "paren";
|
389
353
|
}
|
390
|
-
if (val == "}" && stack.length) {
|
354
|
+
else if (val == "}" && stack.length) {
|
391
355
|
stack.shift();
|
392
356
|
this.next = stack.shift();
|
393
357
|
if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
|
@@ -490,6 +454,7 @@ function JSX() {
|
|
490
454
|
nextState: "jsx"
|
491
455
|
},
|
492
456
|
jsxJsRule,
|
457
|
+
comments("jsxAttributes"),
|
493
458
|
{
|
494
459
|
token : "entity.other.attribute-name.xml",
|
495
460
|
regex : tagRegex
|
@@ -505,7 +470,6 @@ function JSX() {
|
|
505
470
|
stateName : "jsx_attr_q",
|
506
471
|
push : [
|
507
472
|
{token : "string.attribute-value.xml", regex: "'", next: "pop"},
|
508
|
-
jsxJsRule,
|
509
473
|
{include : "reference"},
|
510
474
|
{defaultToken : "string.attribute-value.xml"}
|
511
475
|
]
|
@@ -514,18 +478,40 @@ function JSX() {
|
|
514
478
|
regex : '"',
|
515
479
|
stateName : "jsx_attr_qq",
|
516
480
|
push : [
|
517
|
-
jsxJsRule,
|
518
481
|
{token : "string.attribute-value.xml", regex: '"', next: "pop"},
|
519
482
|
{include : "reference"},
|
520
483
|
{defaultToken : "string.attribute-value.xml"}
|
521
484
|
]
|
522
|
-
}
|
485
|
+
},
|
486
|
+
jsxTag
|
487
|
+
];
|
523
488
|
this.$rules.reference = [{
|
524
489
|
token : "constant.language.escape.reference.xml",
|
525
490
|
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
526
491
|
}];
|
527
492
|
}
|
528
493
|
|
494
|
+
function comments(next) {
|
495
|
+
return [
|
496
|
+
{
|
497
|
+
token : "comment", // multi line comment
|
498
|
+
regex : /\/\*/,
|
499
|
+
next: [
|
500
|
+
DocCommentHighlightRules.getTagRule(),
|
501
|
+
{token : "comment", regex : "\\*\\/", next : next || "pop"},
|
502
|
+
{defaultToken : "comment", caseInsensitive: true}
|
503
|
+
]
|
504
|
+
}, {
|
505
|
+
token : "comment",
|
506
|
+
regex : "\\/\\/",
|
507
|
+
next: [
|
508
|
+
DocCommentHighlightRules.getTagRule(),
|
509
|
+
{token : "comment", regex : "$|^", next : next || "pop"},
|
510
|
+
{defaultToken : "comment", caseInsensitive: true}
|
511
|
+
]
|
512
|
+
}
|
513
|
+
];
|
514
|
+
}
|
529
515
|
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
|
530
516
|
});
|
531
517
|
|
@@ -1230,10 +1216,10 @@ var JavaHighlightRules = function() {
|
|
1230
1216
|
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
1231
1217
|
}, {
|
1232
1218
|
token : "constant.numeric", // hex
|
1233
|
-
regex :
|
1219
|
+
regex : /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
|
1234
1220
|
}, {
|
1235
1221
|
token : "constant.numeric", // float
|
1236
|
-
regex :
|
1222
|
+
regex : /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/
|
1237
1223
|
}, {
|
1238
1224
|
token : "constant.language.boolean",
|
1239
1225
|
regex : "(?:true|false)\\b"
|
@@ -87,25 +87,17 @@ var JavaScriptHighlightRules = function(options) {
|
|
87
87
|
|
88
88
|
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
|
89
89
|
"u[0-9a-fA-F]{4}|" + // unicode
|
90
|
+
"u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
|
90
91
|
"[0-2][0-7]{0,2}|" + // oct
|
91
|
-
"3[0-
|
92
|
-
"37[0-7]?|" + // oct
|
92
|
+
"3[0-7][0-7]?|" + // oct
|
93
93
|
"[4-7][0-7]?|" + //oct
|
94
94
|
".)";
|
95
95
|
|
96
96
|
this.$rules = {
|
97
97
|
"no_regex" : [
|
98
|
-
{
|
99
|
-
token : "comment",
|
100
|
-
regex : "\\/\\/",
|
101
|
-
next : "line_comment"
|
102
|
-
},
|
103
98
|
DocCommentHighlightRules.getStartRule("doc-start"),
|
99
|
+
comments("no_regex"),
|
104
100
|
{
|
105
|
-
token : "comment", // multi line comment
|
106
|
-
regex : /\/\*/,
|
107
|
-
next : "comment"
|
108
|
-
}, {
|
109
101
|
token : "string",
|
110
102
|
regex : "'(?=.)",
|
111
103
|
next : "qstring"
|
@@ -115,10 +107,10 @@ var JavaScriptHighlightRules = function(options) {
|
|
115
107
|
next : "qqstring"
|
116
108
|
}, {
|
117
109
|
token : "constant.numeric", // hex
|
118
|
-
regex : /0[xX][0-9a-fA-F]
|
110
|
+
regex : /0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/
|
119
111
|
}, {
|
120
112
|
token : "constant.numeric", // float
|
121
|
-
regex : /[+-]?\d
|
113
|
+
regex : /[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
|
122
114
|
}, {
|
123
115
|
token : [
|
124
116
|
"storage.type", "punctuation.operator", "support.function",
|
@@ -186,7 +178,7 @@ var JavaScriptHighlightRules = function(options) {
|
|
186
178
|
next : "property"
|
187
179
|
}, {
|
188
180
|
token : "keyword.operator",
|
189
|
-
regex : /--|\+\+|\.{3}
|
181
|
+
regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
|
190
182
|
next : "start"
|
191
183
|
}, {
|
192
184
|
token : "punctuation.operator",
|
@@ -238,15 +230,8 @@ var JavaScriptHighlightRules = function(options) {
|
|
238
230
|
],
|
239
231
|
"start": [
|
240
232
|
DocCommentHighlightRules.getStartRule("doc-start"),
|
233
|
+
comments("start"),
|
241
234
|
{
|
242
|
-
token : "comment", // multi line comment
|
243
|
-
regex : "\\/\\*",
|
244
|
-
next : "comment_regex_allowed"
|
245
|
-
}, {
|
246
|
-
token : "comment",
|
247
|
-
regex : "\\/\\/",
|
248
|
-
next : "line_comment_regex_allowed"
|
249
|
-
}, {
|
250
235
|
token: "string.regexp",
|
251
236
|
regex: "\\/",
|
252
237
|
next: "regex"
|
@@ -324,26 +309,6 @@ var JavaScriptHighlightRules = function(options) {
|
|
324
309
|
next: "no_regex"
|
325
310
|
}
|
326
311
|
],
|
327
|
-
"comment_regex_allowed" : [
|
328
|
-
DocCommentHighlightRules.getTagRule(),
|
329
|
-
{token : "comment", regex : "\\*\\/", next : "start"},
|
330
|
-
{defaultToken : "comment", caseInsensitive: true}
|
331
|
-
],
|
332
|
-
"comment" : [
|
333
|
-
DocCommentHighlightRules.getTagRule(),
|
334
|
-
{token : "comment", regex : "\\*\\/", next : "no_regex"},
|
335
|
-
{defaultToken : "comment", caseInsensitive: true}
|
336
|
-
],
|
337
|
-
"line_comment_regex_allowed" : [
|
338
|
-
DocCommentHighlightRules.getTagRule(),
|
339
|
-
{token : "comment", regex : "$|^", next : "start"},
|
340
|
-
{defaultToken : "comment", caseInsensitive: true}
|
341
|
-
],
|
342
|
-
"line_comment" : [
|
343
|
-
DocCommentHighlightRules.getTagRule(),
|
344
|
-
{token : "comment", regex : "$|^", next : "no_regex"},
|
345
|
-
{defaultToken : "comment", caseInsensitive: true}
|
346
|
-
],
|
347
312
|
"qqstring" : [
|
348
313
|
{
|
349
314
|
token : "constant.language.escape",
|
@@ -385,9 +350,8 @@ var JavaScriptHighlightRules = function(options) {
|
|
385
350
|
this.next = val == "{" ? this.nextState : "";
|
386
351
|
if (val == "{" && stack.length) {
|
387
352
|
stack.unshift("start", state);
|
388
|
-
return "paren";
|
389
353
|
}
|
390
|
-
if (val == "}" && stack.length) {
|
354
|
+
else if (val == "}" && stack.length) {
|
391
355
|
stack.shift();
|
392
356
|
this.next = stack.shift();
|
393
357
|
if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
|
@@ -490,6 +454,7 @@ function JSX() {
|
|
490
454
|
nextState: "jsx"
|
491
455
|
},
|
492
456
|
jsxJsRule,
|
457
|
+
comments("jsxAttributes"),
|
493
458
|
{
|
494
459
|
token : "entity.other.attribute-name.xml",
|
495
460
|
regex : tagRegex
|
@@ -505,7 +470,6 @@ function JSX() {
|
|
505
470
|
stateName : "jsx_attr_q",
|
506
471
|
push : [
|
507
472
|
{token : "string.attribute-value.xml", regex: "'", next: "pop"},
|
508
|
-
jsxJsRule,
|
509
473
|
{include : "reference"},
|
510
474
|
{defaultToken : "string.attribute-value.xml"}
|
511
475
|
]
|
@@ -514,18 +478,40 @@ function JSX() {
|
|
514
478
|
regex : '"',
|
515
479
|
stateName : "jsx_attr_qq",
|
516
480
|
push : [
|
517
|
-
jsxJsRule,
|
518
481
|
{token : "string.attribute-value.xml", regex: '"', next: "pop"},
|
519
482
|
{include : "reference"},
|
520
483
|
{defaultToken : "string.attribute-value.xml"}
|
521
484
|
]
|
522
|
-
}
|
485
|
+
},
|
486
|
+
jsxTag
|
487
|
+
];
|
523
488
|
this.$rules.reference = [{
|
524
489
|
token : "constant.language.escape.reference.xml",
|
525
490
|
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
526
491
|
}];
|
527
492
|
}
|
528
493
|
|
494
|
+
function comments(next) {
|
495
|
+
return [
|
496
|
+
{
|
497
|
+
token : "comment", // multi line comment
|
498
|
+
regex : /\/\*/,
|
499
|
+
next: [
|
500
|
+
DocCommentHighlightRules.getTagRule(),
|
501
|
+
{token : "comment", regex : "\\*\\/", next : next || "pop"},
|
502
|
+
{defaultToken : "comment", caseInsensitive: true}
|
503
|
+
]
|
504
|
+
}, {
|
505
|
+
token : "comment",
|
506
|
+
regex : "\\/\\/",
|
507
|
+
next: [
|
508
|
+
DocCommentHighlightRules.getTagRule(),
|
509
|
+
{token : "comment", regex : "$|^", next : next || "pop"},
|
510
|
+
{defaultToken : "comment", caseInsensitive: true}
|
511
|
+
]
|
512
|
+
}
|
513
|
+
];
|
514
|
+
}
|
529
515
|
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
|
530
516
|
});
|
531
517
|
|
@@ -4,7 +4,7 @@ define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop
|
|
4
4
|
var oop = require("../lib/oop");
|
5
5
|
var lang = require("../lib/lang");
|
6
6
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
7
|
-
var supportType = exports.supportType = "
|
7
|
+
var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|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|bottom|box-shadow|box-sizing|caption-side|clear|clip|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
|
8
8
|
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
|
9
9
|
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";
|
10
10
|
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
|
@@ -231,25 +231,17 @@ var JavaScriptHighlightRules = function(options) {
|
|
231
231
|
|
232
232
|
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
|
233
233
|
"u[0-9a-fA-F]{4}|" + // unicode
|
234
|
+
"u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
|
234
235
|
"[0-2][0-7]{0,2}|" + // oct
|
235
|
-
"3[0-
|
236
|
-
"37[0-7]?|" + // oct
|
236
|
+
"3[0-7][0-7]?|" + // oct
|
237
237
|
"[4-7][0-7]?|" + //oct
|
238
238
|
".)";
|
239
239
|
|
240
240
|
this.$rules = {
|
241
241
|
"no_regex" : [
|
242
|
-
{
|
243
|
-
token : "comment",
|
244
|
-
regex : "\\/\\/",
|
245
|
-
next : "line_comment"
|
246
|
-
},
|
247
242
|
DocCommentHighlightRules.getStartRule("doc-start"),
|
243
|
+
comments("no_regex"),
|
248
244
|
{
|
249
|
-
token : "comment", // multi line comment
|
250
|
-
regex : /\/\*/,
|
251
|
-
next : "comment"
|
252
|
-
}, {
|
253
245
|
token : "string",
|
254
246
|
regex : "'(?=.)",
|
255
247
|
next : "qstring"
|
@@ -259,10 +251,10 @@ var JavaScriptHighlightRules = function(options) {
|
|
259
251
|
next : "qqstring"
|
260
252
|
}, {
|
261
253
|
token : "constant.numeric", // hex
|
262
|
-
regex : /0[xX][0-9a-fA-F]
|
254
|
+
regex : /0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/
|
263
255
|
}, {
|
264
256
|
token : "constant.numeric", // float
|
265
|
-
regex : /[+-]?\d
|
257
|
+
regex : /[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
|
266
258
|
}, {
|
267
259
|
token : [
|
268
260
|
"storage.type", "punctuation.operator", "support.function",
|
@@ -330,7 +322,7 @@ var JavaScriptHighlightRules = function(options) {
|
|
330
322
|
next : "property"
|
331
323
|
}, {
|
332
324
|
token : "keyword.operator",
|
333
|
-
regex : /--|\+\+|\.{3}
|
325
|
+
regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
|
334
326
|
next : "start"
|
335
327
|
}, {
|
336
328
|
token : "punctuation.operator",
|
@@ -382,15 +374,8 @@ var JavaScriptHighlightRules = function(options) {
|
|
382
374
|
],
|
383
375
|
"start": [
|
384
376
|
DocCommentHighlightRules.getStartRule("doc-start"),
|
377
|
+
comments("start"),
|
385
378
|
{
|
386
|
-
token : "comment", // multi line comment
|
387
|
-
regex : "\\/\\*",
|
388
|
-
next : "comment_regex_allowed"
|
389
|
-
}, {
|
390
|
-
token : "comment",
|
391
|
-
regex : "\\/\\/",
|
392
|
-
next : "line_comment_regex_allowed"
|
393
|
-
}, {
|
394
379
|
token: "string.regexp",
|
395
380
|
regex: "\\/",
|
396
381
|
next: "regex"
|
@@ -468,26 +453,6 @@ var JavaScriptHighlightRules = function(options) {
|
|
468
453
|
next: "no_regex"
|
469
454
|
}
|
470
455
|
],
|
471
|
-
"comment_regex_allowed" : [
|
472
|
-
DocCommentHighlightRules.getTagRule(),
|
473
|
-
{token : "comment", regex : "\\*\\/", next : "start"},
|
474
|
-
{defaultToken : "comment", caseInsensitive: true}
|
475
|
-
],
|
476
|
-
"comment" : [
|
477
|
-
DocCommentHighlightRules.getTagRule(),
|
478
|
-
{token : "comment", regex : "\\*\\/", next : "no_regex"},
|
479
|
-
{defaultToken : "comment", caseInsensitive: true}
|
480
|
-
],
|
481
|
-
"line_comment_regex_allowed" : [
|
482
|
-
DocCommentHighlightRules.getTagRule(),
|
483
|
-
{token : "comment", regex : "$|^", next : "start"},
|
484
|
-
{defaultToken : "comment", caseInsensitive: true}
|
485
|
-
],
|
486
|
-
"line_comment" : [
|
487
|
-
DocCommentHighlightRules.getTagRule(),
|
488
|
-
{token : "comment", regex : "$|^", next : "no_regex"},
|
489
|
-
{defaultToken : "comment", caseInsensitive: true}
|
490
|
-
],
|
491
456
|
"qqstring" : [
|
492
457
|
{
|
493
458
|
token : "constant.language.escape",
|
@@ -529,9 +494,8 @@ var JavaScriptHighlightRules = function(options) {
|
|
529
494
|
this.next = val == "{" ? this.nextState : "";
|
530
495
|
if (val == "{" && stack.length) {
|
531
496
|
stack.unshift("start", state);
|
532
|
-
return "paren";
|
533
497
|
}
|
534
|
-
if (val == "}" && stack.length) {
|
498
|
+
else if (val == "}" && stack.length) {
|
535
499
|
stack.shift();
|
536
500
|
this.next = stack.shift();
|
537
501
|
if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
|
@@ -634,6 +598,7 @@ function JSX() {
|
|
634
598
|
nextState: "jsx"
|
635
599
|
},
|
636
600
|
jsxJsRule,
|
601
|
+
comments("jsxAttributes"),
|
637
602
|
{
|
638
603
|
token : "entity.other.attribute-name.xml",
|
639
604
|
regex : tagRegex
|
@@ -649,7 +614,6 @@ function JSX() {
|
|
649
614
|
stateName : "jsx_attr_q",
|
650
615
|
push : [
|
651
616
|
{token : "string.attribute-value.xml", regex: "'", next: "pop"},
|
652
|
-
jsxJsRule,
|
653
617
|
{include : "reference"},
|
654
618
|
{defaultToken : "string.attribute-value.xml"}
|
655
619
|
]
|
@@ -658,18 +622,40 @@ function JSX() {
|
|
658
622
|
regex : '"',
|
659
623
|
stateName : "jsx_attr_qq",
|
660
624
|
push : [
|
661
|
-
jsxJsRule,
|
662
625
|
{token : "string.attribute-value.xml", regex: '"', next: "pop"},
|
663
626
|
{include : "reference"},
|
664
627
|
{defaultToken : "string.attribute-value.xml"}
|
665
628
|
]
|
666
|
-
}
|
629
|
+
},
|
630
|
+
jsxTag
|
631
|
+
];
|
667
632
|
this.$rules.reference = [{
|
668
633
|
token : "constant.language.escape.reference.xml",
|
669
634
|
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
670
635
|
}];
|
671
636
|
}
|
672
637
|
|
638
|
+
function comments(next) {
|
639
|
+
return [
|
640
|
+
{
|
641
|
+
token : "comment", // multi line comment
|
642
|
+
regex : /\/\*/,
|
643
|
+
next: [
|
644
|
+
DocCommentHighlightRules.getTagRule(),
|
645
|
+
{token : "comment", regex : "\\*\\/", next : next || "pop"},
|
646
|
+
{defaultToken : "comment", caseInsensitive: true}
|
647
|
+
]
|
648
|
+
}, {
|
649
|
+
token : "comment",
|
650
|
+
regex : "\\/\\/",
|
651
|
+
next: [
|
652
|
+
DocCommentHighlightRules.getTagRule(),
|
653
|
+
{token : "comment", regex : "$|^", next : next || "pop"},
|
654
|
+
{defaultToken : "comment", caseInsensitive: true}
|
655
|
+
]
|
656
|
+
}
|
657
|
+
];
|
658
|
+
}
|
673
659
|
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
|
674
660
|
});
|
675
661
|
|
@@ -691,7 +677,7 @@ var XmlHighlightRules = function(normalize) {
|
|
691
677
|
},
|
692
678
|
{
|
693
679
|
token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
|
694
|
-
regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
|
680
|
+
regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
|
695
681
|
},
|
696
682
|
{token : "comment.xml", regex : "<\\!--", next : "comment"},
|
697
683
|
{
|
@@ -952,7 +938,7 @@ var HtmlHighlightRules = function() {
|
|
952
938
|
tag_stuff: [
|
953
939
|
{include : "attributes"},
|
954
940
|
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
|
955
|
-
]
|
941
|
+
]
|
956
942
|
});
|
957
943
|
|
958
944
|
this.embedTagRules(CssHighlightRules, "css-", "style");
|
@@ -1044,10 +1030,10 @@ var JavaHighlightRules = function() {
|
|
1044
1030
|
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
1045
1031
|
}, {
|
1046
1032
|
token : "constant.numeric", // hex
|
1047
|
-
regex :
|
1033
|
+
regex : /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
|
1048
1034
|
}, {
|
1049
1035
|
token : "constant.numeric", // float
|
1050
|
-
regex :
|
1036
|
+
regex : /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/
|
1051
1037
|
}, {
|
1052
1038
|
token : "constant.language.boolean",
|
1053
1039
|
regex : "(?:true|false)\\b"
|