merge tokens of same type by default

This commit is contained in:
nightwing 2012-12-09 19:00:17 +04:00
commit 759fbaba44
39 changed files with 30 additions and 221 deletions

View file

@ -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+"}
]
}
};

View file

@ -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"}
],

View file

@ -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 : '.+'
}
],

View file

@ -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",

View file

@ -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 : ".+"
}]
};

View file

@ -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 : ".+"
} ]
};

View file

@ -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 : ".+"
}
]

View file

@ -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"
}, {

View file

@ -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]
}

View file

@ -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
};

View file

@ -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 : '.+'
}
]

View file

@ -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 : ".+"
}
],

View file

@ -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 : ".+"
}
]

View file

@ -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 : ".+"
} ]
};

View file

@ -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
}
]
};

View file

@ -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 : ".+"
}
]

View file

@ -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
}
]
};

View file

@ -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
}
]
};

View file

@ -54,7 +54,6 @@ var JspHighlightRules = function() {
this.$rules["start"].unshift({
token : "comment",
merge : true,
regex : "<%--",
next : "comment"
});

View file

@ -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 : ".+"
}
]

View file

@ -177,7 +177,6 @@ var LessHighlightRules = function() {
},
{
token : "comment", // multi line comment
merge : true,
regex : "\\/\\*",
next : "comment"
}, {
@ -257,7 +256,6 @@ var LessHighlightRules = function() {
next : "start"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
]

View file

@ -83,7 +83,6 @@ var LiquidHighlightRules = function() {
next : "liquid_start"
}, {
token : "meta.tag",
merge : true,
regex : "<\\!\\[CDATA\\[",
next : "cdata"
}, {
@ -91,7 +90,6 @@ var LiquidHighlightRules = function() {
regex : "<\\?.*?\\?>"
}, {
token : "comment",
merge : true,
regex : "<\\!--",
next : "comment"
}, {
@ -120,11 +118,9 @@ var LiquidHighlightRules = function() {
next : "start"
}, {
token : "text",
merge : true,
regex : "\\s+"
}, {
token : "text",
merge : true,
regex : ".+"
} ],
@ -134,7 +130,6 @@ var LiquidHighlightRules = function() {
next : "start"
}, {
token : "comment",
merge : true,
regex : ".+"
} ] ,

View file

@ -128,27 +128,22 @@ var LuaHighlightRules = function() {
{
token : "comment", // --[[ comment
regex : strPre + '\\-\\-\\[\\[.*$',
merge : true,
next : "qcomment"
}, {
token : "comment", // --[=[ comment
regex : strPre + '\\-\\-\\[\\=\\[.*$',
merge : true,
next : "qcomment1"
}, {
token : "comment", // --[==[ comment
regex : strPre + '\\-\\-\\[\\={2}\\[.*$',
merge : true,
next : "qcomment2"
}, {
token : "comment", // --[===[ comment
regex : strPre + '\\-\\-\\[\\={3}\\[.*$',
merge : true,
next : "qcomment3"
}, {
token : "comment", // --[====[ comment
regex : strPre + '\\-\\-\\[\\={4}\\[.*$',
merge : true,
next : "qcomment4"
}, {
token : function(value){ // --[====+[ comment
@ -164,7 +159,6 @@ var LuaHighlightRules = function() {
return "comment";
},
regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*$',
merge : true,
next : "qcomment5"
},
@ -199,27 +193,22 @@ var LuaHighlightRules = function() {
{
token : "string", // [[ string
regex : strPre + '\\[\\[.*$',
merge : true,
next : "qstring"
}, {
token : "string", // [=[ string
regex : strPre + '\\[\\=\\[.*$',
merge : true,
next : "qstring1"
}, {
token : "string", // [==[ string
regex : strPre + '\\[\\={2}\\[.*$',
merge : true,
next : "qstring2"
}, {
token : "string", // [===[ string
regex : strPre + '\\[\\={3}\\[.*$',
merge : true,
next : "qstring3"
}, {
token : "string", // [====[ string
regex : strPre + '\\[\\={4}\\[.*$',
merge : true,
next : "qstring4"
}, {
token : function(value){ // --[====+[ string
@ -231,7 +220,6 @@ var LuaHighlightRules = function() {
return "string";
},
regex : strPre + '\\[\\={5}\\=*\\[.*$',
merge : true,
next : "qstring5"
},
@ -270,7 +258,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "comment",
merge : true,
regex : '.+'
} ],
"qcomment1": [ {
@ -279,7 +266,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "comment",
merge : true,
regex : '.+'
} ],
"qcomment2": [ {
@ -288,7 +274,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "comment",
merge : true,
regex : '.+'
} ],
"qcomment3": [ {
@ -297,7 +282,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "comment",
merge : true,
regex : '.+'
} ],
"qcomment4": [ {
@ -306,7 +290,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "comment",
merge : true,
regex : '.+'
} ],
"qcomment5": [ {
@ -328,7 +311,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "comment",
merge : true,
regex : '.+'
} ],
@ -338,7 +320,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
} ],
"qstring1": [ {
@ -347,7 +328,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
} ],
"qstring2": [ {
@ -356,7 +336,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
} ],
"qstring3": [ {
@ -365,7 +344,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
} ],
"qstring4": [ {
@ -374,7 +352,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
} ],
"qstring5": [ {
@ -396,7 +373,6 @@ var LuaHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
} ]

View file

@ -41,7 +41,6 @@ var ObjectiveCHighlightRules = function() {
DocCommentHighlightRules.getStartRule("doc-start"),
{
token : "comment", // multi line comment
merge : true,
regex : "\\/\\*",
next : "comment"
},
@ -299,7 +298,6 @@ var ObjectiveCHighlightRules = function() {
next : "start"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],

View file

@ -257,7 +257,6 @@ var OcamlHighlightRules = function() {
},
{
token : "comment",
merge : true,
regex : '\\(\\*.*',
next : "comment"
},
@ -271,7 +270,6 @@ var OcamlHighlightRules = function() {
},
{
token : "string", // " string
merge : true,
regex : '"',
next : "qstring"
},
@ -316,7 +314,6 @@ var OcamlHighlightRules = function() {
},
{
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],
@ -328,7 +325,6 @@ var OcamlHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
}
]

