var r={},l=/({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/;function s(t,e){for(var i=e.split(" "),a=0;a.*/,!1),o=t.match(/(\s+)?[\w:_]+(\s+)?{/,!1),u=t.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/,!1),n=t.next();if(n==="$")return t.match(l)?e.continueString?"variableName.special":"variable":"error";if(e.continueString)return t.backUp(1),c(t,e);if(e.inDefinition){if(t.match(/(\s+)?[\w:_]+(\s+)?/))return"def";t.match(/\s+{/),e.inDefinition=!1}return e.inInclude?(t.match(/(\s+)?\S+(\s+)?/),e.inInclude=!1,"def"):t.match(/(\s+)?\w+\(/)?(t.backUp(1),"def"):a?(t.match(/(\s+)?\w+/),"tag"):i&&r.hasOwnProperty(i)?(t.backUp(1),t.match(/[\w]+/),t.match(/\s+\S+\s+{/,!1)&&(e.inDefinition=!0),i=="include"&&(e.inInclude=!0),r[i]):/(^|\s+)[A-Z][\w:_]+/.test(i)?(t.backUp(1),t.match(/(^|\s+)[A-Z][\w:_]+/),"def"):o?(t.match(/(\s+)?[\w:_]+/),"def"):u?(t.match(/(\s+)?[@]{1,2}/),"atom"):n=="#"?(t.skipToEnd(),"comment"):n=="'"||n=='"'?(e.pending=n,c(t,e)):n=="{"||n=="}"?"bracket":n=="/"?(t.match(/^[^\/]*\//),"string.special"):n.match(/[0-9]/)?(t.eatWhile(/[0-9]+/),"number"):n=="="?(t.peek()==">"&&t.next(),"operator"):(t.eatWhile(/[\w-]/),null)}const d={name:"puppet",startState:function(){var t={};return t.inDefinition=!1,t.inInclude=!1,t.continueString=!1,t.pending=!1,t},token:function(t,e){return t.eatSpace()?null:p(t,e)}};export{d as puppet};