filesbox/web/dist/14562.680a065a.async.js
2024-07-26 14:10:54 +08:00

2 lines
2.9 KiB
JavaScript

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[14562],{14562:function(y,t,a){"use strict";a.r(t),a.d(t,{modelica:function(){return w}});function r(n){for(var e={},i=n.split(" "),l=0;l<i.length;++l)e[i[l]]=!0;return e}var u=r("algorithm and annotation assert block break class connect connector constant constrainedby der discrete each else elseif elsewhen encapsulated end enumeration equation expandable extends external false final flow for function if import impure in initial inner input loop model not operator or outer output package parameter partial protected public pure record redeclare replaceable return stream then true type when while within"),c=r("abs acos actualStream asin atan atan2 cardinality ceil cos cosh delay div edge exp floor getInstanceName homotopy inStream integer log log10 mod pre reinit rem semiLinear sign sin sinh spatialDistribution sqrt tan tanh"),f=r("Real Boolean Integer String"),s=[].concat(Object.keys(u),Object.keys(c),Object.keys(f)),p=/[;=\(:\),{}.*<>+\-\/^\[\]]/,d=/(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/,o=/[0-9]/,k=/[_a-zA-Z]/;function h(n,e){return n.skipToEnd(),e.tokenize=null,"comment"}function b(n,e){for(var i=!1,l;l=n.next();){if(i&&l=="/"){e.tokenize=null;break}i=l=="*"}return"comment"}function g(n,e){for(var i=!1,l;(l=n.next())!=null;){if(l=='"'&&!i){e.tokenize=null,e.sol=!1;break}i=!i&&l=="\\"}return"string"}function v(n,e){for(n.eatWhile(o);n.eat(o)||n.eat(k););var i=n.current();return e.sol&&(i=="package"||i=="model"||i=="when"||i=="connector")?e.level++:e.sol&&i=="end"&&e.level>0&&e.level--,e.tokenize=null,e.sol=!1,u.propertyIsEnumerable(i)?"keyword":c.propertyIsEnumerable(i)?"builtin":f.propertyIsEnumerable(i)?"atom":"variable"}function z(n,e){for(;n.eat(/[^']/););return e.tokenize=null,e.sol=!1,n.eat("'")?"variable":"error"}function m(n,e){return n.eatWhile(o),n.eat(".")&&n.eatWhile(o),(n.eat("e")||n.eat("E"))&&(n.eat("-")||n.eat("+"),n.eatWhile(o)),e.tokenize=null,e.sol=!1,"number"}const w={name:"modelica",startState:function(){return{tokenize:null,level:0,sol:!0}},token:function(n,e){if(e.tokenize!=null)return e.tokenize(n,e);if(n.sol()&&(e.sol=!0),n.eatSpace())return e.tokenize=null,null;var i=n.next();if(i=="/"&&n.eat("/"))e.tokenize=h;else if(i=="/"&&n.eat("*"))e.tokenize=b;else{if(d.test(i+n.peek()))return n.next(),e.tokenize=null,"operator";if(p.test(i))return e.tokenize=null,"operator";if(k.test(i))e.tokenize=v;else if(i=="'"&&n.peek()&&n.peek()!="'")e.tokenize=z;else if(i=='"')e.tokenize=g;else if(o.test(i))e.tokenize=m;else return e.tokenize=null,"error"}return e.tokenize(n,e)},indent:function(n,e,i){if(n.tokenize!=null)return null;var l=n.level;return/(algorithm)/.test(e)&&l--,/(equation)/.test(e)&&l--,/(initial algorithm)/.test(e)&&l--,/(initial equation)/.test(e)&&l--,/(end)/.test(e)&&l--,l>0?i.unit*l:0},languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:s}}}}]);