openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
2 lines • 2.15 kB
JavaScript
import{n as e}from"./rolldown-runtime-DkW27tQK.js";var t,n,r,i,a,o,s,c,l,u,d;function f(){return(f=e((()=>{t=/[+\-\/\\*~<>=@%|&?!.,:;^]/,n=/true|false|nil|self|super|thisContext/,r=function(e,t){this.next=e,this.parent=t},i=function(e,t,n){this.name=e,this.context=t,this.eos=n},a=function(){this.context=new r(o,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0},a.prototype.userIndent=function(e,t){this.userIndentationDelta=e>0?e/t-this.indentation:0},o=function(e,a,o){var d=new i(null,a,!1),f=e.next();return f===`"`?d=s(e,new r(s,a)):f===`'`?d=c(e,new r(c,a)):f===`#`?e.peek()===`'`?(e.next(),d=l(e,new r(l,a))):e.eatWhile(/[^\s.{}\[\]()]/)?d.name=`string.special`:d.name=`meta`:f===`$`?(e.next()===`<`&&(e.eatWhile(/[^\s>]/),e.next()),d.name=`string.special`):f===`|`&&o.expectVariable?d.context=new r(u,a):/[\[\]{}()]/.test(f)?(d.name=`bracket`,d.eos=/[\[{(]/.test(f),f===`[`?o.indentation++:f===`]`&&(o.indentation=Math.max(0,o.indentation-1))):t.test(f)?(e.eatWhile(t),d.name=`operator`,d.eos=f!==`;`):/\d/.test(f)?(e.eatWhile(/[\w\d]/),d.name=`number`):/[\w_]/.test(f)?(e.eatWhile(/[\w\d_]/),d.name=o.expectVariable?n.test(e.current())?`keyword`:`variable`:null):d.eos=o.expectVariable,d},s=function(e,t){return e.eatWhile(/[^"]/),new i(`comment`,e.eat(`"`)?t.parent:t,!0)},c=function(e,t){return e.eatWhile(/[^']/),new i(`string`,e.eat(`'`)?t.parent:t,!1)},l=function(e,t){return e.eatWhile(/[^']/),new i(`string.special`,e.eat(`'`)?t.parent:t,!1)},u=function(e,t){var n=new i(null,t,!1);return e.next()===`|`?(n.context=t.parent,n.eos=!0):(e.eatWhile(/[^|]/),n.name=`variable`),n},d={name:`smalltalk`,startState:function(){return new a},token:function(e,t){if(t.userIndent(e.indentation(),e.indentUnit),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,t){e.userIndent(0,t)},indent:function(e,t,n){var r=e.context.next===o&&t&&t.charAt(0)===`]`?-1:e.userIndentationDelta;return(e.indentation+r)*n.unit},languageData:{indentOnInput:/^\s*\]$/}}})))()}f();export{d as smalltalk};
//# sourceMappingURL=smalltalk-DCjGbhBh.js.map