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+"
}
],
"comment" : [
{
token : "comment", // closing comment
regex : ".*?-\\/",
next : "start"
}, {
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 : '.+'
}
],
"comment" : [ {token: "comment", regex: "-/", next: "start"},
{defaultToken: "comment"} ],
"qqstring" : [ {token : "string", regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next : "start" },
{defaultToken: "qqstring"} ],
"qstring" : [ {token : "string", regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next : "start" },
{defaultToken: "qstring"} ],
"directive" : [
{
token : "constant.other.multiline",