use 'defaultToken' for comment/qqstring/qstring in lean-mode

Suggested by @nightwing
This commit is contained in:
Soonho Kong 2015-02-24 11:02:06 -05:00
commit 9654382294

View file

@ -151,36 +151,12 @@ var leanHighlightRules = function() {
regex : "\\s+" regex : "\\s+"
} }
], ],
"comment" : [ "comment" : [ {token: "comment", regex: "-/", next: "start"},
{ {defaultToken: "comment"} ],
token : "comment", // closing comment "qqstring" : [ {token : "string", regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next : "start" },
regex : ".*?-\\/", {defaultToken: "qqstring"} ],
next : "start" "qstring" : [ {token : "string", regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next : "start" },
}, { {defaultToken: "qstring"} ],
token : "comment", // comment spanning whole line
regex : ".+"
}
],
"qqstring" : [
{
token : "string",
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
next : "start"
}, {
token : "string",
regex : '.+'
}
],
"qstring" : [
{
token : "string",
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
next : "start"
}, {
token : "string",
regex : '.+'
}
],
"directive" : [ "directive" : [
{ {
token : "constant.other.multiline", token : "constant.other.multiline",