2 lines
3.0 KiB
JavaScript
2 lines
3.0 KiB
JavaScript
|
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[67887],{67887:function(L,d,k){"use strict";k.r(d),k.d(d,{r:function(){return I}});function o(e){for(var n={},r=0;r<e.length;++r)n[e[r]]=!0;return n}var s=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],v=["list","quote","bquote","eval","return","call","parse","deparse"],b=["if","else","repeat","while","function","for","in","next","break"],m=["if","else","repeat","while","function","for"],_=o(s),N=o(v),w=o(b),A=o(m),g=/[+\-*\/^<>=!&|~$:]/,l;function f(e,n){l=null;var r=e.next();if(r=="#")return e.skipToEnd(),"comment";if(r=="0"&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if(r=="."&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(r))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if(r=="'"||r=='"')return n.tokenize=E(r),"string";if(r=="`")return e.match(/[^`]+`/),"string.special";if(r=="."&&e.match(/.(?:[.]|\d+)/))return"keyword";if(/[a-zA-Z\.]/.test(r)){e.eatWhile(/[\w\.]/);var i=e.current();return _.propertyIsEnumerable(i)?"atom":w.propertyIsEnumerable(i)?(A.propertyIsEnumerable(i)&&!e.match(/\s*if(\s+|$)/,!1)&&(l="block"),"keyword"):N.propertyIsEnumerable(i)?"builtin":"variable"}else return r=="%"?(e.skipTo("%")&&e.next(),"variableName.special"):r=="<"&&e.eat("-")||r=="<"&&e.match("<-")||r=="-"&&e.match(/>>?/)||r=="="&&n.ctx.argList?"operator":g.test(r)?(r=="$"||e.eatWhile(g),"operator"):/[\(\){}\[\];]/.test(r)?(l=r,r==";"?"punctuation":null):null}function E(e){return function(n,r){if(n.eat("\\")){var i=n.next();return i=="x"?n.match(/^[a-f0-9]{2}/i):(i=="u"||i=="U")&&n.eat("{")&&n.skipTo("}")?n.next():i=="u"?n.match(/^[a-f0-9]{4}/i):i=="U"?n.match(/^[a-f0-9]{8}/i):/[0-7]/.test(i)&&n.match(/^[0-7]{1,2}/),"string.special"}else{for(var t;(t=n.next())!=null;){if(t==e){r.tokenize=f;break}if(t=="\\"){n.backUp(1);break}}return"string"}}}var x=1,c=2,a=4;function u(e,n,r){e.ctx={type:n,indent:e.indent,flags:0,column:r.column(),prev:e.ctx}}function h(e,n){var r=e.ctx;e.ctx={type:r.type,indent:r.indent,flags:r.flags|n,column:r.column,prev:r.prev}}function p(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}const I={name:"r",startState:function(e){return{tokenize:f,ctx:{type:"top",indent:-e,flags:c},indent:0,afterIdent:!1}},token:function(e,n){if(e.sol()&&((n.ctx.flags&3)==0&&(n.ctx.flags|=c),n.ctx.flags&a&&p(n),n.indent=e.indentation()),e.eatSpace())return null;var r=n.tokenize(e,n);return r!="comment"&&(n.ctx.flags&c)==0&&h(n,x),(l==";"||l=="{"||l=="}")&&n.ctx.type=="block"&&p(n),l=="{"?u(n,"}",e):l=="("?(u(n,")",e),n.afterIdent&&(n.ctx.argList=!0)):l=="["?u(n,"]",e):l=="block"?u(n,"block",e):l==n.ctx.type?p(n):n.ctx.type=="block"&&r!="comment"&&h(n,a),n.afterIdent=r=="variable"||r=="keyword",r},indent:function(e,n,r){if(e.tokenize!=f)return 0;var i=n&&n.charAt(0),t=e.ctx,y=i==t.type;return t.flags&a&&(t=t.prev),t.type=="block"?t.indent+(i=="{"?0:r.unit):t.flags&x?t.column+(y?0:1):t.indent+(y?0:r.unit)},languageData:{wordChars:".",commentTokens:{line:"#"},autocomplete:s.concat(v,b)}}}}]);
|