(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="839a2734-1783-41a6-9d84-0e4b1bf2eb66",e._sentryDebugIdIdentifier="sentry-dbid-839a2734-1783-41a6-9d84-0e4b1bf2eb66")}catch{}})();var o=/[+\-\/\\*~<>=@%|&?!.,:;^]/,h=/true|false|nil|self|super|thisContext/,r=function(e,n){this.next=e,this.parent=n},l=function(e,n,t){this.name=e,this.context=n,this.eos=t},d=function(){this.context=new r(c,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};d.prototype.userIndent=function(e,n){this.userIndentationDelta=e>0?e/n-this.indentation:0};var c=function(e,n,t){var i=new l(null,n,!1),a=e.next();return a==='"'?i=u(e,new r(u,n)):a==="'"?i=s(e,new r(s,n)):a==="#"?e.peek()==="'"?(e.next(),i=f(e,new r(f,n))):e.eatWhile(/[^\s.{}\[\]()]/)?i.name="string.special":i.name="meta":a==="$"?(e.next()==="<"&&(e.eatWhile(/[^\s>]/),e.next()),i.name="string.special"):a==="|"&&t.expectVariable?i.context=new r(p,n):/[\[\]{}()]/.test(a)?(i.name="bracket",i.eos=/[\[{(]/.test(a),a==="["?t.indentation++:a==="]"&&(t.indentation=Math.max(0,t.indentation-1))):o.test(a)?(e.eatWhile(o),i.name="operator",i.eos=a!==";"):/\d/.test(a)?(e.eatWhile(/[\w\d]/),i.name="number"):/[\w_]/.test(a)?(e.eatWhile(/[\w\d_]/),i.name=t.expectVariable?h.test(e.current())?"keyword":"variable":null):i.eos=t.expectVariable,i},u=function(e,n){return e.eatWhile(/[^"]/),new l("comment",e.eat('"')?n.parent:n,!0)},s=function(e,n){return e.eatWhile(/[^']/),new l("string",e.eat("'")?n.parent:n,!1)},f=function(e,n){return e.eatWhile(/[^']/),new l("string.special",e.eat("'")?n.parent:n,!1)},p=function(e,n){var t=new l(null,n,!1),i=e.next();return i==="|"?(t.context=n.parent,t.eos=!0):(e.eatWhile(/[^|]/),t.name="variable"),t};const b={name:"smalltalk",startState:function(){return new d},token:function(e,n){if(n.userIndent(e.indentation(),e.indentUnit),e.eatSpace())return null;var t=n.context.next(e,n.context,n);return n.context=t.context,n.expectVariable=t.eos,t.name},blankLine:function(e,n){e.userIndent(0,n)},indent:function(e,n,t){var i=e.context.next===c&&n&&n.charAt(0)==="]"?-1:e.userIndentationDelta;return(e.indentation+i)*t.unit},languageData:{indentOnInput:/^\s*\]$/}};export{b as smalltalk};
//# sourceMappingURL=smalltalk-C9pMg6PF.js.map
