aboutsummaryrefslogtreecommitdiff
path: root/imports/codemirror/mode/smalltalk
diff options
context:
space:
mode:
Diffstat (limited to 'imports/codemirror/mode/smalltalk')
-rw-r--r--[-rwxr-xr-x]imports/codemirror/mode/smalltalk/index.html0
-rw-r--r--[-rwxr-xr-x]imports/codemirror/mode/smalltalk/smalltalk.js32
2 files changed, 16 insertions, 16 deletions
diff --git a/imports/codemirror/mode/smalltalk/index.html b/imports/codemirror/mode/smalltalk/index.html
index 8a85c39e..8a85c39e 100755..100644
--- a/imports/codemirror/mode/smalltalk/index.html
+++ b/imports/codemirror/mode/smalltalk/index.html
diff --git a/imports/codemirror/mode/smalltalk/smalltalk.js b/imports/codemirror/mode/smalltalk/smalltalk.js
index e002e666..e5893322 100755..100644
--- a/imports/codemirror/mode/smalltalk/smalltalk.js
+++ b/imports/codemirror/mode/smalltalk/smalltalk.js
@@ -27,45 +27,45 @@ CodeMirror.defineMode('smalltalk', function(config, modeConfig) {
27 27
28 var next = function(stream, context, state) { 28 var next = function(stream, context, state) {
29 var token = new Token(null, context, false); 29 var token = new Token(null, context, false);
30 var char = stream.next(); 30 var aChar = stream.next();
31 31
32 if (char === '"') { 32 if (aChar === '"') {
33 token = nextComment(stream, new Context(nextComment, context)); 33 token = nextComment(stream, new Context(nextComment, context));
34 34
35 } else if (char === '\'') { 35 } else if (aChar === '\'') {
36 token = nextString(stream, new Context(nextString, context)); 36 token = nextString(stream, new Context(nextString, context));
37 37
38 } else if (char === '#') { 38 } else if (aChar === '#') {
39 stream.eatWhile(/[^ .]/); 39 stream.eatWhile(/[^ .]/);
40 token.name = 'string-2'; 40 token.name = 'string-2';
41 41
42 } else if (char === '$') { 42 } else if (aChar === '$') {
43 stream.eatWhile(/[^ ]/); 43 stream.eatWhile(/[^ ]/);
44 token.name = 'string-2'; 44 token.name = 'string-2';
45 45
46 } else if (char === '|' && state.expectVariable) { 46 } else if (aChar === '|' && state.expectVariable) {
47 token.context = new Context(nextTemporaries, context); 47 token.context = new Context(nextTemporaries, context);
48 48
49 } else if (/[\[\]{}()]/.test(char)) { 49 } else if (/[\[\]{}()]/.test(aChar)) {
50 token.name = 'bracket'; 50 token.name = 'bracket';
51 token.eos = /[\[{(]/.test(char); 51 token.eos = /[\[{(]/.test(aChar);
52 52
53 if (char === '[') { 53 if (aChar === '[') {
54 state.indentation++; 54 state.indentation++;
55 } else if (char === ']') { 55 } else if (aChar === ']') {
56 state.indentation = Math.max(0, state.indentation - 1); 56 state.indentation = Math.max(0, state.indentation - 1);
57 } 57 }
58 58
59 } else if (specialChars.test(char)) { 59 } else if (specialChars.test(aChar)) {
60 stream.eatWhile(specialChars); 60 stream.eatWhile(specialChars);
61 token.name = 'operator'; 61 token.name = 'operator';
62 token.eos = char !== ';'; // ; cascaded message expression 62 token.eos = aChar !== ';'; // ; cascaded message expression
63 63
64 } else if (/\d/.test(char)) { 64 } else if (/\d/.test(aChar)) {
65 stream.eatWhile(/[\w\d]/); 65 stream.eatWhile(/[\w\d]/);
66 token.name = 'number' 66 token.name = 'number'
67 67
68 } else if (/[\w_]/.test(char)) { 68 } else if (/[\w_]/.test(aChar)) {
69 stream.eatWhile(/[\w\d_]/); 69 stream.eatWhile(/[\w\d_]/);
70 token.name = state.expectVariable ? (keywords.test(stream.current()) ? 'keyword' : 'variable') : null; 70 token.name = state.expectVariable ? (keywords.test(stream.current()) ? 'keyword' : 'variable') : null;
71 71
@@ -88,9 +88,9 @@ CodeMirror.defineMode('smalltalk', function(config, modeConfig) {
88 88
89 var nextTemporaries = function(stream, context, state) { 89 var nextTemporaries = function(stream, context, state) {
90 var token = new Token(null, context, false); 90 var token = new Token(null, context, false);
91 var char = stream.next(); 91 var aChar = stream.next();
92 92
93 if (char === '|') { 93 if (aChar === '|') {
94 token.context = context.parent; 94 token.context = context.parent;
95 token.eos = true; 95 token.eos = true;
96 96