var l={"+":["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"]},a=/[\.\/⌿⍀¨⍣]/,r=/⍬/,i=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,u=/←/,o=/[⍝#].*$/,s=function(n){var t;return t=!1,function(e){return t=e,e===n?t==="\\":!0}};const c={name:"apl",startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(n,t){var e;return n.eatSpace()?null:(e=n.next(),e==='"'||e==="'"?(n.eatWhile(s(e)),n.next(),t.prev=!0,"string"):/[\[{\(]/.test(e)?(t.prev=!1,null):/[\]}\)]/.test(e)?(t.prev=!0,null):r.test(e)?(t.prev=!1,"atom"):/[¯\d]/.test(e)?(t.func?(t.func=!1,t.prev=!1):t.prev=!0,n.eatWhile(/[\w\.]/),"number"):a.test(e)||u.test(e)?"operator":i.test(e)?(t.func=!0,t.prev=!1,l[e]?"variableName.function.standard":"variableName.function"):o.test(e)?(n.skipToEnd(),"comment"):e==="∘"&&n.peek()==="."?(n.next(),"variableName.function"):(n.eatWhile(/[\w\$_]/),t.prev=!0,"keyword"))}};export{c as apl};