const toml={name:"toml",startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(stream,state){let quote;if(!state.inString&&(quote=stream.match(/^('''|"""|'|")/))&&(state.stringType=quote[0],state.inString=!0),stream.sol()&&!state.inString&&0===state.inArray&&(state.lhs=!0),state.inString){for(;state.inString;)if(stream.match(state.stringType))state.inString=!1;else if("\\"===stream.peek())stream.next(),stream.next();else{if(stream.eol())break;stream.match(/^.[^\\\"\']*/)}return state.lhs?"property":"string"}return state.inArray&&"]"===stream.peek()?(stream.next(),state.inArray--,"bracket"):state.lhs&&"["===stream.peek()&&stream.skipTo("]")?(stream.next(),"]"===stream.peek()&&stream.next(),"atom"):"#"===stream.peek()?(stream.skipToEnd(),"comment"):stream.eatSpace()?null:state.lhs&&stream.eatWhile(function(c){return"="!=c&&" "!=c})?"property":state.lhs&&"="===stream.peek()?(stream.next(),state.lhs=!1,null):!state.lhs&&stream.match(/^\d\d\d\d[\d\-\:\.T]*Z/)?"atom":state.lhs||!stream.match("true")&&!stream.match("false")?state.lhs||"["!==stream.peek()?!state.lhs&&stream.match(/^\-?\d+(?:\.\d+)?/)?"number":(stream.eatSpace()||stream.next(),null):(state.inArray++,stream.next(),"bracket"):"atom"},languageData:{commentTokens:{line:"#"}}};export{toml};
