(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]="bf879888-0ed7-4ab3-a980-4ae8c424c243",e._sentryDebugIdIdentifier="sentry-dbid-bf879888-0ed7-4ab3-a980-4ae8c424c243")}catch{}})();function c(e){for(var n={},t=e.split(","),r=0;r<t.length;++r){var i=t[r].toUpperCase(),l=t[r].charAt(0).toUpperCase()+t[r].slice(1);n[t[r]]=!0,n[i]=!0,n[l]=!0}return n}function d(e){return e.eatWhile(/[\w\$_]/),"meta"}var b=c("null"),s={"`":d,$:d},y=!1,h=c("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"),k=c("architecture,entity,begin,case,port,else,elsif,end,for,function,if"),p=/[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/,o;function f(e,n){var t=e.next();if(s[t]){var r=s[t](e,n);if(r!==!1)return r}if(t=='"')return n.tokenize=v(t),n.tokenize(e,n);if(t=="'")return n.tokenize=w(t),n.tokenize(e,n);if(/[\[\]{}\(\),;\:\.]/.test(t))return o=t,null;if(/[\d']/.test(t))return e.eatWhile(/[\w\.']/),"number";if(t=="-"&&e.eat("-"))return e.skipToEnd(),"comment";if(p.test(t))return e.eatWhile(p),"operator";e.eatWhile(/[\w\$_]/);var i=e.current();return h.propertyIsEnumerable(i.toLowerCase())?(k.propertyIsEnumerable(i)&&(o="newstatement"),"keyword"):b.propertyIsEnumerable(i)?"atom":"variable"}function w(e){return function(n,t){for(var r=!1,i,l=!1;(i=n.next())!=null;){if(i==e&&!r){l=!0;break}r=!r&&i=="--"}return(l||!(r||y))&&(t.tokenize=f),"string"}}function v(e){return function(n,t){for(var r=!1,i,l=!1;(i=n.next())!=null;){if(i==e&&!r){l=!0;break}r=!r&&i=="--"}return(l||!(r||y))&&(t.tokenize=f),"string.special"}}function g(e,n,t,r,i){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=i}function a(e,n,t){return e.context=new g(e.indented,n,t,null,e.context)}function u(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const m={name:"vhdl",startState:function(e){return{tokenize:null,context:new g(-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align==null&&(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;o=null;var r=(n.tokenize||f)(e,n);if(r=="comment"||r=="meta")return r;if(t.align==null&&(t.align=!0),(o==";"||o==":")&&t.type=="statement")u(n);else if(o=="{")a(n,e.column(),"}");else if(o=="[")a(n,e.column(),"]");else if(o=="(")a(n,e.column(),")");else if(o=="}"){for(;t.type=="statement";)t=u(n);for(t.type=="}"&&(t=u(n));t.type=="statement";)t=u(n)}else o==t.type?u(n):(t.type=="}"||t.type=="top"||t.type=="statement"&&o=="newstatement")&&a(n,e.column(),"statement");return n.startOfLine=!1,r},indent:function(e,n,t){if(e.tokenize!=f&&e.tokenize!=null)return 0;var r=n&&n.charAt(0),i=e.context,l=r==i.type;return i.type=="statement"?i.indented+(r=="{"?0:t.unit):i.align?i.column+(l?0:1):i.indented+(l?0:t.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"--"}}};export{m as vhdl};
//# sourceMappingURL=vhdl-iKCzH8Ke.js.map
