Update CodeMirror to 5.13.5

This commit is contained in:
Cheng-Han, Wu 2016-04-20 18:11:40 +08:00
parent edc3a31dfd
commit 8bf516263c
84 changed files with 2837 additions and 504 deletions

View file

@ -42,42 +42,34 @@ CodeMirror.defineMode("tcl", function() {
var beforeParams = state.beforeParams;
state.beforeParams = false;
var ch = stream.next();
if ((ch == '"' || ch == "'") && state.inParams)
if ((ch == '"' || ch == "'") && state.inParams) {
return chain(stream, state, tokenString(ch));
else if (/[\[\]{}\(\),;\.]/.test(ch)) {
} else if (/[\[\]{}\(\),;\.]/.test(ch)) {
if (ch == "(" && beforeParams) state.inParams = true;
else if (ch == ")") state.inParams = false;
return null;
}
else if (/\d/.test(ch)) {
} else if (/\d/.test(ch)) {
stream.eatWhile(/[\w\.]/);
return "number";
}
else if (ch == "#" && stream.eat("*")) {
return chain(stream, state, tokenComment);
}
else if (ch == "#" && stream.match(/ *\[ *\[/)) {
return chain(stream, state, tokenUnparsed);
}
else if (ch == "#" && stream.eat("#")) {
} else if (ch == "#") {
if (stream.eat("*"))
return chain(stream, state, tokenComment);
if (ch == "#" && stream.match(/ *\[ *\[/))
return chain(stream, state, tokenUnparsed);
stream.skipToEnd();
return "comment";
}
else if (ch == '"') {
} else if (ch == '"') {
stream.skipTo(/"/);
return "comment";
}
else if (ch == "$") {
} else if (ch == "$") {
stream.eatWhile(/[$_a-z0-9A-Z\.{:]/);
stream.eatWhile(/}/);
state.beforeParams = true;
return "builtin";
}
else if (isOperatorChar.test(ch)) {
} else if (isOperatorChar.test(ch)) {
stream.eatWhile(isOperatorChar);
return "comment";
}
else {
} else {
stream.eatWhile(/[\w\$_{}\xa1-\uffff]/);
var word = stream.current().toLowerCase();
if (keywords && keywords.propertyIsEnumerable(word))