UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines 3.47 kB
import{n as e}from"./rolldown-runtime-DkW27tQK.js";function t(e){for(var t={},n=e.split(`,`),r=0;r<n.length;++r){var i=n[r].toUpperCase(),a=n[r].charAt(0).toUpperCase()+n[r].slice(1);t[n[r]]=!0,t[i]=!0,t[a]=!0}return t}function n(e){return e.eatWhile(/[\w\$_]/),`meta`}function r(e,t){var n=e.next();if(u[n]){var r=u[n](e,t);if(r!==!1)return r}if(n==`"`)return t.tokenize=a(n),t.tokenize(e,t);if(n==`'`)return t.tokenize=i(n),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return h=n,null;if(/[\d']/.test(n))return e.eatWhile(/[\w\.']/),`number`;if(n==`-`&&e.eat(`-`))return e.skipToEnd(),`comment`;if(m.test(n))return e.eatWhile(m),`operator`;e.eatWhile(/[\w\$_]/);var o=e.current();return f.propertyIsEnumerable(o.toLowerCase())?(p.propertyIsEnumerable(o)&&(h=`newstatement`),`keyword`):l.propertyIsEnumerable(o)?`atom`:`variable`}function i(e){return function(t,n){for(var i=!1,a,o=!1;(a=t.next())!=null;){if(a==e&&!i){o=!0;break}i=!i&&a==`--`}return(o||!(i||d))&&(n.tokenize=r),`string`}}function a(e){return function(t,n){for(var i=!1,a,o=!1;(a=t.next())!=null;){if(a==e&&!i){o=!0;break}i=!i&&a==`--`}return(o||!(i||d))&&(n.tokenize=r),`string.special`}}function o(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function s(e,t,n){return e.context=new o(e.indented,t,n,null,e.context)}function c(e){var t=e.context.type;return(t==`)`||t==`]`||t==`}`)&&(e.indented=e.context.indented),e.context=e.context.prev}var l,u,d,f,p,m,h,g;function _(){return(_=e((()=>{l=t(`null`),u={"`":n,$:n},d=!1,f=t(`abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block,body,buffer,bus,case,component,configuration,constant,disconnect,downto,else,elsif,end,end block,end case,end component,end for,end generate,end if,end loop,end process,end record,end units,entity,exit,file,for,function,generate,generic,generic map,group,guarded,if,impure,in,inertial,inout,is,label,library,linkage,literal,loop,map,mod,nand,new,next,nor,null,of,on,open,or,others,out,package,package body,port,port map,postponed,procedure,process,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal,sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor`),p=t(`architecture,entity,begin,case,port,else,elsif,end,for,function,if`),m=/[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/,g={name:`vhdl`,startState:function(e){return{tokenize:null,context:new o(-e,0,`top`,!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(n.align??(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;h=null;var i=(t.tokenize||r)(e,t);if(i==`comment`||i==`meta`)return i;if(n.align??(n.align=!0),(h==`;`||h==`:`)&&n.type==`statement`)c(t);else if(h==`{`)s(t,e.column(),`}`);else if(h==`[`)s(t,e.column(),`]`);else if(h==`(`)s(t,e.column(),`)`);else if(h==`}`){for(;n.type==`statement`;)n=c(t);for(n.type==`}`&&(n=c(t));n.type==`statement`;)n=c(t)}else h==n.type?c(t):(n.type==`}`||n.type==`top`||n.type==`statement`&&h==`newstatement`)&&s(t,e.column(),`statement`);return t.startOfLine=!1,i},indent:function(e,t,n){if(e.tokenize!=r&&e.tokenize!=null)return 0;var i=t&&t.charAt(0),a=e.context,o=i==a.type;return a.type==`statement`?a.indented+(i==`{`?0:n.unit):a.align?a.column+ +!o:a.indented+(o?0:n.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:`--`}}}})))()}_();export{g as vhdl}; //# sourceMappingURL=vhdl-DlYBPd1w.js.map