marimo-learn / _site /scripts /assets /apl-CXdQSnD-.js
Haleshot's picture
relevant assets and workflow
1cce1df unverified
raw
history blame
2.27 kB
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};