merge tokens of same type by default
This commit is contained in:
parent
e56b9284da
commit
759fbaba44
39 changed files with 30 additions and 221 deletions
|
|
@ -117,13 +117,13 @@ var AbapHighlightRules = function() {
|
|||
],
|
||||
"qstring" : [
|
||||
{token : "constant.language.escape", regex : "''"},
|
||||
{token : "string", regex : "'", next : "start", merge : true},
|
||||
{token : "string", regex : ".|\w+", merge : true}
|
||||
{token : "string", regex : "'", next : "start"},
|
||||
{token : "string", regex : ".|\w+"}
|
||||
],
|
||||
"string" : [
|
||||
{token : "constant.language.escape", regex : "``"},
|
||||
{token : "string", regex : "`", next : "start", merge : true},
|
||||
{token : "string", regex : ".|\w+", merge : true}
|
||||
{token : "string", regex : "`", next : "start"},
|
||||
{token : "string", regex : ".|\w+"}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -96,9 +96,9 @@ var AsciidocHighlightRules = function() {
|
|||
// any word
|
||||
{token: "text", regex: identifierRe},
|
||||
{token: ["keyword", "string", "keyword"],
|
||||
regex: /(<<[\w\d\-$]+,)(.*?)(>>|$)/, merge: true},
|
||||
{token: "keyword", regex: /<<[\w\d\-$]+,?|>>/, merge: true},
|
||||
{token: "constant.character", regex: /\({2,3}.*?\){2,3}/, merge: true},
|
||||
regex: /(<<[\w\d\-$]+,)(.*?)(>>|$)/},
|
||||
{token: "keyword", regex: /<<[\w\d\-$]+,?|>>/},
|
||||
{token: "constant.character", regex: /\({2,3}.*?\){2,3}/},
|
||||
// Anchor
|
||||
{token: "keyword", regex: /\[\[.+?\]\]/},
|
||||
// bibliography
|
||||
|
|
@ -122,26 +122,26 @@ var AsciidocHighlightRules = function() {
|
|||
"listingBlock": [
|
||||
{token: "literal", regex: /^\.{4,}\s*$/, next: "dissallowDelimitedBlock"},
|
||||
{token: "constant.numeric", regex: '<\\d+>'},
|
||||
{token: "literal", regex: '[^<]+', merge: true},
|
||||
{token: "literal", regex: '<', merge: true}
|
||||
{token: "literal", regex: '[^<]+'},
|
||||
{token: "literal", regex: '<'}
|
||||
],
|
||||
"literalBlock": [
|
||||
{token: "literal", regex: /^-{4,}\s*$/, next: "dissallowDelimitedBlock"},
|
||||
{token: "constant.numeric", regex: '<\\d+>'},
|
||||
{token: "literal", regex: '[^<]+', merge: true},
|
||||
{token: "literal", regex: '<', merge: true}
|
||||
{token: "literal", regex: '[^<]+'},
|
||||
{token: "literal", regex: '<'}
|
||||
],
|
||||
"passthroughBlock": [
|
||||
{token: "literal", regex: /^\+{4,}\s*$/, next: "dissallowDelimitedBlock"},
|
||||
{token: "literal", regex: identifierRe + "|\\d+", merge: true},
|
||||
{token: "literal", regex: identifierRe + "|\\d+"},
|
||||
{include: "macros"},
|
||||
{token: "literal", regex: ".", merge: true}
|
||||
{token: "literal", regex: "."}
|
||||
],
|
||||
|
||||
"smallPassthrough": [
|
||||
{token: "literal", regex: /[+]{3,}/, next: "dissallowDelimitedBlock"},
|
||||
{token: "literal", regex: /^\s*$/, next: "dissallowDelimitedBlock", merge: true},
|
||||
{token: "literal", regex: identifierRe + "|\\d+", merge: true},
|
||||
{token: "literal", regex: /^\s*$/, next: "dissallowDelimitedBlock"},
|
||||
{token: "literal", regex: identifierRe + "|\\d+"},
|
||||
{include: "macros"}
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ var c_cppHighlightRules = function() {
|
|||
DocCommentHighlightRules.getStartRule("doc-start"),
|
||||
{
|
||||
token : "comment", // multi line comment
|
||||
merge : true,
|
||||
regex : "\\/\\*",
|
||||
next : "comment"
|
||||
}, {
|
||||
|
|
@ -66,7 +65,6 @@ var c_cppHighlightRules = function() {
|
|||
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
||||
}, {
|
||||
token : "string", // multi line string start
|
||||
merge : true,
|
||||
regex : '["].*\\\\$',
|
||||
next : "qqstring"
|
||||
}, {
|
||||
|
|
@ -74,7 +72,6 @@ var c_cppHighlightRules = function() {
|
|||
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
||||
}, {
|
||||
token : "string", // multi line string start
|
||||
merge : true,
|
||||
regex : "['].*\\\\$",
|
||||
next : "qstring"
|
||||
}, {
|
||||
|
|
@ -120,7 +117,6 @@ var c_cppHighlightRules = function() {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "comment", // comment spanning whole line
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}
|
||||
],
|
||||
|
|
@ -131,7 +127,6 @@ var c_cppHighlightRules = function() {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : '.+'
|
||||
}
|
||||
],
|
||||
|
|
@ -142,7 +137,6 @@ var c_cppHighlightRules = function() {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : '.+'
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -180,12 +180,10 @@ var ClojureHighlightRules = function() {
|
|||
],
|
||||
"string" : [
|
||||
{
|
||||
token : "constant.language.escape",
|
||||
merge : true,
|
||||
token : "constant.language.escape",
|
||||
regex : "\\\\.|\\\\$"
|
||||
}, {
|
||||
token : "string",
|
||||
merge : true,
|
||||
token : "string",
|
||||
regex : '[^"\\\\]+'
|
||||
}, {
|
||||
token : "string",
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ define(function(require, exports, module) {
|
|||
var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
|
||||
var stringfill = {
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
};
|
||||
|
||||
|
|
@ -113,32 +112,26 @@ define(function(require, exports, module) {
|
|||
regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
|
||||
}, {
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : "'''",
|
||||
next : "qdoc"
|
||||
}, {
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : '"""',
|
||||
next : "qqdoc"
|
||||
}, {
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : "'",
|
||||
next : "qstring"
|
||||
}, {
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : '"',
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : "`",
|
||||
next : "js"
|
||||
}, {
|
||||
token : "string.regex",
|
||||
merge : true,
|
||||
regex : "///",
|
||||
next : "heregex"
|
||||
}, {
|
||||
|
|
@ -146,7 +139,6 @@ define(function(require, exports, module) {
|
|||
regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/
|
||||
}, {
|
||||
token : "comment",
|
||||
merge : true,
|
||||
regex : "###(?!#)",
|
||||
next : "comment"
|
||||
}, {
|
||||
|
|
@ -281,20 +273,17 @@ define(function(require, exports, module) {
|
|||
qstring : [{
|
||||
token : "string",
|
||||
regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
|
||||
merge : true,
|
||||
next : "start"
|
||||
}, stringfill],
|
||||
|
||||
qqstring : [{
|
||||
token : "string",
|
||||
regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
|
||||
merge : true,
|
||||
next : "start"
|
||||
}, stringfill],
|
||||
|
||||
js : [{
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : "[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",
|
||||
next : "start"
|
||||
}, stringfill],
|
||||
|
|
@ -308,7 +297,6 @@ define(function(require, exports, module) {
|
|||
regex : "\\s+(?:#.*)?"
|
||||
}, {
|
||||
token : "string.regex",
|
||||
merge : true,
|
||||
regex : "\\S+"
|
||||
}],
|
||||
|
||||
|
|
@ -318,7 +306,6 @@ define(function(require, exports, module) {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "comment",
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ var ColdfusionHighlightRules = function() {
|
|||
this.$rules = {
|
||||
start : [ {
|
||||
token : "text",
|
||||
merge : true,
|
||||
regex : "<\\!\\[CDATA\\[",
|
||||
next : "cdata"
|
||||
}, {
|
||||
|
|
@ -53,7 +52,6 @@ var ColdfusionHighlightRules = function() {
|
|||
regex : "<\\?.*?\\?>"
|
||||
}, {
|
||||
token : "comment",
|
||||
merge : true,
|
||||
regex : "<\\!--",
|
||||
next : "comment"
|
||||
}, {
|
||||
|
|
@ -82,11 +80,9 @@ var ColdfusionHighlightRules = function() {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "text",
|
||||
merge : true,
|
||||
regex : "\\s+"
|
||||
}, {
|
||||
token : "text",
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
} ],
|
||||
|
||||
|
|
@ -96,7 +92,6 @@ var ColdfusionHighlightRules = function() {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "comment",
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
} ]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ var CSharpHighlightRules = function() {
|
|||
{
|
||||
token : "comment", // multi line comment
|
||||
regex : "\\/\\*",
|
||||
merge : true,
|
||||
next : "comment"
|
||||
}, {
|
||||
token : "string.regexp",
|
||||
|
|
@ -74,7 +73,6 @@ var CSharpHighlightRules = function() {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "comment", // comment spanning whole line
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ var CssHighlightRules = function() {
|
|||
var base_ruleset = [
|
||||
{
|
||||
token : "comment", // multi line comment
|
||||
merge : true,
|
||||
regex : "\\/\\*",
|
||||
next : "ruleset_comment"
|
||||
}, {
|
||||
|
|
@ -112,7 +111,6 @@ var CssHighlightRules = function() {
|
|||
|
||||
var base_comment = [{
|
||||
token : "comment", // comment spanning whole line
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}];
|
||||
|
||||
|
|
@ -140,7 +138,6 @@ var CssHighlightRules = function() {
|
|||
this.$rules = {
|
||||
"start" : [{
|
||||
token : "comment", // multi line comment
|
||||
merge : true,
|
||||
regex : "\\/\\*",
|
||||
next : "comment"
|
||||
}, {
|
||||
|
|
@ -167,7 +164,6 @@ var CssHighlightRules = function() {
|
|||
|
||||
"media" : [ {
|
||||
token : "comment", // multi line comment
|
||||
merge : true,
|
||||
regex : "\\/\\*",
|
||||
next : "media_comment"
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ var DartHighlightRules = function() {
|
|||
|
||||
var stringfill = {
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
};
|
||||
|
||||
|
|
@ -44,7 +43,6 @@ var DartHighlightRules = function() {
|
|||
},
|
||||
{
|
||||
"token" : "comment", // multi line comment
|
||||
"merge" : true,
|
||||
"regex" : /\/\*/,
|
||||
"next" : "comment"
|
||||
},
|
||||
|
|
@ -94,25 +92,21 @@ var DartHighlightRules = function() {
|
|||
},
|
||||
{
|
||||
"token" : "string",
|
||||
"merge" : true,
|
||||
"regex" : "'''",
|
||||
"next" : "qdoc"
|
||||
},
|
||||
{
|
||||
"token" : "string",
|
||||
"merge" : true,
|
||||
"regex" : '"""',
|
||||
"next" : "qqdoc"
|
||||
},
|
||||
{
|
||||
"token" : "string",
|
||||
"merge" : true,
|
||||
"regex" : "'",
|
||||
"next" : "qstring"
|
||||
},
|
||||
{
|
||||
"token" : "string",
|
||||
"merge" : true,
|
||||
"regex" : '"',
|
||||
"next" : "qqstring"
|
||||
},
|
||||
|
|
@ -145,11 +139,9 @@ var DartHighlightRules = function() {
|
|||
{
|
||||
token : "comment", // closing comment
|
||||
regex : ".*?\\*\\/",
|
||||
merge : true,
|
||||
next : "start"
|
||||
}, {
|
||||
token : "comment", // comment spanning whole line
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}
|
||||
],
|
||||
|
|
@ -171,7 +163,6 @@ var DartHighlightRules = function() {
|
|||
{
|
||||
"token" : "string",
|
||||
"regex" : "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
|
||||
"merge" : true,
|
||||
"next" : "start"
|
||||
}, stringfill],
|
||||
|
||||
|
|
@ -179,7 +170,6 @@ var DartHighlightRules = function() {
|
|||
{
|
||||
"token" : "string",
|
||||
"regex" : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
|
||||
"merge" : true,
|
||||
"next" : "start"
|
||||
}, stringfill]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,19 +42,15 @@ var DocCommentHighlightRules = function() {
|
|||
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
||||
}, {
|
||||
token : "comment.doc",
|
||||
merge : true,
|
||||
regex : "\\s+"
|
||||
}, {
|
||||
token : "comment.doc",
|
||||
merge : true,
|
||||
regex : "TODO"
|
||||
}, {
|
||||
token : "comment.doc",
|
||||
merge : true,
|
||||
regex : "[^@\\*]+"
|
||||
}, {
|
||||
token : "comment.doc",
|
||||
merge : true,
|
||||
regex : "."
|
||||
}]
|
||||
};
|
||||
|
|
@ -65,7 +61,6 @@ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
|||
DocCommentHighlightRules.getStartRule = function(start) {
|
||||
return {
|
||||
token : "comment.doc", // doc comment
|
||||
merge : true,
|
||||
regex : "\\/\\*(?=\\*)",
|
||||
next : start
|
||||
};
|
||||
|
|
@ -74,7 +69,6 @@ DocCommentHighlightRules.getStartRule = function(start) {
|
|||
DocCommentHighlightRules.getEndRule = function (start) {
|
||||
return {
|
||||
token : "comment.doc", // closing comment
|
||||
merge : true,
|
||||
regex : "\\*\\/",
|
||||
next : start
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ define(function(require, exports, module) {
|
|||
DocCommentHighlightRules.getStartRule("doc-start"),
|
||||
{
|
||||
token : "comment", // multi line comment
|
||||
merge : true,
|
||||
regex : "\\/\\*",
|
||||
next : "comment"
|
||||
}, {
|
||||
|
|
@ -35,7 +34,6 @@ define(function(require, exports, module) {
|
|||
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
||||
}, {
|
||||
token : "string", // multi line string start
|
||||
merge : true,
|
||||
regex : '["].*\\\\$',
|
||||
next : "qqstring"
|
||||
}, {
|
||||
|
|
@ -43,7 +41,6 @@ define(function(require, exports, module) {
|
|||
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
||||
}, {
|
||||
token : "string", // multi line string start
|
||||
merge : true,
|
||||
regex : "['].*\\\\$",
|
||||
next : "qstring"
|
||||
}, {
|
||||
|
|
@ -85,7 +82,6 @@ define(function(require, exports, module) {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "comment", // comment spanning whole line
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}
|
||||
],
|
||||
|
|
@ -96,7 +92,6 @@ define(function(require, exports, module) {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : '.+'
|
||||
}
|
||||
],
|
||||
|
|
@ -107,7 +102,6 @@ define(function(require, exports, module) {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "string",
|
||||
merge : true,
|
||||
regex : '.+'
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ var GroovyHighlightRules = function() {
|
|||
DocCommentHighlightRules.getStartRule("doc-start"),
|
||||
{
|
||||
token : "comment", // multi line comment
|
||||
merge : true,
|
||||
regex : "\\/\\*",
|
||||
next : "comment"
|
||||
}, {
|
||||
|
|
@ -127,7 +126,6 @@ var GroovyHighlightRules = function() {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "comment", // comment spanning whole line
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ var HaxeHighlightRules = function() {
|
|||
{
|
||||
token : "comment", // multi line comment
|
||||
regex : "\\/\\*",
|
||||
merge : true,
|
||||
next : "comment"
|
||||
}, {
|
||||
token : "string.regexp",
|
||||
|
|
@ -84,7 +83,6 @@ var HaxeHighlightRules = function() {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "comment", // comment spanning whole line
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ var HtmlHighlightRules = function() {
|
|||
this.$rules = {
|
||||
start : [{
|
||||
token : "text",
|
||||
merge : true,
|
||||
regex : "<\\!\\[CDATA\\[",
|
||||
next : "cdata"
|
||||
}, {
|
||||
|
|
@ -72,7 +71,6 @@ var HtmlHighlightRules = function() {
|
|||
regex : "<\\?.*?\\?>"
|
||||
}, {
|
||||
token : "comment",
|
||||
merge : true,
|
||||
regex : "<\\!--",
|
||||
next : "comment"
|
||||
}, {
|
||||
|
|
@ -107,11 +105,9 @@ var HtmlHighlightRules = function() {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "text",
|
||||
merge : true,
|
||||
regex : "\\s+"
|
||||
}, {
|
||||
token : "text",
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
} ],
|
||||
|
||||
|
|
@ -121,7 +117,6 @@ var HtmlHighlightRules = function() {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "comment",
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
} ]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -165,7 +165,6 @@ var JadeHighlightRules = function() {
|
|||
},
|
||||
{
|
||||
"token": "comment.block.jade",
|
||||
"merge" : true,
|
||||
"regex" : ".+"
|
||||
}
|
||||
],
|
||||
|
|
@ -264,17 +263,14 @@ var JadeHighlightRules = function() {
|
|||
}, {
|
||||
token : "string",
|
||||
regex : '[^"\\\\]+',
|
||||
merge : true
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "\\\\$",
|
||||
next : "qqstring",
|
||||
merge : true
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"|$',
|
||||
next : "tag_attributes",
|
||||
merge : true
|
||||
}
|
||||
],
|
||||
"qstring" : [
|
||||
|
|
@ -284,17 +280,14 @@ var JadeHighlightRules = function() {
|
|||
}, {
|
||||
token : "string",
|
||||
regex : "[^'\\\\]+",
|
||||
merge : true
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "\\\\$",
|
||||
next : "qstring",
|
||||
merge : true
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "'|$",
|
||||
next : "tag_attributes",
|
||||
merge : true
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ var JavaHighlightRules = function() {
|
|||
DocCommentHighlightRules.getStartRule("doc-start"),
|
||||
{
|
||||
token : "comment", // multi line comment
|
||||
merge : true,
|
||||
regex : "\\/\\*",
|
||||
next : "comment"
|
||||
}, {
|
||||
|
|
@ -117,7 +116,6 @@ var JavaHighlightRules = function() {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "comment", // comment spanning whole line
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ var JavaScriptHighlightRules = function() {
|
|||
DocCommentHighlightRules.getStartRule("doc-start"),
|
||||
{
|
||||
token : "comment", // multi line comment
|
||||
merge : true,
|
||||
regex : /\/\*/,
|
||||
next : "comment"
|
||||
}, {
|
||||
|
|
@ -217,7 +216,6 @@ var JavaScriptHighlightRules = function() {
|
|||
DocCommentHighlightRules.getStartRule("doc-start"),
|
||||
{
|
||||
token : "comment", // multi line comment
|
||||
merge : true,
|
||||
regex : "\\/\\*",
|
||||
next : "comment_regex_allowed"
|
||||
}, {
|
||||
|
|
@ -227,7 +225,6 @@ var JavaScriptHighlightRules = function() {
|
|||
token: "string.regexp",
|
||||
regex: "\\/",
|
||||
next: "regex",
|
||||
merge: true
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
|
|
@ -249,7 +246,6 @@ var JavaScriptHighlightRules = function() {
|
|||
token: "string.regexp",
|
||||
regex: "/\\w*",
|
||||
next: "start",
|
||||
merge: true
|
||||
}, {
|
||||
// invalid operators
|
||||
token : "invalid",
|
||||
|
|
@ -261,12 +257,10 @@ var JavaScriptHighlightRules = function() {
|
|||
}, {
|
||||
token: "string.regexp",
|
||||
regex: /{|[^{\[\/\\(|)$^+*?]+/,
|
||||
merge: true
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: /\[\^?/,
|
||||
next: "regex_character_class",
|
||||
merge: true
|
||||
}, {
|
||||
token: "empty",
|
||||
regex: "",
|
||||
|
|
@ -281,14 +275,12 @@ var JavaScriptHighlightRules = function() {
|
|||
token: "constant.language.escape",
|
||||
regex: "]",
|
||||
next: "regex",
|
||||
merge: true
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: "-"
|
||||
}, {
|
||||
token: "string.regexp.charachterclass",
|
||||
regex: /[^\]\-\\]+/,
|
||||
merge: true
|
||||
}, {
|
||||
token: "empty",
|
||||
regex: "",
|
||||
|
|
@ -302,11 +294,9 @@ var JavaScriptHighlightRules = function() {
|
|||
}, {
|
||||
token: "punctuation.operator",
|
||||
regex: "[, ]+",
|
||||
merge: true
|
||||
}, {
|
||||
token: "punctuation.operator",
|
||||
regex: "$",
|
||||
merge: true
|
||||
}, {
|
||||
token: "empty",
|
||||
regex: "",
|
||||
|
|
@ -317,11 +307,9 @@ var JavaScriptHighlightRules = function() {
|
|||
{
|
||||
token : "comment", // closing comment
|
||||
regex : ".*?\\*\\/",
|
||||
merge : true,
|
||||
next : "regex_allowed"
|
||||
}, {
|
||||
token : "comment", // comment spanning whole line
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}
|
||||
],
|
||||
|
|
@ -329,11 +317,9 @@ var JavaScriptHighlightRules = function() {
|
|||
{
|
||||
token : "comment", // closing comment
|
||||
regex : ".*?\\*\\/",
|
||||
merge : true,
|
||||
next : "start"
|
||||
}, {
|
||||
token : "comment", // comment spanning whole line
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}
|
||||
],
|
||||
|
|
@ -345,16 +331,13 @@ var JavaScriptHighlightRules = function() {
|
|||
token : "string",
|
||||
regex : "\\\\$",
|
||||
next : "qqstring",
|
||||
merge : true
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"|$',
|
||||
next : "start",
|
||||
merge : true
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '.|\\w+|\\s+',
|
||||
merge : true
|
||||
}
|
||||
],
|
||||
"qstring" : [
|
||||
|
|
@ -365,16 +348,13 @@ var JavaScriptHighlightRules = function() {
|
|||
token : "string",
|
||||
regex : "\\\\$",
|
||||
next : "qstring",
|
||||
merge : true
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "'|$",
|
||||
next : "start",
|
||||
merge : true
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '.|\\w+|\\s+',
|
||||
merge : true
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -80,17 +80,14 @@ var JsonHighlightRules = function() {
|
|||
}, {
|
||||
token : "string",
|
||||
regex : '[^"\\\\]+',
|
||||
merge : true
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"',
|
||||
next : "start",
|
||||
merge : true
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "",
|
||||
next : "start",
|
||||
merge : true
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ var JspHighlightRules = function() {
|
|||
|
||||
this.$rules["start"].unshift({
|
||||
token : "comment",
|
||||
merge : true,
|
||||
regex : "<%--",
|
||||
next : "comment"
|
||||
});
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ define(function(require, exports, module) {
|
|||
{
|
||||
token : "comment", // multi line comment
|
||||
regex : "\\/\\*",
|
||||
merge : true,
|
||||
next : "comment"
|
||||
}, {
|
||||
token : "string.regexp",
|
||||
|
|
@ -106,7 +105,6 @@ define(function(require, exports, module) {
|
|||
next : "start"
|
||||
}, {
|
||||
token : "comment", // comment spanning whole line
|
||||
merge : true,
|
||||
regex : ".+"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue