function o(n){for(var t={},e=n.split(" "),r=0;r<e.length;++r)t[e[r]]=!0;return t}var l=o("if elsif else stop require"),s=o("true false not");function i(n,t){var e=n.next();if(e=="/"&&n.eat("*"))return t.tokenize=a,a(n,t);if(e==="#")return n.skipToEnd(),"comment";if(e=='"')return t.tokenize=p(e),t.tokenize(n,t);if(e=="(")return t._indent.push("("),t._indent.push("{"),null;if(e==="{")return t._indent.push("{"),null;if(e==")"&&(t._indent.pop(),t._indent.pop()),e==="}")return t._indent.pop(),null;if(e==","||e==";"||/[{}\(\),;]/.test(e))return null;if(/\d/.test(e))return n.eatWhile(/[\d]/),n.eat(/[KkMmGg]/),"number";if(e==":")return n.eatWhile(/[a-zA-Z_]/),n.eatWhile(/[a-zA-Z0-9_]/),"operator";n.eatWhile(/\w/);var r=n.current();return r=="text"&&n.eat(":")?(t.tokenize=f,"string"):l.propertyIsEnumerable(r)?"keyword":s.propertyIsEnumerable(r)?"atom":null}function f(n,t){return t._multiLineString=!0,n.sol()?(n.next()=="."&&n.eol()&&(t._multiLineString=!1,t.tokenize=i),"string"):(n.eatSpace(),n.peek()=="#"?(n.skipToEnd(),"comment"):(n.skipToEnd(),"string"))}function a(n,t){for(var e=!1,r;(r=n.next())!=null;){if(e&&r=="/"){t.tokenize=i;break}e=r=="*"}return"comment"}function p(n){return function(t,e){for(var r=!1,u;(u=t.next())!=null&&!(u==n&&!r);)r=!r&&u=="\\";return r||(e.tokenize=i),"string"}}const c={name:"sieve",startState:function(n){return{tokenize:i,baseIndent:n||0,_indent:[]}},token:function(n,t){return n.eatSpace()?null:(t.tokenize||i)(n,t)},indent:function(n,t,e){var r=n._indent.length;return t&&t[0]=="}"&&r--,r<0&&(r=0),r*e.unit},languageData:{indentOnInput:/^\s*\}$/}};export{c as t};
