some tokenizer fixes. fix #435
This commit is contained in:
parent
3ca1d6e8ae
commit
0b25b7593f
4 changed files with 6 additions and 9 deletions
|
|
@ -122,8 +122,7 @@ var c_cppHighlightRules = function() {
|
||||||
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
|
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
|
||||||
}, {
|
}, {
|
||||||
token : "punctuation.operator",
|
token : "punctuation.operator",
|
||||||
regex : "\\?|\\:|\\,|\\;|\\.",
|
regex : "\\?|\\:|\\,|\\;|\\."
|
||||||
next : "regex_allowed"
|
|
||||||
}, {
|
}, {
|
||||||
token : "paren.lparen",
|
token : "paren.lparen",
|
||||||
regex : "[[({]"
|
regex : "[[({]"
|
||||||
|
|
|
||||||
|
|
@ -149,8 +149,7 @@ define(function(require, exports, module) {
|
||||||
regex : "#.*"
|
regex : "#.*"
|
||||||
}, {
|
}, {
|
||||||
token : "punctuation.operator",
|
token : "punctuation.operator",
|
||||||
regex : "\\?|\\:|\\,|\\.",
|
regex : "\\?|\\:|\\,|\\."
|
||||||
next : "regex_allowed"
|
|
||||||
}, {
|
}, {
|
||||||
token : "paren.lparen",
|
token : "paren.lparen",
|
||||||
regex : "[({[]"
|
regex : "[({[]"
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,7 @@ var CSharpHighlightRules = function() {
|
||||||
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||||
}, {
|
}, {
|
||||||
token : "punctuation.operator",
|
token : "punctuation.operator",
|
||||||
regex : "\\?|\\:|\\,|\\;|\\.",
|
regex : "\\?|\\:|\\,|\\;|\\."
|
||||||
next : "regex_allowed"
|
|
||||||
}, {
|
}, {
|
||||||
token : "paren.lparen",
|
token : "paren.lparen",
|
||||||
regex : "[[({]"
|
regex : "[[({]"
|
||||||
|
|
|
||||||
|
|
@ -86,17 +86,17 @@ var HtmlHighlightRules = function() {
|
||||||
}, {
|
}, {
|
||||||
token : "meta.tag",
|
token : "meta.tag",
|
||||||
regex : "[-_a-zA-Z0-9:]+",
|
regex : "[-_a-zA-Z0-9:]+",
|
||||||
next : name + "-attribute-list"
|
next : name + "embed-attribute-list"
|
||||||
}, {
|
}, {
|
||||||
token: "empty",
|
token: "empty",
|
||||||
regex: "",
|
regex: "",
|
||||||
next : name + "-attribute-list"
|
next : name + "embed-attribute-list"
|
||||||
}];
|
}];
|
||||||
|
|
||||||
states[name + "-qstring"] = multiLineString("'", name);
|
states[name + "-qstring"] = multiLineString("'", name);
|
||||||
states[name + "-qqstring"] = multiLineString("\"", name);
|
states[name + "-qqstring"] = multiLineString("\"", name);
|
||||||
|
|
||||||
states[name + "-attribute-list"] = [{
|
states[name + "embed-attribute-list"] = [{
|
||||||
token : "text",
|
token : "text",
|
||||||
regex : ">",
|
regex : ">",
|
||||||
next : nextState
|
next : nextState
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue