Spaces:
Running
Running
File size: 2,274 Bytes
565ea71 |
1 2 |
var e={"+":["conjugate","add"],"β":["negate","subtract"],"Γ":["signOf","multiply"],"Γ·":["reciprocal","divide"],"β":["ceiling","greaterOf"],"β":["floor","lesserOf"],"β£":["absolute","residue"],"β³":["indexGenerate","indexOf"],"?":["roll","deal"],"β":["exponentiate","toThePowerOf"],"β":["naturalLog","logToTheBase"],"β":["piTimes","circularFuncs"],"!":["factorial","binomial"],"βΉ":["matrixInverse","matrixDivide"],"<":[null,"lessThan"],"β€":[null,"lessThanOrEqual"],"=":[null,"equals"],">":[null,"greaterThan"],"β₯":[null,"greaterThanOrEqual"],"β ":[null,"notEqual"],"β‘":["depth","match"],"β’":[null,"notMatch"],"β":["enlist","membership"],"β·":[null,"find"],"βͺ":["unique","union"],"β©":[null,"intersection"],"βΌ":["not","without"],"β¨":[null,"or"],"β§":[null,"and"],"β±":[null,"nor"],"β²":[null,"nand"],"β΄":["shapeOf","reshape"],",":["ravel","catenate"],"βͺ":[null,"firstAxisCatenate"],"β½":["reverse","rotate"],"β":["axis1Reverse","axis1Rotate"],"β":["transpose",null],"β":["first","take"],"β":[null,"drop"],"β":["enclose","partitionWithAxis"],"β":["diclose","pick"],"β·":[null,"index"],"β":["gradeUp",null],"β":["gradeDown",null],"β€":["encode",null],"β₯":["decode",null],"β":["format","formatByExample"],"β":["execute",null],"β£":["stop","left"],"β’":["pass","right"]},n=/[\.\/βΏβΒ¨β£]/,t=/β¬/,l=/[\+βΓΓ·βββ£β³\?βββ!βΉ<β€=>β₯β β‘β’ββ·βͺβ©βΌβ¨β§β±β²β΄,βͺβ½βββββββ·βββ€β₯βββ£β’]/,a=/β/,r=/[β#].*$/;const i={name:"apl",startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(i,u){var o,s,c;return i.eatSpace()?null:'"'===(o=i.next())||"'"===o?(i.eatWhile((s=o,c=!1,function(e){return c=e,e!==s||"\\"===c})),i.next(),u.prev=!0,"string"):/[\[{\(]/.test(o)?(u.prev=!1,null):/[\]}\)]/.test(o)?(u.prev=!0,null):t.test(o)?(u.prev=!1,"atom"):/[Β―\d]/.test(o)?(u.func?(u.func=!1,u.prev=!1):u.prev=!0,i.eatWhile(/[\w\.]/),"number"):n.test(o)||a.test(o)?"operator":l.test(o)?(u.func=!0,u.prev=!1,e[o]?"variableName.function.standard":"variableName.function"):r.test(o)?(i.skipToEnd(),"comment"):"β"===o&&"."===i.peek()?(i.next(),"variableName.function"):(i.eatWhile(/[\w\$_]/),u.prev=!0,"keyword")}};export{i as apl};
|