1(function(a){if(typeof exports=="object"&&typeof module=="object")a(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],a);else a(CodeMirror)})(function(a){"use strict";a.defineMode("smalltalk",function(a){var b=/[+\-\/\\*~<>=@%|&?!.,:;^]/;var c=/true|false|nil|self|super|thisContext/;var d=function(a,b){this.next=a;this.parent=b};var e=function(a,b,c){this.name=a;this.context=b;this.eos=c};var f=function(){this.context=new d(g,null);this.expectVariable=true;this.indentation=0;this.userIndentationDelta=0};f.prototype.userIndent=function(b){this.userIndentationDelta=b>0?b/a.indentUnit-this.indentation:0};var g=function(a,f,g){var l=new e(null,f,false);var m=a.next();if(m==='"'){l=h(a,new d(h,f))}else if(m==="'"){l=i(a,new d(i,f))}else if(m==="#"){if(a.peek()==="'"){a.next();l=j(a,new d(j,f))}else{if(a.eatWhile(/[^\s.{}\[\]()]/))l.name="string-2";else l.name="meta"}}else if(m==="$"){if(a.next()==="<"){a.eatWhile(/[^\s>]/);a.next()}l.name="string-2"}else if(m==="|"&&g.expectVariable){l.context=new d(k,f)}else if(/[\[\]{}()]/.test(m)){l.name="bracket";l.eos=/[\[{(]/.test(m);if(m==="["){g.indentation++}else if(m==="]"){g.indentation=Math.max(0,g.indentation-1)}}else if(b.test(m)){a.eatWhile(b);l.name="operator";l.eos=m!==";"}else if(/\d/.test(m)){a.eatWhile(/[\w\d]/);l.name="number"}else if(/[\w_]/.test(m)){a.eatWhile(/[\w\d_]/);l.name=g.expectVariable?c.test(a.current())?"keyword":"variable":null}else{l.eos=g.expectVariable}return l};var h=function(a,b){a.eatWhile(/[^"]/);return new e("comment",a.eat('"')?b.parent:b,true)};var i=function(a,b){a.eatWhile(/[^']/);return new e("string",a.eat("'")?b.parent:b,false)};var j=function(a,b){a.eatWhile(/[^']/);return new e("string-2",a.eat("'")?b.parent:b,false)};var k=function(a,b){var c=new e(null,b,false);var d=a.next();if(d==="|"){c.context=b.parent;c.eos=true}else{a.eatWhile(/[^|]/);c.name="variable"}return c};return{startState:function(){return new f},token:function(a,b){b.userIndent(a.indentation());if(a.eatSpace()){return null}var c=b.context.next(a,b.context,b);b.context=c.context;b.expectVariable=c.eos;return c.name},blankLine:function(a){a.userIndent(0)},indent:function(b,c){var d=b.context.next===g&&c&&c.charAt(0)==="]"?-1:b.userIndentationDelta;return(b.indentation+d)*a.indentUnit},electricChars:"]"}});a.defineMIME("text/x-stsrc",{name:"smalltalk"})});
2//# sourceMappingURL=smalltalk.min.js.map