don't merge tokens (Includes coding style cleanups)

fix #355
This commit is contained in:
Fabian Jakobs 2011-08-01 15:01:50 +02:00
commit 1c5fb5b75a
28 changed files with 835 additions and 883 deletions

View file

@ -80,6 +80,7 @@ var JavaScriptHighlightRules = function() {
new DocCommentHighlightRules().getStartRule("doc-start"),
{
token : "comment", // multi line comment
merge : true,
regex : "\\/\\*",
next : "comment"
}, {
@ -87,6 +88,7 @@ var JavaScriptHighlightRules = function() {
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "string", // multi line string start
merge : true,
regex : '["].*\\\\$',
next : "qqstring"
}, {
@ -94,6 +96,7 @@ var JavaScriptHighlightRules = function() {
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, {
token : "string", // multi line string start
merge : true,
regex : "['].*\\\\$",
next : "qstring"
}, {
@ -157,7 +160,7 @@ var JavaScriptHighlightRules = function() {
token : "text",
regex : "\\s+"
}, {
// immediately return to the start mode without mathcing
// immediately return to the start mode without matching
// anything
token: "empty",
regex: "",
@ -171,6 +174,7 @@ var JavaScriptHighlightRules = function() {
next : "start"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],
@ -181,6 +185,7 @@ var JavaScriptHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
}
],
@ -191,6 +196,7 @@ var JavaScriptHighlightRules = function() {
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
}
]