2 lines
1.3 KiB
JavaScript
2 lines
1.3 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[57702],{57702:function(u,c,t){"use strict";t.r(c),t.d(c,{spreadsheet:function(){return r}});const r={name:"spreadsheet",startState:function(){return{stringType:null,stack:[]}},token:function(e,n){if(!!e){switch(n.stack.length===0&&(e.peek()=='"'||e.peek()=="'")&&(n.stringType=e.peek(),e.next(),n.stack.unshift("string")),n.stack[0]){case"string":for(;n.stack[0]==="string"&&!e.eol();)e.peek()===n.stringType?(e.next(),n.stack.shift()):e.peek()==="\\"?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return"string";case"characterClass":for(;n.stack[0]==="characterClass"&&!e.eol();)e.match(/^[^\]\\]+/)||e.match(/^\\./)||n.stack.shift();return"operator"}var i=e.peek();switch(i){case"[":return e.next(),n.stack.unshift("characterClass"),"bracket";case":":return e.next(),"operator";case"\\":return e.match(/\\[a-z]+/)?"string.special":(e.next(),"atom");case".":case",":case";":case"*":case"-":case"+":case"^":case"<":case"/":case"=":return e.next(),"atom";case"$":return e.next(),"builtin"}return e.match(/\d+/)?e.match(/^\w+/)?"error":"number":e.match(/^[a-zA-Z_]\w*/)?e.match(/(?=[\(.])/,!1)?"keyword":"variable":["[","]","(",")","{","}"].indexOf(i)!=-1?(e.next(),"bracket"):(e.eatSpace()||e.next(),null)}}}}}]);
|