Liferay.Loader.define("journal-web$codemirror@5.65.2/mode/smalltalk/smalltalk",["module","exports","require","../../lib/codemirror"],(function(e,t,n){var i,a=void 0;window;i=function(e){"use strict";e.defineMode("smalltalk",(function(e){var t=/[+\-\/\\*~<>=@%|&?!.,:;^]/,n=/true|false|nil|self|super|thisContext/,Context=function(e,t){this.next=e,this.parent=t},Token=function(e,t,n){this.name=e,this.context=t,this.eos=n},State=function(){this.context=new Context(next,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};State.prototype.userIndent=function(t){this.userIndentationDelta=t>0?t/e.indentUnit-this.indentation:0};var next=function(e,i,a){var r=new Token(null,i,!1),o=e.next();return'"'===o?r=nextComment(e,new Context(nextComment,i)):"'"===o?r=nextString(e,new Context(nextString,i)):"#"===o?"'"===e.peek()?(e.next(),r=nextSymbol(e,new Context(nextSymbol,i))):e.eatWhile(/[^\s.{}\[\]()]/)?r.name="string-2":r.name="meta":"$"===o?("<"===e.next()&&(e.eatWhile(/[^\s>]/),e.next()),r.name="string-2"):"|"===o&&a.expectVariable?r.context=new Context(nextTemporaries,i):/[\[\]{}()]/.test(o)?(r.name="bracket",r.eos=/[\[{(]/.test(o),"["===o?a.indentation++:"]"===o&&(a.indentation=Math.max(0,a.indentation-1))):t.test(o)?(e.eatWhile(t),r.name="operator",r.eos=";"!==o):/\d/.test(o)?(e.eatWhile(/[\w\d]/),r.name="number"):/[\w_]/.test(o)?(e.eatWhile(/[\w\d_]/),r.name=a.expectVariable?n.test(e.current())?"keyword":"variable":null):r.eos=a.expectVariable,r},nextComment=function(e,t){return e.eatWhile(/[^"]/),new Token("comment",e.eat('"')?t.parent:t,!0)},nextString=function(e,t){return e.eatWhile(/[^']/),new Token("string",e.eat("'")?t.parent:t,!1)},nextSymbol=function(e,t){return e.eatWhile(/[^']/),new Token("string-2",e.eat("'")?t.parent:t,!1)},nextTemporaries=function(e,t){var n=new Token(null,t,!1);return"|"===e.next()?(n.context=t.parent,n.eos=!0):(e.eatWhile(/[^|]/),n.name="variable"),n};return{startState:function(){return new State},token:function(e,t){if(t.userIndent(e.indentation()),e.eatSpace())return null;var n=t.context.next(e,t.context,t);return t.context=n.context,t.expectVariable=n.eos,n.name},blankLine:function(e){e.userIndent(0)},indent:function(t,n){var i=t.context.next===next&&n&&"]"===n.charAt(0)?-1:t.userIndentationDelta;return(t.indentation+i)*e.indentUnit},electricChars:"]"}})),e.defineMIME("text/x-stsrc",{name:"smalltalk"})},"object"==typeof t&&"object"==typeof e?i(n("../../lib/codemirror")):"function"==typeof a&&a.amd?a(["../../lib/codemirror"],i):i(CodeMirror)}));
//# sourceMappingURL=smalltalk.js.map