'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)})(function(d){d.defineMode("elm",function(){function d(a,c,b){c(b);return b(a,c)}function f(){return function(a,c){if(a.eatWhile(h))return null;var b=a.next();if(p.test(b))return"{"==b&&a.eat("-")?(b="comment",a.eat("#")&&(b="meta"),d(a,c,k(b,1))):null;if("'"==b)return a.eat("\\"),a.next(),a.eat("'")?"string":
"error";if('"'==b)return d(a,c,l);if(q.test(b))return a.eatWhile(m),a.eat(".")?"qualifier":"variable-2";if(r.test(b))return c=1===a.pos,a.eatWhile(m),c?"type":"variable";if(e.test(b)){if("0"==b){if(a.eat(/[xX]/))return a.eatWhile(t),"integer";if(a.eat(/[oO]/))return a.eatWhile(u),"number"}a.eatWhile(e);b="number";a.eat(".")&&(b="number",a.eatWhile(e));a.eat(/[eE]/)&&(b="number",a.eat(/[-+]/),a.eatWhile(e));return b}if(g.test(b)){if("-"==b&&a.eat(/-/)&&(a.eatWhile(/-/),!a.eat(g)))return a.skipToEnd(),
"comment";a.eatWhile(g);return"builtin"}return"error"}}function k(a,c){return 0==c?f():function(b,d){for(var e=c;!b.eol();){var g=b.next();if("{"==g&&b.eat("-"))++e;else if("-"==g&&b.eat("}")&&(--e,0==e))return d(f()),a}d(k(a,e));return a}}function l(a,c){for(;!a.eol();){var b=a.next();if('"'==b)return c(f()),"string";if("\\"==b){if(a.eol()||a.eat(h))return c(v),"string";a.eat("&")||a.next()}}c(f());return"error"}function v(a,c){if(a.eat("\\"))return d(a,c,l);a.next();c(f());return"error"}var r=/[a-z_]/,
q=/[A-Z]/,e=/[0-9]/,t=/[0-9A-Fa-f]/,u=/[0-7]/,m=/[a-z_A-Z0-9']/,g=/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]/,p=/[(),;[\]`{}]/,h=/[ \t\v\f]/,n=function(){for(var a={},c='case of as if then else let in infix infixl infixr type alias input output foreign loopback module where import exposing _ .. | : = \\ " -> <-'.split(" "),b=c.length;b--;)a[c[b]]="keyword";return a}();return{startState:function(){return{f:f()}},copyState:function(a){return{f:a.f}},token:function(a,c){var b=c.f(a,function(a){c.f=a});a=
a.current();return n.hasOwnProperty(a)?n[a]:b}}});d.defineMIME("text/x-elm","elm")});
