var c={},l=/({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/;function s(e,t){for(var a=t.split(" "),n=0;n<a.length;n++)c[a[n]]=e}s("keyword","class define site node include import inherits"),s("keyword","case if else in and elsif default or"),s("atom","false true running present absent file directory undef"),s("builtin","action augeas burst chain computer cron destination dport exec file filebucket group host icmp iniface interface jump k5login limit log_level log_prefix macauthorization mailalias maillist mcx mount nagios_command nagios_contact nagios_contactgroup nagios_host nagios_hostdependency nagios_hostescalation nagios_hostextinfo nagios_hostgroup nagios_service nagios_servicedependency nagios_serviceescalation nagios_serviceextinfo nagios_servicegroup nagios_timeperiod name notify outiface package proto reject resources router schedule scheduled_task selboolean selmodule service source sport ssh_authorized_key sshkey stage state table tidy todest toports tosource user vlan yumrepo zfs zone zpool");function r(e,t){for(var a,n,o=!1;!e.eol()&&(a=e.next())!=t.pending;){if(a==="$"&&n!="\\"&&t.pending=='"'){o=!0;break}n=a}return o&&e.backUp(1),a==t.pending?t.continueString=!1:t.continueString=!0,"string"}function p(e,t){var a=e.match(/[\w]+/,!1),n=e.match(/(\s+)?\w+\s+=>.*/,!1),o=e.match(/(\s+)?[\w:_]+(\s+)?{/,!1),u=e.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/,!1),i=e.next();if(i==="$")return e.match(l)?t.continueString?"variableName.special":"variable":"error";if(t.continueString)return e.backUp(1),r(e,t);if(t.inDefinition){if(e.match(/(\s+)?[\w:_]+(\s+)?/))return"def";e.match(/\s+{/),t.inDefinition=!1}return t.inInclude?(e.match(/(\s+)?\S+(\s+)?/),t.inInclude=!1,"def"):e.match(/(\s+)?\w+\(/)?(e.backUp(1),"def"):n?(e.match(/(\s+)?\w+/),"tag"):a&&c.hasOwnProperty(a)?(e.backUp(1),e.match(/[\w]+/),e.match(/\s+\S+\s+{/,!1)&&(t.inDefinition=!0),a=="include"&&(t.inInclude=!0),c[a]):/(^|\s+)[A-Z][\w:_]+/.test(a)?(e.backUp(1),e.match(/(^|\s+)[A-Z][\w:_]+/),"def"):o?(e.match(/(\s+)?[\w:_]+/),"def"):u?(e.match(/(\s+)?[@]{1,2}/),"atom"):i=="#"?(e.skipToEnd(),"comment"):i=="'"||i=='"'?(t.pending=i,r(e,t)):i=="{"||i=="}"?"bracket":i=="/"?(e.match(/^[^\/]*\//),"string.special"):i.match(/[0-9]/)?(e.eatWhile(/[0-9]+/),"number"):i=="="?(e.peek()==">"&&e.next(),"operator"):(e.eatWhile(/[\w-]/),null)}const d={name:"puppet",startState:function(){var e={};return e.inDefinition=!1,e.inInclude=!1,e.continueString=!1,e.pending=!1,e},token:function(e,t){return e.eatSpace()?null:p(e,t)}};export{d as t};
