From 8bf516263c6582771e7576e8484ca8cfaa8cb9cb Mon Sep 17 00:00:00 2001 From: Cheng-Han, Wu Date: Wed, 20 Apr 2016 18:11:40 +0800 Subject: Update CodeMirror to 5.13.5 --- public/vendor/codemirror/mode/tcl/tcl.js | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'public/vendor/codemirror/mode/tcl/tcl.js') 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)) -- cgit v1.2.3