function e(e,t,n){return t(n),n(e,t)}var t=/[a-z_]/,n=/[A-Z]/,r=/\d/,i=/[0-9A-Fa-f]/,a=/[0-7]/,o=/[a-z_A-Z0-9'\xa1-\uffff]/,s=/[-!#$%&*+.\/<=>?@\\^|~:]/,c=/[(),;[\]`{}]/,l=/[ \t\v\f]/;function u(u,p){if(u.eatWhile(l))return null;var m=u.next();if(c.test(m)){if(m==`{`&&u.eat(`-`)){var h=`comment`;return u.eat(`#`)&&(h=`meta`),e(u,p,d(h,1))}return null}if(m==`'`)return u.eat(`\\`),u.next(),u.eat(`'`)?`string`:`error`;if(m==`"`)return e(u,p,f);if(n.test(m))return u.eatWhile(o),u.eat(`.`)?`qualifier`:`type`;if(t.test(m))return u.eatWhile(o),`variable`;if(r.test(m)){if(m==`0`){if(u.eat(/[xX]/))return u.eatWhile(i),`integer`;if(u.eat(/[oO]/))return u.eatWhile(a),`number`}u.eatWhile(r);var h=`number`;return u.match(/^\.\d+/)&&(h=`number`),u.eat(/[eE]/)&&(h=`number`,u.eat(/[-+]/),u.eatWhile(r)),h}return m==`.`&&u.eat(`.`)?`keyword`:s.test(m)?m==`-`&&u.eat(/-/)&&(u.eatWhile(/-/),!u.eat(s))?(u.skipToEnd(),`comment`):(u.eatWhile(s),`variable`):`error`}function d(e,t){return t==0?u:function(n,r){for(var i=t;!n.eol();){var a=n.next();if(a==`{`&&n.eat(`-`))++i;else if(a==`-`&&n.eat(`}`)&&(--i,i==0))return r(u),e}return r(d(e,i)),e}}function f(e,t){for(;!e.eol();){var n=e.next();if(n==`"`)return t(u),`string`;if(n==`\\`){if(e.eol()||e.eat(l))return t(p),`string`;e.eat(`&`)||e.next()}}return t(u),`error`}function p(t,n){return t.eat(`\\`)?e(t,n,f):(t.next(),n(u),`error`)}var m=(function(){var e={};function t(t){return function(){for(var n=0;n<arguments.length;n++)e[arguments[n]]=t}}return t(`keyword`)(`case`,`class`,`data`,`default`,`deriving`,`do`,`else`,`foreign`,`if`,`import`,`in`,`infix`,`infixl`,`infixr`,`instance`,`let`,`module`,`newtype`,`of`,`then`,`type`,`where`,`_`),t(`keyword`)(`..`,`:`,`::`,`=`,`\\`,`<-`,`->`,`@`,`~`,`=>`),t(`builtin`)(`!!`,`$!`,`$`,`&&`,`+`,`++`,`-`,`.`,`/`,`/=`,`<`,`<*`,`<=`,`<$>`,`<*>`,`=<<`,`==`,`>`,`>=`,`>>`,`>>=`,`^`,`^^`,`||`,`*`,`*>`,`**`),t(`builtin`)(`Applicative`,`Bool`,`Bounded`,`Char`,`Double`,`EQ`,`Either`,`Enum`,`Eq`,`False`,`FilePath`,`Float`,`Floating`,`Fractional`,`Functor`,`GT`,`IO`,`IOError`,`Int`,`Integer`,`Integral`,`Just`,`LT`,`Left`,`Maybe`,`Monad`,`Nothing`,`Num`,`Ord`,`Ordering`,`Rational`,`Read`,`ReadS`,`Real`,`RealFloat`,`RealFrac`,`Right`,`Show`,`ShowS`,`String`,`True`),t(`builtin`)(`abs`,`acos`,`acosh`,`all`,`and`,`any`,`appendFile`,`asTypeOf`,`asin`,`asinh`,`atan`,`atan2`,`atanh`,`break`,`catch`,`ceiling`,`compare`,`concat`,`concatMap`,`const`,`cos`,`cosh`,`curry`,`cycle`,`decodeFloat`,`div`,`divMod`,`drop`,`dropWhile`,`either`,`elem`,`encodeFloat`,`enumFrom`,`enumFromThen`,`enumFromThenTo`,`enumFromTo`,`error`,`even`,`exp`,`exponent`,`fail`,`filter`,`flip`,`floatDigits`,`floatRadix`,`floatRange`,`floor`,`fmap`,`foldl`,`foldl1`,`foldr`,`foldr1`,`fromEnum`,`fromInteger`,`fromIntegral`,`fromRational`,`fst`,`gcd`,`getChar`,`getContents`,`getLine`,`head`,`id`,`init`,`interact`,`ioError`,`isDenormalized`,`isIEEE`,`isInfinite`,`isNaN`,`isNegativeZero`,`iterate`,`last`,`lcm`,`length`,`lex`,`lines`,`log`,`logBase`,`lookup`,`map`,`mapM`,`mapM_`,`max`,`maxBound`,`maximum`,`maybe`,`min`,`minBound`,`minimum`,`mod`,`negate`,`not`,`notElem`,`null`,`odd`,`or`,`otherwise`,`pi`,`pred`,`print`,`product`,`properFraction`,`pure`,`putChar`,`putStr`,`putStrLn`,`quot`,`quotRem`,`read`,`readFile`,`readIO`,`readList`,`readLn`,`readParen`,`reads`,`readsPrec`,`realToFrac`,`recip`,`rem`,`repeat`,`replicate`,`return`,`reverse`,`round`,`scaleFloat`,`scanl`,`scanl1`,`scanr`,`scanr1`,`seq`,`sequence`,`sequence_`,`show`,`showChar`,`showList`,`showParen`,`showString`,`shows`,`showsPrec`,`significand`,`signum`,`sin`,`sinh`,`snd`,`span`,`splitAt`,`sqrt`,`subtract`,`succ`,`sum`,`tail`,`take`,`takeWhile`,`tan`,`tanh`,`toEnum`,`toInteger`,`toRational`,`truncate`,`uncurry`,`undefined`,`unlines`,`until`,`unwords`,`unzip`,`unzip3`,`userError`,`words`,`writeFile`,`zip`,`zip3`,`zipWith`,`zipWith3`),e})(),h={name:`haskell`,startState:function(){return{f:u}},copyState:function(e){return{f:e.f}},token:function(e,t){var n=t.f(e,function(e){t.f=e}),r=e.current();return m.hasOwnProperty(r)?m[r]:n},languageData:{commentTokens:{line:`--`,block:{open:`{-`,close:`-}`}}}};export{h as haskell};
//# sourceMappingURL=haskell.triUul4b.js.map