2 lines
94 KiB
JavaScript
2 lines
94 KiB
JavaScript
|
|
import{L as r,E as P}from"./vendor-lezer-lr-eZ5kYecM.js";import{s as n,t as $}from"./vendor-lezer-highlight-DuEf3ZFH.js";const Z=1,R=2,d=275,s=3,y=276,o=277,t=278,U=4,W=5,w=6,l=7,_=8,q=9,p=10,b=11,u=12,f=13,m=14,k=15,G=16,x=17,h=18,v=19,g=20,j=21,E=22,I=23,N=24,F=25,L=26,C=27,H=28,K=29,A=30,D=31,B=32,M=33,J=34,OO=35,$O=36,QO=37,iO=38,aO=39,TO=40,PO=41,XO=42,SO=43,cO=44,eO=45,oO=46,_O=47,zO=48,YO=49,VO=50,rO=51,nO=52,ZO=53,RO=54,dO=55,sO=56,yO=57,tO=58,UO=59,WO=60,wO=61,lO=62,S=63,qO=64,pO=65,bO=66,uO={abstract:U,and:W,array:w,as:l,true:_,false:_,break:q,case:p,catch:b,clone:u,const:f,continue:m,declare:G,default:k,do:x,echo:h,else:v,elseif:g,enddeclare:j,endfor:E,endforeach:I,endif:N,endswitch:F,endwhile:L,enum:C,extends:H,final:K,finally:A,fn:D,for:B,foreach:M,from:J,function:OO,global:$O,goto:QO,if:iO,implements:aO,include:TO,include_once:PO,instanceof:XO,insteadof:SO,interface:cO,list:eO,match:oO,namespace:_O,new:zO,null:YO,or:VO,print:rO,readonly:nO,require:ZO,require_once:RO,return:dO,switch:sO,throw:yO,trait:tO,try:UO,unset:WO,use:wO,var:lO,public:S,private:S,protected:S,while:qO,xor:pO,yield:bO,__proto__:null};function z(O){let Q=uO[O.toLowerCase()];return Q??-1}function Y(O){return O==9||O==10||O==13||O==32}function V(O){return O>=97&&O<=122||O>=65&&O<=90}function T(O){return O==95||O>=128||V(O)}function c(O){return O>=48&&O<=55||O>=97&&O<=102||O>=65&&O<=70}const fO={int:!0,integer:!0,bool:!0,boolean:!0,float:!0,double:!0,real:!0,string:!0,array:!0,object:!0,unset:!0,__proto__:null},mO=new P(O=>{if(O.next==40){O.advance();let Q=0;for(;Y(O.peek(Q));)Q++;let i="",a;for(;V(a=O.peek(Q));)i+=String.fromCharCode(a),Q++;for(;Y(O.peek(Q));)Q++;O.peek(Q)==41&&fO[i.toLowerCase()]&&O.acceptToken(Z)}else if(O.next==60&&O.peek(1)==60&&O.peek(2)==60){for(let a=0;a<3;a++)O.advance();for(;O.next==32||O.next==9;)O.advance();let Q=O.next==39;if(Q&&O.advance(),!T(O.next))return;let i=String.fromCharCode(O.next);for(;O.advance(),!(!T(O.next)&&!(O.next>=48&&O.next<=55));)i+=String.fromCharCode(O.next);if(Q){if(O.next!=39)return;O.advance()}if(O.next!=10&&O.next!=13)return;for(;;){let a=O.next==10||O.next==13;if(O.advance(),O.next<0)return;if(a){for(;O.next==32||O.next==9;)O.advance();let e=!0;for(let X=0;X<i.length;X++){if(O.next!=i.charCodeAt(X)){e=!1;break}O.advance()}if(e)return O.acceptToken(R)}}}}),kO=new P(O=>{O.next<0&&O.acceptToken(t)}),GO=new P((O,Q)=>{O.next==63&&Q.canShift(o)&&O.peek(1)==62&&O.acceptToken(o)});function xO(O){let Q=O.peek(1);if(Q==110||Q==114||Q==116||Q==118||Q==101||Q==102||Q==92||Q==36||Q==34||Q==123)return 2;if(Q>=48&&Q<=55){let i=2,a;for(;i<5&&(a=O.peek(i))>=48&&a<=55;)i++;return i}if(Q==120&&c(O.peek(2)))return c(O.peek(3))?4:3;if(Q==117&&O.peek(2)==123)for(let i=3;;i++){let a=O.peek(i);if(a==125)return i==2?0:i+1;if(!c(a))break}return 0}const hO=new P((O,Q)=>{let i=!1;for(;!(O.next==34||O.next<0||O.next==36&&(T(O.peek(1))||O.peek(1)==123)||O.next==123&&O.peek(1)==36);i=!0){if(O.next==92){let a=xO(O);if(a){if(i)break;return O.acceptToken(s,a)}}else if(!i&&(O.next==91||O.next==45&&O.peek(1)==62&&T(O.peek(2))||O.next==63&&O.peek(1)==45&&O.peek(2)==62&&T(O.peek(3)))&&Q.canShift(y))break;O.advance()}i&&O.acceptToken(d)}),vO=n({"Visibility abstract final static":$.modifier,"for foreach while do if else elseif switch try catch finally return throw break continue default case":$.controlKeyword,"endif endfor endforeach endswitch endwhile declare enddeclare goto match":$.controlKeyword,"and or xor yield unset clone instanceof insteadof":$.operatorKeyword,"function fn class trait implements extends const enum global interface use var":$.definitionKeyword,"include include_once require require_once namespace":$.moduleKeyword,"new from echo print array list as":$.keyword,null:$.null,Boolean:$.bool,VariableName:$.variableName,"NamespaceName/...":$.namespace,"NamedType/...":$.typeName,Name:$.name,"CallExpression/Name":$.function($.variableName),"LabelStatement/Name":$.labelName,"MemberExpression/Name":$.propertyName,"MemberExpression/VariableName":$.special($.propertyName),"ScopedExpression/ClassMemberName/Name":$.p
|