function e(e){var t={as:`keyword`,do:`keyword`,else:`keyword`,end:`keyword`,exception:`keyword`,fun:`keyword`,functor:`keyword`,if:`keyword`,in:`keyword`,include:`keyword`,let:`keyword`,of:`keyword`,open:`keyword`,rec:`keyword`,struct:`keyword`,then:`keyword`,type:`keyword`,val:`keyword`,while:`keyword`,with:`keyword`},n=e.extraWords||{};for(var r in n)n.hasOwnProperty(r)&&(t[r]=e.extraWords[r]);var i=[];for(var a in t)i.push(a);function o(n,r){var i=n.next();if(i===`"`)return r.tokenize=s,r.tokenize(n,r);if(i===`{`&&n.eat(`|`))return r.longString=!0,r.tokenize=l,r.tokenize(n,r);if(i===`(`&&n.match(/^\*(?!\))/))return r.commentLevel++,r.tokenize=c,r.tokenize(n,r);if(i===`~`||i===`?`)return n.eatWhile(/\w/),`variableName.special`;if(i==="`")return n.eatWhile(/\w/),`quote`;if(i===`/`&&e.slashComments&&n.eat(`/`))return n.skipToEnd(),`comment`;if(/\d/.test(i))return i===`0`&&n.eat(/[bB]/)&&n.eatWhile(/[01]/),i===`0`&&n.eat(/[xX]/)&&n.eatWhile(/[0-9a-fA-F]/),i===`0`&&n.eat(/[oO]/)?n.eatWhile(/[0-7]/):(n.eatWhile(/[\d_]/),n.eat(`.`)&&n.eatWhile(/[\d]/),n.eat(/[eE]/)&&n.eatWhile(/[\d\-+]/)),`number`;if(/[+\-*&%=<>!?|@\.~:]/.test(i))return`operator`;if(/[\w\xa1-\uffff]/.test(i)){n.eatWhile(/[\w\xa1-\uffff]/);var a=n.current();return t.hasOwnProperty(a)?t[a]:`variable`}return null}function s(e,t){for(var n,r=!1,i=!1;(n=e.next())!=null;){if(n===`"`&&!i){r=!0;break}i=!i&&n===`\\`}return r&&!i&&(t.tokenize=o),`string`}function c(e,t){for(var n,r;t.commentLevel>0&&(r=e.next())!=null;)n===`(`&&r===`*`&&t.commentLevel++,n===`*`&&r===`)`&&t.commentLevel--,n=r;return t.commentLevel<=0&&(t.tokenize=o),`comment`}function l(e,t){for(var n,r;t.longString&&(r=e.next())!=null;)n===`|`&&r===`}`&&(t.longString=!1),n=r;return t.longString||(t.tokenize=o),`string`}return{startState:function(){return{tokenize:o,commentLevel:0,longString:!1}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},languageData:{autocomplete:i,commentTokens:{line:e.slashComments?`//`:void 0,block:{open:`(*`,close:`*)`}}}}}var t=e({name:`ocaml`,extraWords:{and:`keyword`,assert:`keyword`,begin:`keyword`,class:`keyword`,constraint:`keyword`,done:`keyword`,downto:`keyword`,external:`keyword`,function:`keyword`,initializer:`keyword`,lazy:`keyword`,match:`keyword`,method:`keyword`,module:`keyword`,mutable:`keyword`,new:`keyword`,nonrec:`keyword`,object:`keyword`,private:`keyword`,sig:`keyword`,to:`keyword`,try:`keyword`,value:`keyword`,virtual:`keyword`,when:`keyword`,raise:`builtin`,failwith:`builtin`,true:`builtin`,false:`builtin`,asr:`builtin`,land:`builtin`,lor:`builtin`,lsl:`builtin`,lsr:`builtin`,lxor:`builtin`,mod:`builtin`,or:`builtin`,raise_notrace:`builtin`,trace:`builtin`,exit:`builtin`,print_string:`builtin`,print_endline:`builtin`,int:`type`,float:`type`,bool:`type`,char:`type`,string:`type`,unit:`type`,List:`builtin`}}),n=e({name:`fsharp`,extraWords:{abstract:`keyword`,assert:`keyword`,base:`keyword`,begin:`keyword`,class:`keyword`,default:`keyword`,delegate:`keyword`,"do!":`keyword`,done:`keyword`,downcast:`keyword`,downto:`keyword`,elif:`keyword`,extern:`keyword`,finally:`keyword`,for:`keyword`,function:`keyword`,global:`keyword`,inherit:`keyword`,inline:`keyword`,interface:`keyword`,internal:`keyword`,lazy:`keyword`,"let!":`keyword`,match:`keyword`,member:`keyword`,module:`keyword`,mutable:`keyword`,namespace:`keyword`,new:`keyword`,null:`keyword`,override:`keyword`,private:`keyword`,public:`keyword`,"return!":`keyword`,return:`keyword`,select:`keyword`,static:`keyword`,to:`keyword`,try:`keyword`,upcast:`keyword`,"use!":`keyword`,use:`keyword`,void:`keyword`,when:`keyword`,"yield!":`keyword`,yield:`keyword`,atomic:`keyword`,break:`keyword`,checked:`keyword`,component:`keyword`,const:`keyword`,constraint:`keyword`,constructor:`keyword`,continue:`keyword`,eager:`keyword`,event:`keyword`,external:`keyword`,fixed:`keyword`,method:`keyword`,mixin:`keyword`,object:`keyword`,parallel:`keyword`,process:`keyword`,protected:`keyword`,pure:`keyword`,sealed:`keyword`,tailcall:`keyword`,trait:`keyword`,virtual:`keyword`,volatile:`keyword`,List:`builtin`,Seq:`builtin`,Map:`builtin`,Set:`builtin`,Option:`builtin`,int:`builtin`,string:`builtin`,not:`builtin`,true:`builtin`,false:`builtin`,raise:`builtin`,failwith:`builtin`},slashComments:!0}),r=e({name:`sml`,extraWords:{abstype:`keyword`,and:`keyword`,andalso:`keyword`,case:`keyword`,datatype:`keyword`,fn:`keyword`,handle:`keyword`,infix:`keyword`,infixr:`keyword`,local:`keyword`,nonfix:`keyword`,op:`keyword`,orelse:`keyword`,raise:`keyword`,withtype:`keyword`,eqtype:`keyword`,sharing:`keyword`,sig:`keyword`,signature:`keyword`,structure:`keyword`,where:`keyword`,true:`keyword`,false:`keyword`,int:`builtin`,real:`builtin`,string:`builtin`,char:`builtin`,bool:`builtin`},slashComments:!0});export{n as fSharp,t as oCaml,r as sml};