View file

@ -90,7 +90,6 @@ var PerlHighlightRules = function() {
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "string", // multi line string start
merge : true,
regex : '["].*\\\\$',
next : "qqstring"
}, {
@ -98,7 +97,6 @@ var PerlHighlightRules = function() {
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, {
token : "string", // multi line string start
merge : true,
regex : "['].*\\\\$",
next : "qstring"
}, {
@ -131,7 +129,6 @@ var PerlHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
}
],
@ -142,7 +139,6 @@ var PerlHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
}
]

View file

@ -449,7 +449,6 @@ var PgsqlHighlightRules = function() {
DocCommentHighlightRules.getStartRule("doc-start"),
{
token : "comment", // multi-line comment
merge : true,
regex : "\\/\\*",
next : "comment"
},{
@ -468,7 +467,6 @@ var PgsqlHighlightRules = function() {
regex : "--.*$"
}, {
token : "comment", // multi-line comment
merge : true,
regex : "\\/\\*",
next : "commentStatement"
}, {
@ -500,7 +498,6 @@ var PgsqlHighlightRules = function() {
regex : "--.*$"
}, {
token : "comment", // multi-line comment
merge : true,
regex : "\\/\\*",
next : "commentDollarSql"
}, {
@ -521,7 +518,6 @@ var PgsqlHighlightRules = function() {
next : "start"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],
@ -533,7 +529,6 @@ var PgsqlHighlightRules = function() {
next : "statement"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],
@ -545,7 +540,6 @@ var PgsqlHighlightRules = function() {
next : "dollarSql"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],
@ -557,7 +551,6 @@ var PgsqlHighlightRules = function() {
next : "statement"
}, {
token : "string", // dollarstring spanning whole line
merge : true,
regex : ".+"
}
],
@ -569,7 +562,6 @@ var PgsqlHighlightRules = function() {
next : "dollarSql"
}, {
token : "string", // dollarstring spanning whole line
merge : true,
regex : ".+"
}
]

View file

@ -127,15 +127,12 @@ var PowershellHighlightRules = function() {
next : "start"
}, {
token : "doc.comment.tag",
merge : true,
regex : "^\\.\\w+"
}, {
token : "comment",
merge : true,
regex : "\\w+"
}, {
token : "comment",
merge : true,
regex : "."
}
]

View file

@ -93,7 +93,6 @@ var PythonHighlightRules = function() {
regex : strPre + '"{3}(?:[^\\\\]|\\\\.)*?"{3}'
}, {
token : "string", // multi line """ string start
merge : true,
regex : strPre + '"{3}.*$',
next : "qqstring"
}, {
@ -104,7 +103,6 @@ var PythonHighlightRules = function() {
regex : strPre + "'{3}(?:[^\\\\]|\\\\.)*?'{3}"
}, {
token : "string", // multi line ''' string start
merge : true,
regex : strPre + "'{3}.*$",
next : "qstring"
}, {
@ -144,7 +142,6 @@ var PythonHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
} ],
"qstring" : [ {
@ -153,7 +150,6 @@ var PythonHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
} ]
};

