summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/mode/tcl/tcl.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/vendor/codemirror/mode/tcl/tcl.js')
-rw-r--r--public/vendor/codemirror/mode/tcl/tcl.js32
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))