mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-23 04:18:21 +00:00
1 line
2.0 KiB
JavaScript
1 line
2.0 KiB
JavaScript
![]() |
"use strict";(self.webpackChunkseahub_frontend=self.webpackChunkseahub_frontend||[]).push([[5389],{5389:function(e,t,n){function r(e,t,n){return t(n),n(e,t)}n.r(t),n.d(t,{elm:function(){return b}});var i=/[a-z]/,o=/[A-Z]/,u=/[a-zA-Z0-9_]/,a=/[0-9]/,f=/[0-9A-Fa-f]/,s=/[-&*+.\\/<>=?^|:]/,l=/[(),[\]{}]/,c=/[ \v\f]/;function p(){return function(e,t){if(e.eatWhile(c))return null;var n=e.next();if(l.test(n))return"{"===n&&e.eat("-")?r(e,t,h(1)):"["===n&&e.match("glsl|")?r(e,t,d):"builtin";if("'"===n)return r(e,t,x);if('"'===n)return e.eat('"')?e.eat('"')?r(e,t,k):"string":r(e,t,m);if(o.test(n))return e.eatWhile(u),"type";if(i.test(n)){var p=1===e.pos;return e.eatWhile(u),p?"def":"variable"}if(a.test(n)){if("0"===n){if(e.eat(/[xX]/))return e.eatWhile(f),"number"}else e.eatWhile(a);return e.eat(".")&&e.eatWhile(a),e.eat(/[eE]/)&&(e.eat(/[-+]/),e.eatWhile(a)),"number"}return s.test(n)?"-"===n&&e.eat("-")?(e.skipToEnd(),"comment"):(e.eatWhile(s),"keyword"):"_"===n?"keyword":"error"}}function h(e){return 0==e?p():function(t,n){for(;!t.eol();){var r=t.next();if("{"==r&&t.eat("-"))++e;else if("-"==r&&t.eat("}")&&0===--e)return n(p()),"comment"}return n(h(e)),"comment"}}function k(e,t){for(;!e.eol();){if('"'===e.next()&&e.eat('"')&&e.eat('"'))return t(p()),"string"}return"string"}function m(e,t){for(;e.skipTo('\\"');)e.next(),e.next();return e.skipTo('"')?(e.next(),t(p()),"string"):(e.skipToEnd(),t(p()),"error")}function x(e,t){for(;e.skipTo("\\'");)e.next(),e.next();return e.skipTo("'")?(e.next(),t(p()),"string"):(e.skipToEnd(),t(p()),"error")}function d(e,t){for(;!e.eol();){if("|"===e.next()&&e.eat("]"))return t(p()),"string"}return"string"}var g={case:1,of:1,as:1,if:1,then:1,else:1,let:1,in:1,type:1,alias:1,module:1,where:1,import:1,exposing:1,port:1},b={name:"elm",startState:function(){return{f:p()}},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 g.hasOwnProperty(r)?"keyword":n},languageData:{commentTokens:{line:"--"}}}}}]);
|