View file

@ -134,7 +134,6 @@ var RubyHighlightRules = function() {
regex : "#.*$"
}, {
token : "comment", // multi line comment
merge : true,
regex : "^=begin\\s",
next : "comment"
}, {
@ -193,7 +192,6 @@ var RubyHighlightRules = function() {
next : "start"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
]

View file

@ -55,7 +55,6 @@ var scadHighlightRules = function() {
DocCommentHighlightRules.getStartRule("start"),
{
token : "comment", // multi line comment
merge : true,
regex : "\\/\\*",
next : "comment"
}, {
@ -108,7 +107,6 @@ var scadHighlightRules = function() {
next : "start"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],
@ -119,7 +117,6 @@ var scadHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
}
],
@ -130,7 +127,6 @@ var scadHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
}
]

View file

@ -67,7 +67,6 @@ var ScalaHighlightRules = function() {
DocCommentHighlightRules.getStartRule("doc-start"),
{
token : "comment", // multi line comment
merge : true,
regex : "\\/\\*",
next : "comment"
}, {
@ -119,7 +118,6 @@ var ScalaHighlightRules = function() {
next : "start"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],
@ -129,7 +127,6 @@ var ScalaHighlightRules = function() {
regex : '\\\\"'
}, {
token : "string",
merge : true,
regex : '"',
next : "start"
}, {
@ -138,8 +135,7 @@ var ScalaHighlightRules = function() {
next : "start"
}, {
token : "string",
regex : '[^"\\\\]+',
merge : true
regex : '[^"\\\\]+'
}
],
"tstring" : [
@ -149,7 +145,6 @@ var ScalaHighlightRules = function() {
next : "start"
}, {
token : "string", // comment spanning whole line
merge : true,
regex : ".+?"
}
]

View file

@ -176,7 +176,6 @@ var ScssHighlightRules = function() {
},
{
token : "comment", // multi line comment
merge : true,
regex : "\\/\\*",
next : "comment"
}, {
@ -184,7 +183,6 @@ var ScssHighlightRules = function() {
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "string", // multi line string start
merge : true,
regex : '["].*\\\\$',
next : "qqstring"
}, {
@ -192,7 +190,6 @@ var ScssHighlightRules = function() {
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, {
token : "string", // multi line string start
merge : true,
regex : "['].*\\\\$",
next : "qstring"
}, {
@ -261,7 +258,6 @@ var ScssHighlightRules = function() {
next : "start"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],
@ -272,7 +268,6 @@ var ScssHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
}
],
@ -283,7 +278,6 @@ var ScssHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
}
]

View file

@ -29,7 +29,6 @@ var StylusHighlightRules = function() {
},
{
token : "comment", // multi line comment
merge : true,
regex : /\/\*/,
next : "comment"
},
@ -118,50 +117,42 @@ var StylusHighlightRules = function() {
{
token : "comment", // closing comment
regex : ".*?\\*\\/",
merge : true,
next : "start"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],
"qqstring" : [
{
token : "string",
regex : '[^"\\\\]+',
merge : true
regex : '[^"\\\\]+'
},
{
token : "string",
regex : "\\\\$",
next : "qqstring",
merge : true
next : "qqstring"
},
{
token : "string",
regex : '"|$',
next : "start",
merge : true
next : "start"
}
],
"qstring" : [
{
token : "string",
regex : "[^'\\\\]+",
merge : true
regex : "[^'\\\\]+"
},
{
token : "string",
regex : "\\\\$",
next : "qstring",
merge : true
next : "qstring"
},
{
token : "string",
regex : "'|$",
next : "start",
merge : true
next : "start"
}
]
}

View file

@ -42,7 +42,6 @@ var TclHighlightRules = function() {
"start" : [
{
token : "comment",
merge : true,
regex : "#.*\\\\$",
next : "commentfollow"
}, {
@ -64,12 +63,10 @@ var TclHighlightRules = function() {
regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "string", // multi line """ string start
merge : true,
regex : '[ ]*["]',
next : "qqstring"
}, {
token : "variable.instancce", // variable xotcl with braces
merge : true,
regex : "[$]",
next : "variable"
}, {
@ -96,7 +93,6 @@ var TclHighlightRules = function() {
"commandItem" : [
{
token : "comment",
merge : true,
regex : "#.*\\\\$",
next : "commentfollow"
}, {
@ -108,7 +104,6 @@ var TclHighlightRules = function() {
regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "variable.instancce", // variable xotcl with braces
merge : true,
regex : "[$]",
next : "variable"
}, {
@ -138,7 +133,6 @@ var TclHighlightRules = function() {
next : "commentfollow"
}, {
token : "comment",
merge : true,
regex : '.+',
next : "start"
} ],
@ -168,7 +162,6 @@ var TclHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
} ]
};

View file

@ -40,7 +40,7 @@ var XmlHighlightRules = function() {
start : [
{token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{token : "xml-pe", regex : "<\\?.*?\\?>"},
{token : "comment", regex : "<\\!--", next : "comment", merge : true},
{token : "comment", regex : "<\\!--", next : "comment"},
{token : "xml-pe", regex : "<\\!.*?>"},
{token : "meta.tag", regex : "<\\/?", next : "tag"},
{token : "text", regex : "\\s+"},
@ -59,7 +59,7 @@ var XmlHighlightRules = function() {
comment : [
{token : "comment", regex : ".*?-->", next : "start"},
{token : "comment", merge : true, regex : ".+"}
{token : "comment", regex : ".+"}
]
};

View file

@ -50,7 +50,7 @@ function multiLineString(quote, state) {
token : "constant.language.escape",
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
},
{token : "string", merge : true, regex : '\\w+|.|\\s+'}
{token : "string", regex : '\\w+|.|\\s+'}
];
}
@ -67,7 +67,6 @@ exports.tag = function(states, name, nextState, tagMap) {
else
return "meta.tag.tag-name";
},
merge : true,
regex : "[-_a-zA-Z0-9:]+",
next : name + "_embed_attribute_list"
}, {
@ -80,9 +79,8 @@ exports.tag = function(states, name, nextState, tagMap) {
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",
token : "meta.tag.r",
regex : "/?>",
next : nextState
}, {
token : "keyword.operator",

View file

@ -72,7 +72,6 @@ var YamlHighlightRules = function() {
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "string", // multi line string start
merge : true,
regex : '[\\|>]\\w*',
next : "qqstring"
}, {
@ -111,7 +110,6 @@ var YamlHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
}
]};

View file

@ -159,7 +159,7 @@ var Tokenizer = function(rules, flag) {
if (!value[i])
continue;
if ((!rule || rule.merge || type[i] === "text") && token.type === type[i]) {
if ((!rule || rule.merge !== false) && token.type === type[i]) {
token.value += value[i];
} else {
if (token.type)