var variable_regex=/({)?[a-zA-Z0-9_]+(})?/;function tokenString(n,e){for(var t,i,r=!1;!n.eol()&&(t=n.next())!=e.pending;){if("$"===t&&"\\"!=i&&'"'==e.pending){r=!0;break}i=t;}return r&&n.backUp(1),t==e.pending?e.continueString=!1:e.continueString=!0,"string"}function tokenize(n,e){var t=n.next();return "$"===t?n.match(variable_regex)?"variableName.special":"variable":e.continueString?(n.backUp(1),tokenString(n,e)):n.match(/(\s+)?\w+\(/)||n.match(/(\s+)?\w+\ \(/)?(n.backUp(1),"def"):"#"==t?(n.skipToEnd(),"comment"):"'"==t||'"'==t?(e.pending=t,tokenString(n,e)):"("==t||")"==t?"bracket":t.match(/[0-9]/)?"number":(n.eatWhile(/[\w-]/),null)}const cmake={startState:function(){var n={inDefinition:!1,inInclude:!1,continueString:!1,pending:!1};return n},token:function(n,e){return n.eatSpace()?null:tokenize(n,e)}};

export { cmake };
