diff options
author | Cheng-Han, Wu | 2016-04-20 18:11:40 +0800 |
---|---|---|
committer | Cheng-Han, Wu | 2016-04-20 18:11:40 +0800 |
commit | 8bf516263c6582771e7576e8484ca8cfaa8cb9cb (patch) | |
tree | aba81172f554a50466a762db99f25e3650d7ff45 /public/vendor/codemirror/mode/tcl | |
parent | edc3a31dfdb03e910d7355144280e281eeb582d5 (diff) |
Update CodeMirror to 5.13.5
Diffstat (limited to 'public/vendor/codemirror/mode/tcl')
-rw-r--r-- | public/vendor/codemirror/mode/tcl/tcl.js | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/public/vendor/codemirror/mode/tcl/tcl.js b/public/vendor/codemirror/mode/tcl/tcl.js index 056accb2..8c76d52c 100644 --- a/public/vendor/codemirror/mode/tcl/tcl.js +++ b/public/vendor/codemirror/mode/tcl/tcl.js @@ -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)) |