var a=/^-+$/,n=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)  ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,e=/^[\w+.-]+@[\w.-]+/;const c={name:"rpmchanges",token:function(r){return r.sol()&&(r.match(a)||r.match(n))?"tag":r.match(e)?"string":(r.next(),null)}};var o=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,i=/^[a-zA-Z0-9()]+:/,p=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,l=/^%(ifnarch|ifarch|if)/,s=/^%(else|endif)/,m=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;const u={name:"rpmspec",startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(r,t){if(r.peek()=="#")return r.skipToEnd(),"comment";if(r.sol()){if(r.match(i))return"header";if(r.match(p))return"atom"}if(r.match(/^\$\w+/)||r.match(/^\$\{\w+\}/))return"def";if(r.match(s))return"keyword";if(r.match(l))return t.controlFlow=!0,"keyword";if(t.controlFlow){if(r.match(m))return"operator";if(r.match(/^(\d+)/))return"number";r.eol()&&(t.controlFlow=!1)}if(r.match(o))return r.eol()&&(t.controlFlow=!1),"number";if(r.match(/^%[\w]+/))return r.match("(")&&(t.macroParameters=!0),"keyword";if(t.macroParameters){if(r.match(/^\d+/))return"number";if(r.match(")"))return t.macroParameters=!1,"keyword"}return r.match(/^%\{\??[\w \-\:\!]+\}/)?(r.eol()&&(t.controlFlow=!1),"def"):(r.next(),null)}};export{u as n,c as t};
