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