meriyah.system.js 371 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796
  1. System.register('meriyah', [], function (exports) {
  2. 'use strict';
  3. return {
  4. execute: function () {
  5. exports({
  6. parse: parse,
  7. parseModule: parseModule,
  8. parseScript: parseScript
  9. });
  10. const errorMessages = {
  11. [0]: 'Unexpected token',
  12. [28]: "Unexpected token: '%0'",
  13. [1]: 'Octal escape sequences are not allowed in strict mode',
  14. [2]: 'Octal escape sequences are not allowed in template strings',
  15. [3]: 'Unexpected token `#`',
  16. [4]: 'Illegal Unicode escape sequence',
  17. [5]: 'Invalid code point %0',
  18. [6]: 'Invalid hexadecimal escape sequence',
  19. [8]: 'Octal literals are not allowed in strict mode',
  20. [7]: 'Decimal integer literals with a leading zero are forbidden in strict mode',
  21. [9]: 'Expected number in radix %0',
  22. [145]: 'Invalid left-hand side assignment to a destructible right-hand side',
  23. [10]: 'Non-number found after exponent indicator',
  24. [11]: 'Invalid BigIntLiteral',
  25. [12]: 'No identifiers allowed directly after numeric literal',
  26. [13]: 'Escapes \\8 or \\9 are not syntactically valid escapes',
  27. [14]: 'Unterminated string literal',
  28. [15]: 'Unterminated template literal',
  29. [16]: 'Multiline comment was not closed properly',
  30. [17]: 'The identifier contained dynamic unicode escape that was not closed',
  31. [18]: "Illegal character '%0'",
  32. [19]: 'Missing hexadecimal digits',
  33. [20]: 'Invalid implicit octal',
  34. [21]: 'Invalid line break in string literal',
  35. [22]: 'Only unicode escapes are legal in identifier names',
  36. [23]: "Expected '%0'",
  37. [24]: 'Invalid left-hand side in assignment',
  38. [25]: 'Invalid left-hand side in async arrow',
  39. [26]: 'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',
  40. [27]: 'Member access on super must be in a method',
  41. [29]: 'Await expression not allowed in formal parameter',
  42. [30]: 'Yield expression not allowed in formal parameter',
  43. [92]: "Unexpected token: 'escaped keyword'",
  44. [31]: 'Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses',
  45. [119]: 'Async functions can only be declared at the top level or inside a block',
  46. [32]: 'Unterminated regular expression',
  47. [33]: 'Unexpected regular expression flag',
  48. [34]: "Duplicate regular expression flag '%0'",
  49. [35]: '%0 functions must have exactly %1 argument%2',
  50. [36]: 'Setter function argument must not be a rest parameter',
  51. [37]: '%0 declaration must have a name in this context',
  52. [38]: 'Function name may not contain any reserved words or be eval or arguments in strict mode',
  53. [39]: 'The rest operator is missing an argument',
  54. [40]: 'A getter cannot be a generator',
  55. [41]: 'A computed property name must be followed by a colon or paren',
  56. [130]: 'Object literal keys that are strings or numbers must be a method or have a colon',
  57. [43]: 'Found `* async x(){}` but this should be `async * x(){}`',
  58. [42]: 'Getters and setters can not be generators',
  59. [44]: "'%0' can not be generator method",
  60. [45]: "No line break is allowed after '=>'",
  61. [46]: 'The left-hand side of the arrow can only be destructed through assignment',
  62. [47]: 'The binding declaration is not destructible',
  63. [48]: 'Async arrow can not be followed by new expression',
  64. [49]: "Classes may not have a static property named 'prototype'",
  65. [50]: 'Class constructor may not be a %0',
  66. [51]: 'Duplicate constructor method in class',
  67. [52]: 'Invalid increment/decrement operand',
  68. [53]: 'Invalid use of `new` keyword on an increment/decrement expression',
  69. [54]: '`=>` is an invalid assignment target',
  70. [55]: 'Rest element may not have a trailing comma',
  71. [56]: 'Missing initializer in %0 declaration',
  72. [57]: "'for-%0' loop head declarations can not have an initializer",
  73. [58]: 'Invalid left-hand side in for-%0 loop: Must have a single binding',
  74. [59]: 'Invalid shorthand property initializer',
  75. [60]: 'Property name __proto__ appears more than once in object literal',
  76. [61]: 'Let is disallowed as a lexically bound name',
  77. [62]: "Invalid use of '%0' inside new expression",
  78. [63]: "Illegal 'use strict' directive in function with non-simple parameter list",
  79. [64]: 'Identifier "let" disallowed as left-hand side expression in strict mode',
  80. [65]: 'Illegal continue statement',
  81. [66]: 'Illegal break statement',
  82. [67]: 'Cannot have `let[...]` as a var name in strict mode',
  83. [68]: 'Invalid destructuring assignment target',
  84. [69]: 'Rest parameter may not have a default initializer',
  85. [70]: 'The rest argument must the be last parameter',
  86. [71]: 'Invalid rest argument',
  87. [73]: 'In strict mode code, functions can only be declared at top level or inside a block',
  88. [74]: 'In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement',
  89. [75]: 'Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement',
  90. [76]: "Class declaration can't appear in single-statement context",
  91. [77]: 'Invalid left-hand side in for-%0',
  92. [78]: 'Invalid assignment in for-%0',
  93. [79]: 'for await (... of ...) is only valid in async functions and async generators',
  94. [80]: 'The first token after the template expression should be a continuation of the template',
  95. [82]: '`let` declaration not allowed here and `let` cannot be a regular var name in strict mode',
  96. [81]: '`let \n [` is a restricted production at the start of a statement',
  97. [83]: 'Catch clause requires exactly one parameter, not more (and no trailing comma)',
  98. [84]: 'Catch clause parameter does not support default values',
  99. [85]: 'Missing catch or finally after try',
  100. [86]: 'More than one default clause in switch statement',
  101. [87]: 'Illegal newline after throw',
  102. [88]: 'Strict mode code may not include a with statement',
  103. [89]: 'Illegal return statement',
  104. [90]: 'The left hand side of the for-header binding declaration is not destructible',
  105. [91]: 'new.target only allowed within functions',
  106. [92]: "'Unexpected token: 'escaped keyword'",
  107. [93]: "'#' not followed by identifier",
  108. [99]: 'Invalid keyword',
  109. [98]: "Can not use 'let' as a class name",
  110. [97]: "'A lexical declaration can't define a 'let' binding",
  111. [96]: 'Can not use `let` as variable name in strict mode',
  112. [94]: "'%0' may not be used as an identifier in this context",
  113. [95]: 'Await is only valid in async functions',
  114. [100]: 'The %0 keyword can only be used with the module goal',
  115. [101]: 'Unicode codepoint must not be greater than 0x10FFFF',
  116. [102]: '%0 source must be string',
  117. [103]: 'Only a identifier can be used to indicate alias',
  118. [104]: "Only '*' or '{...}' can be imported after default",
  119. [105]: 'Trailing decorator may be followed by method',
  120. [106]: "Decorators can't be used with a constructor",
  121. [107]: "'%0' may not be used as an identifier in this context",
  122. [108]: 'HTML comments are only allowed with web compatibility (Annex B)',
  123. [109]: "The identifier 'let' must not be in expression position in strict mode",
  124. [110]: 'Cannot assign to `eval` and `arguments` in strict mode',
  125. [111]: "The left-hand side of a for-of loop may not start with 'let'",
  126. [112]: 'Block body arrows can not be immediately invoked without a group',
  127. [113]: 'Block body arrows can not be immediately accessed without a group',
  128. [114]: 'Unexpected strict mode reserved word',
  129. [115]: 'Unexpected eval or arguments in strict mode',
  130. [116]: 'Decorators must not be followed by a semicolon',
  131. [117]: 'Calling delete on expression not allowed in strict mode',
  132. [118]: 'Pattern can not have a tail',
  133. [120]: 'Can not have a `yield` expression on the left side of a ternary',
  134. [121]: 'An arrow function can not have a postfix update operator',
  135. [122]: 'Invalid object literal key character after generator star',
  136. [123]: 'Private fields can not be deleted',
  137. [125]: 'Classes may not have a field called constructor',
  138. [124]: 'Classes may not have a private element named constructor',
  139. [126]: 'A class field initializer may not contain arguments',
  140. [127]: 'Generators can only be declared at the top level or inside a block',
  141. [128]: 'Async methods are a restricted production and cannot have a newline following it',
  142. [129]: 'Unexpected character after object literal property name',
  143. [131]: 'Invalid key token',
  144. [132]: "Label '%0' has already been declared",
  145. [133]: 'continue statement must be nested within an iteration statement',
  146. [134]: "Undefined label '%0'",
  147. [135]: 'Trailing comma is disallowed inside import(...) arguments',
  148. [136]: 'import() requires exactly one argument',
  149. [137]: 'Cannot use new with import(...)',
  150. [138]: '... is not allowed in import()',
  151. [139]: "Expected '=>'",
  152. [140]: "Duplicate binding '%0'",
  153. [141]: "Cannot export a duplicate name '%0'",
  154. [144]: 'Duplicate %0 for-binding',
  155. [142]: "Exported binding '%0' needs to refer to a top-level declared variable",
  156. [143]: 'Unexpected private field',
  157. [147]: 'Numeric separators are not allowed at the end of numeric literals',
  158. [146]: 'Only one underscore is allowed as numeric separator',
  159. [148]: 'JSX value should be either an expression or a quoted JSX text',
  160. [149]: 'Expected corresponding JSX closing tag for %0',
  161. [150]: 'Adjacent JSX elements must be wrapped in an enclosing tag',
  162. [151]: "JSX attributes must only be assigned a non-empty 'expression'",
  163. [152]: "'%0' has already been declared",
  164. [153]: "'%0' shadowed a catch clause binding",
  165. [154]: 'Dot property must be an identifier',
  166. [155]: 'Encountered invalid input after spread/rest argument',
  167. [156]: 'Catch without try',
  168. [157]: 'Finally without try',
  169. [158]: 'Expected corresponding closing tag for JSX fragment',
  170. [159]: 'Coalescing and logical operators used together in the same expression must be disambiguated with parentheses',
  171. [160]: 'Invalid tagged template on optional chain',
  172. [161]: 'Invalid optional chain from super property',
  173. [162]: 'Invalid optional chain from new expression',
  174. [163]: 'Cannot use "import.meta" outside a module',
  175. [164]: 'Leading decorators must be attached to a class declaration'
  176. };
  177. class ParseError extends SyntaxError {
  178. constructor(startindex, line, column, type, ...params) {
  179. const message = '[' + line + ':' + column + ']: ' + errorMessages[type].replace(/%(\d+)/g, (_, i) => params[i]);
  180. super(`${message}`);
  181. this.index = startindex;
  182. this.line = line;
  183. this.column = column;
  184. this.description = message;
  185. this.loc = {
  186. line,
  187. column
  188. };
  189. }
  190. }
  191. function report(parser, type, ...params) {
  192. throw new ParseError(parser.index, parser.line, parser.column, type, ...params);
  193. }
  194. function reportScopeError(scope) {
  195. throw new ParseError(scope.index, scope.line, scope.column, scope.type, scope.params);
  196. }
  197. function reportMessageAt(index, line, column, type, ...params) {
  198. throw new ParseError(index, line, column, type, ...params);
  199. }
  200. function reportScannerError(index, line, column, type) {
  201. throw new ParseError(index, line, column, type);
  202. }
  203. const unicodeLookup = ((compressed, lookup) => {
  204. const result = new Uint32Array(104448);
  205. let index = 0;
  206. let subIndex = 0;
  207. while (index < 3540) {
  208. const inst = compressed[index++];
  209. if (inst < 0) {
  210. subIndex -= inst;
  211. }
  212. else {
  213. let code = compressed[index++];
  214. if (inst & 2)
  215. code = lookup[code];
  216. if (inst & 1) {
  217. result.fill(code, subIndex, subIndex += compressed[index++]);
  218. }
  219. else {
  220. result[subIndex++] = code;
  221. }
  222. }
  223. }
  224. return result;
  225. })([-1, 2, 24, 2, 25, 2, 5, -1, 0, 77595648, 3, 44, 2, 3, 0, 14, 2, 57, 2, 58, 3, 0, 3, 0, 3168796671, 0, 4294956992, 2, 1, 2, 0, 2, 59, 3, 0, 4, 0, 4294966523, 3, 0, 4, 2, 16, 2, 60, 2, 0, 0, 4294836735, 0, 3221225471, 0, 4294901942, 2, 61, 0, 134152192, 3, 0, 2, 0, 4294951935, 3, 0, 2, 0, 2683305983, 0, 2684354047, 2, 17, 2, 0, 0, 4294961151, 3, 0, 2, 2, 19, 2, 0, 0, 608174079, 2, 0, 2, 131, 2, 6, 2, 56, -1, 2, 37, 0, 4294443263, 2, 1, 3, 0, 3, 0, 4294901711, 2, 39, 0, 4089839103, 0, 2961209759, 0, 1342439375, 0, 4294543342, 0, 3547201023, 0, 1577204103, 0, 4194240, 0, 4294688750, 2, 2, 0, 80831, 0, 4261478351, 0, 4294549486, 2, 2, 0, 2967484831, 0, 196559, 0, 3594373100, 0, 3288319768, 0, 8469959, 2, 194, 2, 3, 0, 3825204735, 0, 123747807, 0, 65487, 0, 4294828015, 0, 4092591615, 0, 1080049119, 0, 458703, 2, 3, 2, 0, 0, 2163244511, 0, 4227923919, 0, 4236247022, 2, 66, 0, 4284449919, 0, 851904, 2, 4, 2, 11, 0, 67076095, -1, 2, 67, 0, 1073741743, 0, 4093591391, -1, 0, 50331649, 0, 3265266687, 2, 32, 0, 4294844415, 0, 4278190047, 2, 18, 2, 129, -1, 3, 0, 2, 2, 21, 2, 0, 2, 9, 2, 0, 2, 14, 2, 15, 3, 0, 10, 2, 69, 2, 0, 2, 70, 2, 71, 2, 72, 2, 0, 2, 73, 2, 0, 2, 10, 0, 261632, 2, 23, 3, 0, 2, 2, 12, 2, 4, 3, 0, 18, 2, 74, 2, 5, 3, 0, 2, 2, 75, 0, 2088959, 2, 27, 2, 8, 0, 909311, 3, 0, 2, 0, 814743551, 2, 41, 0, 67057664, 3, 0, 2, 2, 40, 2, 0, 2, 28, 2, 0, 2, 29, 2, 7, 0, 268374015, 2, 26, 2, 49, 2, 0, 2, 76, 0, 134153215, -1, 2, 6, 2, 0, 2, 7, 0, 2684354559, 0, 67044351, 0, 3221160064, 0, 1, -1, 3, 0, 2, 2, 42, 0, 1046528, 3, 0, 3, 2, 8, 2, 0, 2, 51, 0, 4294960127, 2, 9, 2, 38, 2, 10, 0, 4294377472, 2, 11, 3, 0, 7, 0, 4227858431, 3, 0, 8, 2, 12, 2, 0, 2, 78, 2, 9, 2, 0, 2, 79, 2, 80, 2, 81, -1, 2, 124, 0, 1048577, 2, 82, 2, 13, -1, 2, 13, 0, 131042, 2, 83, 2, 84, 2, 85, 2, 0, 2, 33, -83, 2, 0, 2, 53, 2, 7, 3, 0, 4, 0, 1046559, 2, 0, 2, 14, 2, 0, 0, 2147516671, 2, 20, 3, 86, 2, 2, 0, -16, 2, 87, 0, 524222462, 2, 4, 2, 0, 0, 4269801471, 2, 4, 2, 0, 2, 15, 2, 77, 2, 16, 3, 0, 2, 2, 47, 2, 0, -1, 2, 17, -16, 3, 0, 206, -2, 3, 0, 655, 2, 18, 3, 0, 36, 2, 68, -1, 2, 17, 2, 9, 3, 0, 8, 2, 89, 2, 121, 2, 0, 0, 3220242431, 3, 0, 3, 2, 19, 2, 90, 2, 91, 3, 0, 2, 2, 92, 2, 0, 2, 93, 2, 94, 2, 0, 0, 4351, 2, 0, 2, 8, 3, 0, 2, 0, 67043391, 0, 3909091327, 2, 0, 2, 22, 2, 8, 2, 18, 3, 0, 2, 0, 67076097, 2, 7, 2, 0, 2, 20, 0, 67059711, 0, 4236247039, 3, 0, 2, 0, 939524103, 0, 8191999, 2, 97, 2, 98, 2, 15, 2, 21, 3, 0, 3, 0, 67057663, 3, 0, 349, 2, 99, 2, 100, 2, 6, -264, 3, 0, 11, 2, 22, 3, 0, 2, 2, 31, -1, 0, 3774349439, 2, 101, 2, 102, 3, 0, 2, 2, 19, 2, 103, 3, 0, 10, 2, 9, 2, 17, 2, 0, 2, 45, 2, 0, 2, 30, 2, 104, 2, 23, 0, 1638399, 2, 172, 2, 105, 3, 0, 3, 2, 18, 2, 24, 2, 25, 2, 5, 2, 26, 2, 0, 2, 7, 2, 106, -1, 2, 107, 2, 108, 2, 109, -1, 3, 0, 3, 2, 11, -2, 2, 0, 2, 27, -3, 2, 150, -4, 2, 18, 2, 0, 2, 35, 0, 1, 2, 0, 2, 62, 2, 28, 2, 11, 2, 9, 2, 0, 2, 110, -1, 3, 0, 4, 2, 9, 2, 21, 2, 111, 2, 6, 2, 0, 2, 112, 2, 0, 2, 48, -4, 3, 0, 9, 2, 20, 2, 29, 2, 30, -4, 2, 113, 2, 114, 2, 29, 2, 20, 2, 7, -2, 2, 115, 2, 29, 2, 31, -2, 2, 0, 2, 116, -2, 0, 4277137519, 0, 2269118463, -1, 3, 18, 2, -1, 2, 32, 2, 36, 2, 0, 3, 29, 2, 2, 34, 2, 19, -3, 3, 0, 2, 2, 33, -1, 2, 0, 2, 34, 2, 0, 2, 34, 2, 0, 2, 46, -10, 2, 0, 0, 203775, -2, 2, 18, 2, 43, 2, 35, -2, 2, 17, 2, 117, 2, 20, 3, 0, 2, 2, 36, 0, 2147549120, 2, 0, 2, 11, 2, 17, 2, 135, 2, 0, 2, 37, 2, 52, 0, 5242879, 3, 0, 2, 0, 402644511, -1, 2, 120, 0, 1090519039, -2, 2, 122, 2, 38, 2, 0, 0, 67045375, 2, 39, 0, 4226678271, 0, 3766565279, 0, 2039759, -4, 3, 0, 2, 0, 3288270847, 0, 3, 3, 0, 2, 0, 67043519, -5, 2, 0, 0, 4282384383, 0, 1056964609, -1, 3, 0, 2, 0, 67043345, -1, 2, 0, 2, 40, 2, 41, -1, 2, 10, 2, 42, -6, 2, 0, 2, 11, -3, 3, 0, 2, 0, 2147484671, 2, 125, 0, 4190109695, 2, 50, -2, 2, 126, 0, 4244635647, 0, 27, 2, 0, 2, 7, 2, 43, 2, 0, 2, 63, -1, 2, 0, 2, 40, -8, 2, 54, 2, 44, 0, 67043329, 2, 127, 2, 45, 0, 8388351, -2, 2, 128, 0, 3028287487, 2, 46, 2, 130, 0, 33259519, 2, 41, -9, 2, 20, -5, 2, 64, -2, 3, 0, 28, 2, 31, -3, 3, 0, 3, 2, 47, 3, 0, 6, 2, 48, -85, 3, 0, 33, 2, 47, -126, 3, 0, 18, 2, 36, -269, 3, 0, 17, 2, 40, 2, 7, 2, 41, -2, 2, 17, 2, 49, 2, 0, 2, 20, 2, 50, 2, 132, 2, 23, -21, 3, 0, 2, -4, 3, 0, 2, 0, 4294936575, 2, 0, 0, 4294934783, -2, 0, 196635, 3, 0, 191, 2, 51, 3, 0, 38, 2, 29, -1, 2, 33, -279, 3, 0, 8, 2, 7, -1, 2, 133, 2, 52, 3, 0, 11, 2, 6, -72, 3, 0, 3, 2, 134, 0, 1677656575, -166, 0, 4161266656, 0, 4071, 0, 15360, -4, 0, 28, -13, 3, 0, 2, 2, 37, 2, 0, 2, 136, 2, 137, 2, 55, 2, 0, 2, 138, 2, 139, 2, 140, 3, 0, 10, 2, 141, 2, 142, 2, 15, 3, 37, 2, 3, 53, 2, 3, 54, 2, 0, 4294954999, 2, 0, -16, 2, 0, 2, 88, 2, 0, 0, 2105343, 0, 4160749584, 0, 65534, -42, 0, 4194303871, 0, 2011, -6, 2, 0, 0, 1073684479, 0, 17407, -11, 2, 0, 2, 31, -40, 3, 0, 6, 0, 8323103, -1, 3, 0, 2, 2, 42, -37, 2, 55, 2, 144, 2, 145, 2, 146, 2, 147, 2, 148, -105, 2, 24, -32, 3, 0, 1334, 2, 9, -1, 3, 0, 129, 2, 27, 3, 0, 6, 2, 9, 3, 0, 180, 2, 149, 3, 0, 233, 0, 1, -96, 3, 0, 16, 2, 9, -47, 3, 0, 154, 2, 56, -22381, 3, 0, 7, 2, 23, -6130, 3, 5, 2, -1, 0, 69207040, 3, 44, 2, 3, 0, 14, 2, 57, 2, 58, -3, 0, 3168731136, 0, 4294956864, 2, 1, 2, 0, 2, 59, 3, 0, 4, 0, 4294966275, 3, 0, 4, 2, 16, 2, 60, 2, 0, 2, 33, -1, 2, 17, 2, 61, -1, 2, 0, 2, 56, 0, 4294885376, 3, 0, 2, 0, 3145727, 0, 2617294944, 0, 4294770688, 2, 23, 2, 62, 3, 0, 2, 0, 131135, 2, 95, 0, 70256639, 0, 71303167, 0, 272, 2, 40, 2, 56, -1, 2, 37, 2, 30, -1, 2, 96, 2, 63, 0, 4278255616, 0, 4294836227, 0, 4294549473, 0, 600178175, 0, 2952806400, 0, 268632067, 0, 4294543328, 0, 57540095, 0, 1577058304, 0, 1835008, 0, 4294688736, 2, 65, 2, 64, 0, 33554435, 2, 123, 2, 65, 2, 151, 0, 131075, 0, 3594373096, 0, 67094296, 2, 64, -1, 0, 4294828000, 0, 603979263, 2, 160, 0, 3, 0, 4294828001, 0, 602930687, 2, 183, 0, 393219, 0, 4294828016, 0, 671088639, 0, 2154840064, 0, 4227858435, 0, 4236247008, 2, 66, 2, 36, -1, 2, 4, 0, 917503, 2, 36, -1, 2, 67, 0, 537788335, 0, 4026531935, -1, 0, 1, -1, 2, 32, 2, 68, 0, 7936, -3, 2, 0, 0, 2147485695, 0, 1010761728, 0, 4292984930, 0, 16387, 2, 0, 2, 14, 2, 15, 3, 0, 10, 2, 69, 2, 0, 2, 70, 2, 71, 2, 72, 2, 0, 2, 73, 2, 0, 2, 11, -1, 2, 23, 3, 0, 2, 2, 12, 2, 4, 3, 0, 18, 2, 74, 2, 5, 3, 0, 2, 2, 75, 0, 253951, 3, 19, 2, 0, 122879, 2, 0, 2, 8, 0, 276824064, -2, 3, 0, 2, 2, 40, 2, 0, 0, 4294903295, 2, 0, 2, 29, 2, 7, -1, 2, 17, 2, 49, 2, 0, 2, 76, 2, 41, -1, 2, 20, 2, 0, 2, 27, -2, 0, 128, -2, 2, 77, 2, 8, 0, 4064, -1, 2, 119, 0, 4227907585, 2, 0, 2, 118, 2, 0, 2, 48, 2, 173, 2, 9, 2, 38, 2, 10, -1, 0, 74440192, 3, 0, 6, -2, 3, 0, 8, 2, 12, 2, 0, 2, 78, 2, 9, 2, 0, 2, 79, 2, 80, 2, 81, -3, 2, 82, 2, 13, -3, 2, 83, 2, 84, 2, 85, 2, 0, 2, 33, -83, 2, 0, 2, 53, 2, 7, 3, 0, 4, 0, 817183, 2, 0, 2, 14, 2, 0, 0, 33023, 2, 20, 3, 86, 2, -17, 2, 87, 0, 524157950, 2, 4, 2, 0, 2, 88, 2, 4, 2, 0, 2, 15, 2, 77, 2, 16, 3, 0, 2, 2, 47, 2, 0, -1, 2, 17, -16, 3, 0, 206, -2, 3, 0, 655, 2, 18, 3, 0, 36, 2, 68, -1, 2, 17, 2, 9, 3, 0, 8, 2, 89, 0, 3072, 2, 0, 0, 2147516415, 2, 9, 3, 0, 2, 2, 23, 2, 90, 2, 91, 3, 0, 2, 2, 92, 2, 0, 2, 93, 2, 94, 0, 4294965179, 0, 7, 2, 0, 2, 8, 2, 91, 2, 8, -1, 0, 1761345536, 2, 95, 0, 4294901823, 2, 36, 2, 18, 2, 96, 2, 34, 2, 166, 0, 2080440287, 2, 0, 2, 33, 2, 143, 0, 3296722943, 2, 0, 0, 1046675455, 0, 939524101, 0, 1837055, 2, 97, 2, 98, 2, 15, 2, 21, 3, 0, 3, 0, 7, 3, 0, 349, 2, 99, 2, 100, 2, 6, -264, 3, 0, 11, 2, 22, 3, 0, 2, 2, 31, -1, 0, 2700607615, 2, 101, 2, 102, 3, 0, 2, 2, 19, 2, 103, 3, 0, 10, 2, 9, 2, 17, 2, 0, 2, 45, 2, 0, 2, 30, 2, 104, -3, 2, 105, 3, 0, 3, 2, 18, -1, 3, 5, 2, 2, 26, 2, 0, 2, 7, 2, 106, -1, 2, 107, 2, 108, 2, 109, -1, 3, 0, 3, 2, 11, -2, 2, 0, 2, 27, -8, 2, 18, 2, 0, 2, 35, -1, 2, 0, 2, 62, 2, 28, 2, 29, 2, 9, 2, 0, 2, 110, -1, 3, 0, 4, 2, 9, 2, 17, 2, 111, 2, 6, 2, 0, 2, 112, 2, 0, 2, 48, -4, 3, 0, 9, 2, 20, 2, 29, 2, 30, -4, 2, 113, 2, 114, 2, 29, 2, 20, 2, 7, -2, 2, 115, 2, 29, 2, 31, -2, 2, 0, 2, 116, -2, 0, 4277075969, 2, 29, -1, 3, 18, 2, -1, 2, 32, 2, 117, 2, 0, 3, 29, 2, 2, 34, 2, 19, -3, 3, 0, 2, 2, 33, -1, 2, 0, 2, 34, 2, 0, 2, 34, 2, 0, 2, 48, -10, 2, 0, 0, 197631, -2, 2, 18, 2, 43, 2, 118, -2, 2, 17, 2, 117, 2, 20, 2, 119, 2, 51, -2, 2, 119, 2, 23, 2, 17, 2, 33, 2, 119, 2, 36, 0, 4294901904, 0, 4718591, 2, 119, 2, 34, 0, 335544350, -1, 2, 120, 2, 121, -2, 2, 122, 2, 38, 2, 7, -1, 2, 123, 2, 65, 0, 3758161920, 0, 3, -4, 2, 0, 2, 27, 0, 2147485568, 0, 3, 2, 0, 2, 23, 0, 176, -5, 2, 0, 2, 47, 2, 186, -1, 2, 0, 2, 23, 2, 197, -1, 2, 0, 0, 16779263, -2, 2, 11, -7, 2, 0, 2, 121, -3, 3, 0, 2, 2, 124, 2, 125, 0, 2147549183, 0, 2, -2, 2, 126, 2, 35, 0, 10, 0, 4294965249, 0, 67633151, 0, 4026597376, 2, 0, 0, 536871935, -1, 2, 0, 2, 40, -8, 2, 54, 2, 47, 0, 1, 2, 127, 2, 23, -3, 2, 128, 2, 35, 2, 129, 2, 130, 0, 16778239, -10, 2, 34, -5, 2, 64, -2, 3, 0, 28, 2, 31, -3, 3, 0, 3, 2, 47, 3, 0, 6, 2, 48, -85, 3, 0, 33, 2, 47, -126, 3, 0, 18, 2, 36, -269, 3, 0, 17, 2, 40, 2, 7, -3, 2, 17, 2, 131, 2, 0, 2, 23, 2, 48, 2, 132, 2, 23, -21, 3, 0, 2, -4, 3, 0, 2, 0, 67583, -1, 2, 103, -2, 0, 11, 3, 0, 191, 2, 51, 3, 0, 38, 2, 29, -1, 2, 33, -279, 3, 0, 8, 2, 7, -1, 2, 133, 2, 52, 3, 0, 11, 2, 6, -72, 3, 0, 3, 2, 134, 2, 135, -187, 3, 0, 2, 2, 37, 2, 0, 2, 136, 2, 137, 2, 55, 2, 0, 2, 138, 2, 139, 2, 140, 3, 0, 10, 2, 141, 2, 142, 2, 15, 3, 37, 2, 3, 53, 2, 3, 54, 2, 2, 143, -73, 2, 0, 0, 1065361407, 0, 16384, -11, 2, 0, 2, 121, -40, 3, 0, 6, 2, 117, -1, 3, 0, 2, 0, 2063, -37, 2, 55, 2, 144, 2, 145, 2, 146, 2, 147, 2, 148, -138, 3, 0, 1334, 2, 9, -1, 3, 0, 129, 2, 27, 3, 0, 6, 2, 9, 3, 0, 180, 2, 149, 3, 0, 233, 0, 1, -96, 3, 0, 16, 2, 9, -47, 3, 0, 154, 2, 56, -28517, 2, 0, 0, 1, -1, 2, 124, 2, 0, 0, 8193, -21, 2, 193, 0, 10255, 0, 4, -11, 2, 64, 2, 171, -1, 0, 71680, -1, 2, 161, 0, 4292900864, 0, 805306431, -5, 2, 150, -1, 2, 157, -1, 0, 6144, -2, 2, 127, -1, 2, 154, -1, 0, 2147532800, 2, 151, 2, 165, 2, 0, 2, 164, 0, 524032, 0, 4, -4, 2, 190, 0, 205128192, 0, 1333757536, 0, 2147483696, 0, 423953, 0, 747766272, 0, 2717763192, 0, 4286578751, 0, 278545, 2, 152, 0, 4294886464, 0, 33292336, 0, 417809, 2, 152, 0, 1327482464, 0, 4278190128, 0, 700594195, 0, 1006647527, 0, 4286497336, 0, 4160749631, 2, 153, 0, 469762560, 0, 4171219488, 0, 8323120, 2, 153, 0, 202375680, 0, 3214918176, 0, 4294508592, 2, 153, -1, 0, 983584, 0, 48, 0, 58720273, 0, 3489923072, 0, 10517376, 0, 4293066815, 0, 1, 0, 2013265920, 2, 177, 2, 0, 0, 2089, 0, 3221225552, 0, 201375904, 2, 0, -2, 0, 256, 0, 122880, 0, 16777216, 2, 150, 0, 4160757760, 2, 0, -6, 2, 167, -11, 0, 3263218176, -1, 0, 49664, 0, 2160197632, 0, 8388802, -1, 0, 12713984, -1, 2, 154, 2, 159, 2, 178, -2, 2, 162, -20, 0, 3758096385, -2, 2, 155, 0, 4292878336, 2, 90, 2, 169, 0, 4294057984, -2, 2, 163, 2, 156, 2, 175, -2, 2, 155, -1, 2, 182, -1, 2, 170, 2, 124, 0, 4026593280, 0, 14, 0, 4292919296, -1, 2, 158, 0, 939588608, -1, 0, 805306368, -1, 2, 124, 0, 1610612736, 2, 156, 2, 157, 2, 4, 2, 0, -2, 2, 158, 2, 159, -3, 0, 267386880, -1, 2, 160, 0, 7168, -1, 0, 65024, 2, 154, 2, 161, 2, 179, -7, 2, 168, -8, 2, 162, -1, 0, 1426112704, 2, 163, -1, 2, 164, 0, 271581216, 0, 2149777408, 2, 23, 2, 161, 2, 124, 0, 851967, 2, 180, -1, 2, 23, 2, 181, -4, 2, 158, -20, 2, 195, 2, 165, -56, 0, 3145728, 2, 185, -4, 2, 166, 2, 124, -4, 0, 32505856, -1, 2, 167, -1, 0, 2147385088, 2, 90, 1, 2155905152, 2, -3, 2, 103, 2, 0, 2, 168, -2, 2, 169, -6, 2, 170, 0, 4026597375, 0, 1, -1, 0, 1, -1, 2, 171, -3, 2, 117, 2, 64, -2, 2, 166, -2, 2, 176, 2, 124, -878, 2, 159, -36, 2, 172, -1, 2, 201, -10, 2, 188, -5, 2, 174, -6, 0, 4294965251, 2, 27, -1, 2, 173, -1, 2, 174, -2, 0, 4227874752, -3, 0, 2146435072, 2, 159, -2, 0, 1006649344, 2, 124, -1, 2, 90, 0, 201375744, -3, 0, 134217720, 2, 90, 0, 4286677377, 0, 32896, -1, 2, 158, -3, 2, 175, -349, 2, 176, 0, 1920, 2, 177, 3, 0, 264, -11, 2, 157, -2, 2, 178, 2, 0, 0, 520617856, 0, 2692743168, 0, 36, -3, 0, 524284, -11, 2, 23, -1, 2, 187, -1, 2, 184, 0, 3221291007, 2, 178, -1, 2, 202, 0, 2158720, -3, 2, 159, 0, 1, -4, 2, 124, 0, 3808625411, 0, 3489628288, 2, 200, 0, 1207959680, 0, 3221274624, 2, 0, -3, 2, 179, 0, 120, 0, 7340032, -2, 2, 180, 2, 4, 2, 23, 2, 163, 3, 0, 4, 2, 159, -1, 2, 181, 2, 177, -1, 0, 8176, 2, 182, 2, 179, 2, 183, -1, 0, 4290773232, 2, 0, -4, 2, 163, 2, 189, 0, 15728640, 2, 177, -1, 2, 161, -1, 0, 4294934512, 3, 0, 4, -9, 2, 90, 2, 170, 2, 184, 3, 0, 4, 0, 704, 0, 1849688064, 2, 185, -1, 2, 124, 0, 4294901887, 2, 0, 0, 130547712, 0, 1879048192, 2, 199, 3, 0, 2, -1, 2, 186, 2, 187, -1, 0, 17829776, 0, 2025848832, 0, 4261477888, -2, 2, 0, -1, 0, 4286580608, -1, 0, 29360128, 2, 192, 0, 16252928, 0, 3791388672, 2, 38, 3, 0, 2, -2, 2, 196, 2, 0, -1, 2, 103, -1, 0, 66584576, -1, 2, 191, 3, 0, 9, 2, 124, -1, 0, 4294755328, 3, 0, 2, -1, 2, 161, 2, 178, 3, 0, 2, 2, 23, 2, 188, 2, 90, -2, 0, 245760, 0, 2147418112, -1, 2, 150, 2, 203, 0, 4227923456, -1, 2, 164, 2, 161, 2, 90, -3, 0, 4292870145, 0, 262144, 2, 124, 3, 0, 2, 0, 1073758848, 2, 189, -1, 0, 4227921920, 2, 190, 0, 68289024, 0, 528402016, 0, 4292927536, 3, 0, 4, -2, 0, 268435456, 2, 91, -2, 2, 191, 3, 0, 5, -1, 2, 192, 2, 163, 2, 0, -2, 0, 4227923936, 2, 62, -1, 2, 155, 2, 95, 2, 0, 2, 154, 2, 158, 3, 0, 6, -1, 2, 177, 3, 0, 3, -2, 0, 2146959360, 0, 9440640, 0, 104857600, 0, 4227923840, 3, 0, 2, 0, 768, 2, 193, 2, 77, -2, 2, 161, -2, 2, 119, -1, 2, 155, 3, 0, 8, 0, 512, 0, 8388608, 2, 194, 2, 172, 2, 187, 0, 4286578944, 3, 0, 2, 0, 1152, 0, 1266679808, 2, 191, 0, 576, 0, 4261707776, 2, 95, 3, 0, 9, 2, 155, 3, 0, 5, 2, 16, -1, 0, 2147221504, -28, 2, 178, 3, 0, 3, -3, 0, 4292902912, -6, 2, 96, 3, 0, 85, -33, 0, 4294934528, 3, 0, 126, -18, 2, 195, 3, 0, 269, -17, 2, 155, 2, 124, 2, 198, 3, 0, 2, 2, 23, 0, 4290822144, -2, 0, 67174336, 0, 520093700, 2, 17, 3, 0, 21, -2, 2, 179, 3, 0, 3, -2, 0, 30720, -1, 0, 32512, 3, 0, 2, 0, 4294770656, -191, 2, 174, -38, 2, 170, 2, 0, 2, 196, 3, 0, 279, -8, 2, 124, 2, 0, 0, 4294508543, 0, 65295, -11, 2, 177, 3, 0, 72, -3, 0, 3758159872, 0, 201391616, 3, 0, 155, -7, 2, 170, -1, 0, 384, -1, 0, 133693440, -3, 2, 196, -2, 2, 26, 3, 0, 4, 2, 169, -2, 2, 90, 2, 155, 3, 0, 4, -2, 2, 164, -1, 2, 150, 0, 335552923, 2, 197, -1, 0, 538974272, 0, 2214592512, 0, 132000, -10, 0, 192, -8, 0, 12288, -21, 0, 134213632, 0, 4294901761, 3, 0, 42, 0, 100663424, 0, 4294965284, 3, 0, 6, -1, 0, 3221282816, 2, 198, 3, 0, 11, -1, 2, 199, 3, 0, 40, -6, 0, 4286578784, 2, 0, -2, 0, 1006694400, 3, 0, 24, 2, 35, -1, 2, 94, 3, 0, 2, 0, 1, 2, 163, 3, 0, 6, 2, 197, 0, 4110942569, 0, 1432950139, 0, 2701658217, 0, 4026532864, 0, 4026532881, 2, 0, 2, 45, 3, 0, 8, -1, 2, 158, -2, 2, 169, 0, 98304, 0, 65537, 2, 170, -5, 0, 4294950912, 2, 0, 2, 118, 0, 65528, 2, 177, 0, 4294770176, 2, 26, 3, 0, 4, -30, 2, 174, 0, 3758153728, -3, 2, 169, -2, 2, 155, 2, 188, 2, 158, -1, 2, 191, -1, 2, 161, 0, 4294754304, 3, 0, 2, -3, 0, 33554432, -2, 2, 200, -3, 2, 169, 0, 4175478784, 2, 201, 0, 4286643712, 0, 4286644216, 2, 0, -4, 2, 202, -1, 2, 165, 0, 4227923967, 3, 0, 32, -1334, 2, 163, 2, 0, -129, 2, 94, -6, 2, 163, -180, 2, 203, -233, 2, 4, 3, 0, 96, -16, 2, 163, 3, 0, 47, -154, 2, 165, 3, 0, 22381, -7, 2, 17, 3, 0, 6128], [4294967295, 4294967291, 4092460543, 4294828031, 4294967294, 134217726, 268435455, 2147483647, 1048575, 1073741823, 3892314111, 134217727, 1061158911, 536805376, 4294910143, 4160749567, 4294901759, 4294901760, 536870911, 262143, 8388607, 4294902783, 4294918143, 65535, 67043328, 2281701374, 4294967232, 2097151, 4294903807, 4194303, 255, 67108863, 4294967039, 511, 524287, 131071, 127, 4292870143, 4294902271, 4294549487, 33554431, 1023, 67047423, 4294901888, 4286578687, 4294770687, 67043583, 32767, 15, 2047999, 67043343, 16777215, 4294902000, 4294934527, 4294966783, 4294967279, 2047, 262083, 20511, 4290772991, 41943039, 493567, 4294959104, 603979775, 65536, 602799615, 805044223, 4294965206, 8191, 1031749119, 4294917631, 2134769663, 4286578493, 4282253311, 4294942719, 33540095, 4294905855, 4294967264, 2868854591, 1608515583, 265232348, 534519807, 2147614720, 1060109444, 4093640016, 17376, 2139062143, 224, 4169138175, 4294909951, 4286578688, 4294967292, 4294965759, 2044, 4292870144, 4294966272, 4294967280, 8289918, 4294934399, 4294901775, 4294965375, 1602223615, 4294967259, 4294443008, 268369920, 4292804608, 486341884, 4294963199, 3087007615, 1073692671, 4128527, 4279238655, 4294902015, 4294966591, 2445279231, 3670015, 3238002687, 31, 63, 4294967288, 4294705151, 4095, 3221208447, 4294549472, 2147483648, 4285526655, 4294966527, 4294705152, 4294966143, 64, 4294966719, 16383, 3774873592, 458752, 536807423, 67043839, 3758096383, 3959414372, 3755993023, 2080374783, 4294835295, 4294967103, 4160749565, 4087, 184024726, 2862017156, 1593309078, 268434431, 268434414, 4294901763, 536870912, 2952790016, 202506752, 139264, 402653184, 4261412864, 4227922944, 49152, 61440, 3758096384, 117440512, 65280, 3233808384, 3221225472, 2097152, 4294965248, 32768, 57152, 67108864, 4293918720, 4290772992, 25165824, 57344, 4227915776, 4278190080, 4227907584, 65520, 4026531840, 4227858432, 4160749568, 3758129152, 4294836224, 63488, 1073741824, 4294967040, 4194304, 251658240, 196608, 4294963200, 64512, 417808, 4227923712, 12582912, 50331648, 65472, 4294967168, 4294966784, 16, 4294917120, 2080374784, 4096, 65408, 524288, 65532]);
  226. function advanceChar(parser) {
  227. parser.column++;
  228. return (parser.currentChar = parser.source.charCodeAt(++parser.index));
  229. }
  230. function consumeMultiUnitCodePoint(parser, hi) {
  231. if ((hi & 0xfc00) !== 55296)
  232. return 0;
  233. const lo = parser.source.charCodeAt(parser.index + 1);
  234. if ((lo & 0xfc00) !== 0xdc00)
  235. return 0;
  236. hi = parser.currentChar = 65536 + ((hi & 0x3ff) << 10) + (lo & 0x3ff);
  237. if (((unicodeLookup[(hi >>> 5) + 0] >>> hi) & 31 & 1) === 0) {
  238. report(parser, 18, fromCodePoint(hi));
  239. }
  240. parser.index++;
  241. parser.column++;
  242. return 1;
  243. }
  244. function consumeLineFeed(parser, state) {
  245. parser.currentChar = parser.source.charCodeAt(++parser.index);
  246. parser.flags |= 1;
  247. if ((state & 4) === 0) {
  248. parser.column = 0;
  249. parser.line++;
  250. }
  251. }
  252. function scanNewLine(parser) {
  253. parser.flags |= 1;
  254. parser.currentChar = parser.source.charCodeAt(++parser.index);
  255. parser.column = 0;
  256. parser.line++;
  257. }
  258. function isExoticECMAScriptWhitespace(ch) {
  259. return (ch === 160 ||
  260. ch === 65279 ||
  261. ch === 133 ||
  262. ch === 5760 ||
  263. (ch >= 8192 && ch <= 8203) ||
  264. ch === 8239 ||
  265. ch === 8287 ||
  266. ch === 12288 ||
  267. ch === 8201 ||
  268. ch === 65519);
  269. }
  270. function fromCodePoint(codePoint) {
  271. return codePoint <= 65535
  272. ? String.fromCharCode(codePoint)
  273. : String.fromCharCode(codePoint >>> 10) + String.fromCharCode(codePoint & 0x3ff);
  274. }
  275. function toHex(code) {
  276. return code < 65 ? code - 48 : (code - 65 + 10) & 0xf;
  277. }
  278. function convertTokenType(t) {
  279. switch (t) {
  280. case 134283266:
  281. return 'NumericLiteral';
  282. case 134283267:
  283. return 'StringLiteral';
  284. case 86021:
  285. case 86022:
  286. return 'BooleanLiteral';
  287. case 86023:
  288. return 'NullLiteral';
  289. case 65540:
  290. return 'RegularExpression';
  291. case 67174408:
  292. case 67174409:
  293. case 132:
  294. return 'TemplateLiteral';
  295. default:
  296. if ((t & 143360) === 143360)
  297. return 'Identifier';
  298. if ((t & 4096) === 4096)
  299. return 'Keyword';
  300. return 'Punctuator';
  301. }
  302. }
  303. const CharTypes = [
  304. 0,
  305. 0,
  306. 0,
  307. 0,
  308. 0,
  309. 0,
  310. 0,
  311. 0,
  312. 0,
  313. 0,
  314. 8 | 1024,
  315. 0,
  316. 0,
  317. 8 | 2048,
  318. 0,
  319. 0,
  320. 0,
  321. 0,
  322. 0,
  323. 0,
  324. 0,
  325. 0,
  326. 0,
  327. 0,
  328. 0,
  329. 0,
  330. 0,
  331. 0,
  332. 0,
  333. 0,
  334. 0,
  335. 0,
  336. 0,
  337. 0,
  338. 8192,
  339. 0,
  340. 1 | 2,
  341. 0,
  342. 0,
  343. 8192,
  344. 0,
  345. 0,
  346. 0,
  347. 256,
  348. 0,
  349. 256 | 32768,
  350. 0,
  351. 0,
  352. 2 | 16 | 128 | 32 | 64,
  353. 2 | 16 | 128 | 32 | 64,
  354. 2 | 16 | 32 | 64,
  355. 2 | 16 | 32 | 64,
  356. 2 | 16 | 32 | 64,
  357. 2 | 16 | 32 | 64,
  358. 2 | 16 | 32 | 64,
  359. 2 | 16 | 32 | 64,
  360. 2 | 16 | 512 | 64,
  361. 2 | 16 | 512 | 64,
  362. 0,
  363. 0,
  364. 16384,
  365. 0,
  366. 0,
  367. 0,
  368. 0,
  369. 1 | 2 | 64,
  370. 1 | 2 | 64,
  371. 1 | 2 | 64,
  372. 1 | 2 | 64,
  373. 1 | 2 | 64,
  374. 1 | 2 | 64,
  375. 1 | 2,
  376. 1 | 2,
  377. 1 | 2,
  378. 1 | 2,
  379. 1 | 2,
  380. 1 | 2,
  381. 1 | 2,
  382. 1 | 2,
  383. 1 | 2,
  384. 1 | 2,
  385. 1 | 2,
  386. 1 | 2,
  387. 1 | 2,
  388. 1 | 2,
  389. 1 | 2,
  390. 1 | 2,
  391. 1 | 2,
  392. 1 | 2,
  393. 1 | 2,
  394. 1 | 2,
  395. 0,
  396. 1,
  397. 0,
  398. 0,
  399. 1 | 2 | 4096,
  400. 0,
  401. 1 | 2 | 4 | 64,
  402. 1 | 2 | 4 | 64,
  403. 1 | 2 | 4 | 64,
  404. 1 | 2 | 4 | 64,
  405. 1 | 2 | 4 | 64,
  406. 1 | 2 | 4 | 64,
  407. 1 | 2 | 4,
  408. 1 | 2 | 4,
  409. 1 | 2 | 4,
  410. 1 | 2 | 4,
  411. 1 | 2 | 4,
  412. 1 | 2 | 4,
  413. 1 | 2 | 4,
  414. 1 | 2 | 4,
  415. 1 | 2 | 4,
  416. 1 | 2 | 4,
  417. 1 | 2 | 4,
  418. 1 | 2 | 4,
  419. 1 | 2 | 4,
  420. 1 | 2 | 4,
  421. 1 | 2 | 4,
  422. 1 | 2 | 4,
  423. 1 | 2 | 4,
  424. 1 | 2 | 4,
  425. 1 | 2 | 4,
  426. 1 | 2 | 4,
  427. 16384,
  428. 0,
  429. 0,
  430. 0,
  431. 0
  432. ];
  433. const isIdStart = [
  434. 0,
  435. 0,
  436. 0,
  437. 0,
  438. 0,
  439. 0,
  440. 0,
  441. 0,
  442. 0,
  443. 0,
  444. 0,
  445. 0,
  446. 0,
  447. 0,
  448. 0,
  449. 0,
  450. 0,
  451. 0,
  452. 0,
  453. 0,
  454. 0,
  455. 0,
  456. 0,
  457. 0,
  458. 0,
  459. 0,
  460. 0,
  461. 0,
  462. 0,
  463. 0,
  464. 0,
  465. 0,
  466. 0,
  467. 0,
  468. 0,
  469. 0,
  470. 1,
  471. 0,
  472. 0,
  473. 0,
  474. 0,
  475. 0,
  476. 0,
  477. 0,
  478. 0,
  479. 0,
  480. 0,
  481. 0,
  482. 0,
  483. 0,
  484. 0,
  485. 0,
  486. 0,
  487. 0,
  488. 0,
  489. 0,
  490. 0,
  491. 0,
  492. 0,
  493. 0,
  494. 0,
  495. 0,
  496. 0,
  497. 0,
  498. 0,
  499. 1,
  500. 1,
  501. 1,
  502. 1,
  503. 1,
  504. 1,
  505. 1,
  506. 1,
  507. 1,
  508. 1,
  509. 1,
  510. 1,
  511. 1,
  512. 1,
  513. 1,
  514. 1,
  515. 1,
  516. 1,
  517. 1,
  518. 1,
  519. 1,
  520. 1,
  521. 1,
  522. 1,
  523. 1,
  524. 1,
  525. 0,
  526. 0,
  527. 0,
  528. 0,
  529. 1,
  530. 0,
  531. 1,
  532. 1,
  533. 1,
  534. 1,
  535. 1,
  536. 1,
  537. 1,
  538. 1,
  539. 1,
  540. 1,
  541. 1,
  542. 1,
  543. 1,
  544. 1,
  545. 1,
  546. 1,
  547. 1,
  548. 1,
  549. 1,
  550. 1,
  551. 1,
  552. 1,
  553. 1,
  554. 1,
  555. 1,
  556. 1,
  557. 0,
  558. 0,
  559. 0,
  560. 0,
  561. 0
  562. ];
  563. const isIdPart = [
  564. 0,
  565. 0,
  566. 0,
  567. 0,
  568. 0,
  569. 0,
  570. 0,
  571. 0,
  572. 0,
  573. 0,
  574. 0,
  575. 0,
  576. 0,
  577. 0,
  578. 0,
  579. 0,
  580. 0,
  581. 0,
  582. 0,
  583. 0,
  584. 0,
  585. 0,
  586. 0,
  587. 0,
  588. 0,
  589. 0,
  590. 0,
  591. 0,
  592. 0,
  593. 0,
  594. 0,
  595. 0,
  596. 0,
  597. 0,
  598. 0,
  599. 0,
  600. 1,
  601. 0,
  602. 0,
  603. 0,
  604. 0,
  605. 0,
  606. 0,
  607. 0,
  608. 0,
  609. 0,
  610. 0,
  611. 0,
  612. 1,
  613. 1,
  614. 1,
  615. 1,
  616. 1,
  617. 1,
  618. 1,
  619. 1,
  620. 1,
  621. 1,
  622. 0,
  623. 0,
  624. 0,
  625. 0,
  626. 0,
  627. 0,
  628. 0,
  629. 1,
  630. 1,
  631. 1,
  632. 1,
  633. 1,
  634. 1,
  635. 1,
  636. 1,
  637. 1,
  638. 1,
  639. 1,
  640. 1,
  641. 1,
  642. 1,
  643. 1,
  644. 1,
  645. 1,
  646. 1,
  647. 1,
  648. 1,
  649. 1,
  650. 1,
  651. 1,
  652. 1,
  653. 1,
  654. 1,
  655. 0,
  656. 0,
  657. 0,
  658. 0,
  659. 1,
  660. 0,
  661. 1,
  662. 1,
  663. 1,
  664. 1,
  665. 1,
  666. 1,
  667. 1,
  668. 1,
  669. 1,
  670. 1,
  671. 1,
  672. 1,
  673. 1,
  674. 1,
  675. 1,
  676. 1,
  677. 1,
  678. 1,
  679. 1,
  680. 1,
  681. 1,
  682. 1,
  683. 1,
  684. 1,
  685. 1,
  686. 1,
  687. 0,
  688. 0,
  689. 0,
  690. 0,
  691. 0
  692. ];
  693. function isIdentifierStart(code) {
  694. return code <= 0x7F
  695. ? isIdStart[code]
  696. : (unicodeLookup[(code >>> 5) + 34816] >>> code) & 31 & 1;
  697. }
  698. function isIdentifierPart(code) {
  699. return code <= 0x7F
  700. ? isIdPart[code]
  701. : (unicodeLookup[(code >>> 5) + 0] >>> code) & 31 & 1 || (code === 8204 || code === 8205);
  702. }
  703. const CommentTypes = ['SingleLine', 'MultiLine', 'HTMLOpen', 'HTMLClose', 'HashbangComment'];
  704. function skipHashBang(parser) {
  705. const source = parser.source;
  706. if (parser.currentChar === 35 && source.charCodeAt(parser.index + 1) === 33) {
  707. advanceChar(parser);
  708. advanceChar(parser);
  709. skipSingleLineComment(parser, source, 0, 4, parser.tokenPos, parser.linePos, parser.colPos);
  710. }
  711. }
  712. function skipSingleHTMLComment(parser, source, state, context, type, start, line, column) {
  713. if (context & 2048)
  714. report(parser, 0);
  715. return skipSingleLineComment(parser, source, state, type, start, line, column);
  716. }
  717. function skipSingleLineComment(parser, source, state, type, start, line, column) {
  718. const { index } = parser;
  719. parser.tokenPos = parser.index;
  720. parser.linePos = parser.line;
  721. parser.colPos = parser.column;
  722. while (parser.index < parser.end) {
  723. if (CharTypes[parser.currentChar] & 8) {
  724. const isCR = parser.currentChar === 13;
  725. scanNewLine(parser);
  726. if (isCR && parser.index < parser.end && parser.currentChar === 10)
  727. parser.currentChar = source.charCodeAt(++parser.index);
  728. break;
  729. }
  730. else if ((parser.currentChar ^ 8232) <= 1) {
  731. scanNewLine(parser);
  732. break;
  733. }
  734. advanceChar(parser);
  735. parser.tokenPos = parser.index;
  736. parser.linePos = parser.line;
  737. parser.colPos = parser.column;
  738. }
  739. if (parser.onComment) {
  740. const loc = {
  741. start: {
  742. line,
  743. column
  744. },
  745. end: {
  746. line: parser.linePos,
  747. column: parser.colPos
  748. }
  749. };
  750. parser.onComment(CommentTypes[type & 0xff], source.slice(index, parser.tokenPos), start, parser.tokenPos, loc);
  751. }
  752. return state | 1;
  753. }
  754. function skipMultiLineComment(parser, source, state) {
  755. const { index } = parser;
  756. while (parser.index < parser.end) {
  757. if (parser.currentChar < 0x2b) {
  758. let skippedOneAsterisk = false;
  759. while (parser.currentChar === 42) {
  760. if (!skippedOneAsterisk) {
  761. state &= ~4;
  762. skippedOneAsterisk = true;
  763. }
  764. if (advanceChar(parser) === 47) {
  765. advanceChar(parser);
  766. if (parser.onComment) {
  767. const loc = {
  768. start: {
  769. line: parser.linePos,
  770. column: parser.colPos
  771. },
  772. end: {
  773. line: parser.line,
  774. column: parser.column
  775. }
  776. };
  777. parser.onComment(CommentTypes[1 & 0xff], source.slice(index, parser.index - 2), index - 2, parser.index, loc);
  778. }
  779. parser.tokenPos = parser.index;
  780. parser.linePos = parser.line;
  781. parser.colPos = parser.column;
  782. return state;
  783. }
  784. }
  785. if (skippedOneAsterisk) {
  786. continue;
  787. }
  788. if (CharTypes[parser.currentChar] & 8) {
  789. if (parser.currentChar === 13) {
  790. state |= 1 | 4;
  791. scanNewLine(parser);
  792. }
  793. else {
  794. consumeLineFeed(parser, state);
  795. state = (state & ~4) | 1;
  796. }
  797. }
  798. else {
  799. advanceChar(parser);
  800. }
  801. }
  802. else if ((parser.currentChar ^ 8232) <= 1) {
  803. state = (state & ~4) | 1;
  804. scanNewLine(parser);
  805. }
  806. else {
  807. state &= ~4;
  808. advanceChar(parser);
  809. }
  810. }
  811. report(parser, 16);
  812. }
  813. function scanRegularExpression(parser, context) {
  814. const bodyStart = parser.index;
  815. let preparseState = 0;
  816. loop: while (true) {
  817. const ch = parser.currentChar;
  818. advanceChar(parser);
  819. if (preparseState & 1) {
  820. preparseState &= ~1;
  821. }
  822. else {
  823. switch (ch) {
  824. case 47:
  825. if (!preparseState)
  826. break loop;
  827. else
  828. break;
  829. case 92:
  830. preparseState |= 1;
  831. break;
  832. case 91:
  833. preparseState |= 2;
  834. break;
  835. case 93:
  836. preparseState &= 1;
  837. break;
  838. case 13:
  839. case 10:
  840. case 8232:
  841. case 8233:
  842. report(parser, 32);
  843. }
  844. }
  845. if (parser.index >= parser.source.length) {
  846. return report(parser, 32);
  847. }
  848. }
  849. const bodyEnd = parser.index - 1;
  850. let mask = 0;
  851. let char = parser.currentChar;
  852. const { index: flagStart } = parser;
  853. while (isIdentifierPart(char)) {
  854. switch (char) {
  855. case 103:
  856. if (mask & 2)
  857. report(parser, 34, 'g');
  858. mask |= 2;
  859. break;
  860. case 105:
  861. if (mask & 1)
  862. report(parser, 34, 'i');
  863. mask |= 1;
  864. break;
  865. case 109:
  866. if (mask & 4)
  867. report(parser, 34, 'm');
  868. mask |= 4;
  869. break;
  870. case 117:
  871. if (mask & 16)
  872. report(parser, 34, 'g');
  873. mask |= 16;
  874. break;
  875. case 121:
  876. if (mask & 8)
  877. report(parser, 34, 'y');
  878. mask |= 8;
  879. break;
  880. case 115:
  881. if (mask & 12)
  882. report(parser, 34, 's');
  883. mask |= 12;
  884. break;
  885. default:
  886. report(parser, 33);
  887. }
  888. char = advanceChar(parser);
  889. }
  890. const flags = parser.source.slice(flagStart, parser.index);
  891. const pattern = parser.source.slice(bodyStart, bodyEnd);
  892. parser.tokenRegExp = { pattern, flags };
  893. if (context & 512)
  894. parser.tokenRaw = parser.source.slice(parser.tokenPos, parser.index);
  895. parser.tokenValue = validate(parser, pattern, flags);
  896. return 65540;
  897. }
  898. function validate(parser, pattern, flags) {
  899. try {
  900. return new RegExp(pattern, flags);
  901. }
  902. catch (e) {
  903. report(parser, 32);
  904. }
  905. }
  906. function scanString(parser, context, quote) {
  907. const { index: start } = parser;
  908. let ret = '';
  909. let char = advanceChar(parser);
  910. let marker = parser.index;
  911. while ((CharTypes[char] & 8) === 0) {
  912. if (char === quote) {
  913. ret += parser.source.slice(marker, parser.index);
  914. advanceChar(parser);
  915. if (context & 512)
  916. parser.tokenRaw = parser.source.slice(start, parser.index);
  917. parser.tokenValue = ret;
  918. return 134283267;
  919. }
  920. if ((char & 8) === 8 && char === 92) {
  921. ret += parser.source.slice(marker, parser.index);
  922. char = advanceChar(parser);
  923. if (char < 0x7f || char === 8232 || char === 8233) {
  924. const code = parseEscape(parser, context, char);
  925. if (code >= 0)
  926. ret += fromCodePoint(code);
  927. else
  928. handleStringError(parser, code, 0);
  929. }
  930. else {
  931. ret += fromCodePoint(char);
  932. }
  933. marker = parser.index + 1;
  934. }
  935. if (parser.index >= parser.end)
  936. report(parser, 14);
  937. char = advanceChar(parser);
  938. }
  939. report(parser, 14);
  940. }
  941. function parseEscape(parser, context, first) {
  942. switch (first) {
  943. case 98:
  944. return 8;
  945. case 102:
  946. return 12;
  947. case 114:
  948. return 13;
  949. case 110:
  950. return 10;
  951. case 116:
  952. return 9;
  953. case 118:
  954. return 11;
  955. case 13: {
  956. if (parser.index < parser.end) {
  957. const nextChar = parser.source.charCodeAt(parser.index + 1);
  958. if (nextChar === 10) {
  959. parser.index = parser.index + 1;
  960. parser.currentChar = nextChar;
  961. }
  962. }
  963. }
  964. case 10:
  965. case 8232:
  966. case 8233:
  967. parser.column = -1;
  968. parser.line++;
  969. return -1;
  970. case 48:
  971. case 49:
  972. case 50:
  973. case 51: {
  974. let code = first - 48;
  975. let index = parser.index + 1;
  976. let column = parser.column + 1;
  977. if (index < parser.end) {
  978. const next = parser.source.charCodeAt(index);
  979. if ((CharTypes[next] & 32) === 0) {
  980. if ((code !== 0 || CharTypes[next] & 512) && context & 1024)
  981. return -2;
  982. }
  983. else if (context & 1024) {
  984. return -2;
  985. }
  986. else {
  987. parser.currentChar = next;
  988. code = (code << 3) | (next - 48);
  989. index++;
  990. column++;
  991. if (index < parser.end) {
  992. const next = parser.source.charCodeAt(index);
  993. if (CharTypes[next] & 32) {
  994. parser.currentChar = next;
  995. code = (code << 3) | (next - 48);
  996. index++;
  997. column++;
  998. }
  999. }
  1000. parser.flags |= 64;
  1001. parser.index = index - 1;
  1002. parser.column = column - 1;
  1003. }
  1004. }
  1005. return code;
  1006. }
  1007. case 52:
  1008. case 53:
  1009. case 54:
  1010. case 55: {
  1011. if (context & 1024)
  1012. return -2;
  1013. let code = first - 48;
  1014. const index = parser.index + 1;
  1015. const column = parser.column + 1;
  1016. if (index < parser.end) {
  1017. const next = parser.source.charCodeAt(index);
  1018. if (CharTypes[next] & 32) {
  1019. code = (code << 3) | (next - 48);
  1020. parser.currentChar = next;
  1021. parser.index = index;
  1022. parser.column = column;
  1023. }
  1024. }
  1025. parser.flags |= 64;
  1026. return code;
  1027. }
  1028. case 120: {
  1029. const ch1 = advanceChar(parser);
  1030. if ((CharTypes[ch1] & 64) === 0)
  1031. return -4;
  1032. const hi = toHex(ch1);
  1033. const ch2 = advanceChar(parser);
  1034. if ((CharTypes[ch2] & 64) === 0)
  1035. return -4;
  1036. const lo = toHex(ch2);
  1037. return (hi << 4) | lo;
  1038. }
  1039. case 117: {
  1040. const ch = advanceChar(parser);
  1041. if (parser.currentChar === 123) {
  1042. let code = 0;
  1043. while ((CharTypes[advanceChar(parser)] & 64) !== 0) {
  1044. code = (code << 4) | toHex(parser.currentChar);
  1045. if (code > 1114111)
  1046. return -5;
  1047. }
  1048. if (parser.currentChar < 1 || parser.currentChar !== 125) {
  1049. return -4;
  1050. }
  1051. return code;
  1052. }
  1053. else {
  1054. if ((CharTypes[ch] & 64) === 0)
  1055. return -4;
  1056. const ch2 = parser.source.charCodeAt(parser.index + 1);
  1057. if ((CharTypes[ch2] & 64) === 0)
  1058. return -4;
  1059. const ch3 = parser.source.charCodeAt(parser.index + 2);
  1060. if ((CharTypes[ch3] & 64) === 0)
  1061. return -4;
  1062. const ch4 = parser.source.charCodeAt(parser.index + 3);
  1063. if ((CharTypes[ch4] & 64) === 0)
  1064. return -4;
  1065. parser.index += 3;
  1066. parser.column += 3;
  1067. parser.currentChar = parser.source.charCodeAt(parser.index);
  1068. return (toHex(ch) << 12) | (toHex(ch2) << 8) | (toHex(ch3) << 4) | toHex(ch4);
  1069. }
  1070. }
  1071. case 56:
  1072. case 57:
  1073. if ((context & 256) === 0)
  1074. return -3;
  1075. default:
  1076. return first;
  1077. }
  1078. }
  1079. function handleStringError(state, code, isTemplate) {
  1080. switch (code) {
  1081. case -1:
  1082. return;
  1083. case -2:
  1084. report(state, isTemplate ? 2 : 1);
  1085. case -3:
  1086. report(state, 13);
  1087. case -4:
  1088. report(state, 6);
  1089. case -5:
  1090. report(state, 101);
  1091. }
  1092. }
  1093. function scanTemplate(parser, context) {
  1094. const { index: start } = parser;
  1095. let token = 67174409;
  1096. let ret = '';
  1097. let char = advanceChar(parser);
  1098. while (char !== 96) {
  1099. if (char === 36 && parser.source.charCodeAt(parser.index + 1) === 123) {
  1100. advanceChar(parser);
  1101. token = 67174408;
  1102. break;
  1103. }
  1104. else if ((char & 8) === 8 && char === 92) {
  1105. char = advanceChar(parser);
  1106. if (char > 0x7e) {
  1107. ret += fromCodePoint(char);
  1108. }
  1109. else {
  1110. const code = parseEscape(parser, context | 1024, char);
  1111. if (code >= 0) {
  1112. ret += fromCodePoint(code);
  1113. }
  1114. else if (code !== -1 && context & 65536) {
  1115. ret = undefined;
  1116. char = scanBadTemplate(parser, char);
  1117. if (char < 0)
  1118. token = 67174408;
  1119. break;
  1120. }
  1121. else {
  1122. handleStringError(parser, code, 1);
  1123. }
  1124. }
  1125. }
  1126. else {
  1127. if (parser.index < parser.end &&
  1128. char === 13 &&
  1129. parser.source.charCodeAt(parser.index) === 10) {
  1130. ret += fromCodePoint(char);
  1131. parser.currentChar = parser.source.charCodeAt(++parser.index);
  1132. }
  1133. if (((char & 83) < 3 && char === 10) || (char ^ 8232) <= 1) {
  1134. parser.column = -1;
  1135. parser.line++;
  1136. }
  1137. ret += fromCodePoint(char);
  1138. }
  1139. if (parser.index >= parser.end)
  1140. report(parser, 15);
  1141. char = advanceChar(parser);
  1142. }
  1143. advanceChar(parser);
  1144. parser.tokenValue = ret;
  1145. parser.tokenRaw = parser.source.slice(start + 1, parser.index - (token === 67174409 ? 1 : 2));
  1146. return token;
  1147. }
  1148. function scanBadTemplate(parser, ch) {
  1149. while (ch !== 96) {
  1150. switch (ch) {
  1151. case 36: {
  1152. const index = parser.index + 1;
  1153. if (index < parser.end && parser.source.charCodeAt(index) === 123) {
  1154. parser.index = index;
  1155. parser.column++;
  1156. return -ch;
  1157. }
  1158. break;
  1159. }
  1160. case 10:
  1161. case 8232:
  1162. case 8233:
  1163. parser.column = -1;
  1164. parser.line++;
  1165. }
  1166. if (parser.index >= parser.end)
  1167. report(parser, 15);
  1168. ch = advanceChar(parser);
  1169. }
  1170. return ch;
  1171. }
  1172. function scanTemplateTail(parser, context) {
  1173. if (parser.index >= parser.end)
  1174. report(parser, 0);
  1175. parser.index--;
  1176. parser.column--;
  1177. return scanTemplate(parser, context);
  1178. }
  1179. function scanNumber(parser, context, kind) {
  1180. let char = parser.currentChar;
  1181. let value = 0;
  1182. let digit = 9;
  1183. let atStart = kind & 64 ? 0 : 1;
  1184. let digits = 0;
  1185. let allowSeparator = 0;
  1186. if (kind & 64) {
  1187. value = '.' + scanDecimalDigitsOrSeparator(parser, char);
  1188. char = parser.currentChar;
  1189. if (char === 110)
  1190. report(parser, 11);
  1191. }
  1192. else {
  1193. if (char === 48) {
  1194. char = advanceChar(parser);
  1195. if ((char | 32) === 120) {
  1196. kind = 8 | 128;
  1197. char = advanceChar(parser);
  1198. while (CharTypes[char] & (64 | 4096)) {
  1199. if (char === 95) {
  1200. if (!allowSeparator)
  1201. report(parser, 146);
  1202. allowSeparator = 0;
  1203. char = advanceChar(parser);
  1204. continue;
  1205. }
  1206. allowSeparator = 1;
  1207. value = value * 0x10 + toHex(char);
  1208. digits++;
  1209. char = advanceChar(parser);
  1210. }
  1211. if (digits < 1 || !allowSeparator) {
  1212. report(parser, digits < 1 ? 19 : 147);
  1213. }
  1214. }
  1215. else if ((char | 32) === 111) {
  1216. kind = 4 | 128;
  1217. char = advanceChar(parser);
  1218. while (CharTypes[char] & (32 | 4096)) {
  1219. if (char === 95) {
  1220. if (!allowSeparator) {
  1221. report(parser, 146);
  1222. }
  1223. allowSeparator = 0;
  1224. char = advanceChar(parser);
  1225. continue;
  1226. }
  1227. allowSeparator = 1;
  1228. value = value * 8 + (char - 48);
  1229. digits++;
  1230. char = advanceChar(parser);
  1231. }
  1232. if (digits < 1 || !allowSeparator) {
  1233. report(parser, digits < 1 ? 0 : 147);
  1234. }
  1235. }
  1236. else if ((char | 32) === 98) {
  1237. kind = 2 | 128;
  1238. char = advanceChar(parser);
  1239. while (CharTypes[char] & (128 | 4096)) {
  1240. if (char === 95) {
  1241. if (!allowSeparator) {
  1242. report(parser, 146);
  1243. }
  1244. allowSeparator = 0;
  1245. char = advanceChar(parser);
  1246. continue;
  1247. }
  1248. allowSeparator = 1;
  1249. value = value * 2 + (char - 48);
  1250. digits++;
  1251. char = advanceChar(parser);
  1252. }
  1253. if (digits < 1 || !allowSeparator) {
  1254. report(parser, digits < 1 ? 0 : 147);
  1255. }
  1256. }
  1257. else if (CharTypes[char] & 32) {
  1258. if (context & 1024)
  1259. report(parser, 1);
  1260. kind = 1;
  1261. while (CharTypes[char] & 16) {
  1262. if (CharTypes[char] & 512) {
  1263. kind = 32;
  1264. atStart = 0;
  1265. break;
  1266. }
  1267. value = value * 8 + (char - 48);
  1268. char = advanceChar(parser);
  1269. }
  1270. }
  1271. else if (CharTypes[char] & 512) {
  1272. if (context & 1024)
  1273. report(parser, 1);
  1274. parser.flags |= 64;
  1275. kind = 32;
  1276. }
  1277. else if (char === 95) {
  1278. report(parser, 0);
  1279. }
  1280. }
  1281. if (kind & 48) {
  1282. if (atStart) {
  1283. while (digit >= 0 && CharTypes[char] & (16 | 4096)) {
  1284. if (char === 95) {
  1285. char = advanceChar(parser);
  1286. if (char === 95 || kind & 32) {
  1287. reportScannerError(parser.index, parser.line, parser.index + 1, 146);
  1288. }
  1289. allowSeparator = 1;
  1290. continue;
  1291. }
  1292. allowSeparator = 0;
  1293. value = 10 * value + (char - 48);
  1294. char = advanceChar(parser);
  1295. --digit;
  1296. }
  1297. if (allowSeparator) {
  1298. reportScannerError(parser.index, parser.line, parser.index + 1, 147);
  1299. }
  1300. if (digit >= 0 && !isIdentifierStart(char) && char !== 46) {
  1301. parser.tokenValue = value;
  1302. if (context & 512)
  1303. parser.tokenRaw = parser.source.slice(parser.tokenPos, parser.index);
  1304. return 134283266;
  1305. }
  1306. }
  1307. value += scanDecimalDigitsOrSeparator(parser, char);
  1308. char = parser.currentChar;
  1309. if (char === 46) {
  1310. if (advanceChar(parser) === 95)
  1311. report(parser, 0);
  1312. kind = 64;
  1313. value += '.' + scanDecimalDigitsOrSeparator(parser, parser.currentChar);
  1314. char = parser.currentChar;
  1315. }
  1316. }
  1317. }
  1318. const end = parser.index;
  1319. let isBigInt = 0;
  1320. if (char === 110 && kind & 128) {
  1321. isBigInt = 1;
  1322. char = advanceChar(parser);
  1323. }
  1324. else {
  1325. if ((char | 32) === 101) {
  1326. char = advanceChar(parser);
  1327. if (CharTypes[char] & 256)
  1328. char = advanceChar(parser);
  1329. const { index } = parser;
  1330. if ((CharTypes[char] & 16) < 1)
  1331. report(parser, 10);
  1332. value += parser.source.substring(end, index) + scanDecimalDigitsOrSeparator(parser, char);
  1333. char = parser.currentChar;
  1334. }
  1335. }
  1336. if ((parser.index < parser.end && CharTypes[char] & 16) || isIdentifierStart(char)) {
  1337. report(parser, 12);
  1338. }
  1339. if (isBigInt) {
  1340. parser.tokenRaw = parser.source.slice(parser.tokenPos, parser.index);
  1341. parser.tokenValue = BigInt(value);
  1342. return 134283389;
  1343. }
  1344. parser.tokenValue =
  1345. kind & (1 | 2 | 8 | 4)
  1346. ? value
  1347. : kind & 32
  1348. ? parseFloat(parser.source.substring(parser.tokenPos, parser.index))
  1349. : +value;
  1350. if (context & 512)
  1351. parser.tokenRaw = parser.source.slice(parser.tokenPos, parser.index);
  1352. return 134283266;
  1353. }
  1354. function scanDecimalDigitsOrSeparator(parser, char) {
  1355. let allowSeparator = 0;
  1356. let start = parser.index;
  1357. let ret = '';
  1358. while (CharTypes[char] & (16 | 4096)) {
  1359. if (char === 95) {
  1360. const { index } = parser;
  1361. char = advanceChar(parser);
  1362. if (char === 95) {
  1363. reportScannerError(parser.index, parser.line, parser.index + 1, 146);
  1364. }
  1365. allowSeparator = 1;
  1366. ret += parser.source.substring(start, index);
  1367. start = parser.index;
  1368. continue;
  1369. }
  1370. allowSeparator = 0;
  1371. char = advanceChar(parser);
  1372. }
  1373. if (allowSeparator) {
  1374. reportScannerError(parser.index, parser.line, parser.index + 1, 147);
  1375. }
  1376. return ret + parser.source.substring(start, parser.index);
  1377. }
  1378. const KeywordDescTable = [
  1379. 'end of source',
  1380. 'identifier', 'number', 'string', 'regular expression',
  1381. 'false', 'true', 'null',
  1382. 'template continuation', 'template tail',
  1383. '=>', '(', '{', '.', '...', '}', ')', ';', ',', '[', ']', ':', '?', '\'', '"', '</', '/>',
  1384. '++', '--',
  1385. '=', '<<=', '>>=', '>>>=', '**=', '+=', '-=', '*=', '/=', '%=', '^=', '|=',
  1386. '&=', '||=', '&&=', '??=',
  1387. 'typeof', 'delete', 'void', '!', '~', '+', '-', 'in', 'instanceof', '*', '%', '/', '**', '&&',
  1388. '||', '===', '!==', '==', '!=', '<=', '>=', '<', '>', '<<', '>>', '>>>', '&', '|', '^',
  1389. 'var', 'let', 'const',
  1390. 'break', 'case', 'catch', 'class', 'continue', 'debugger', 'default', 'do', 'else', 'export',
  1391. 'extends', 'finally', 'for', 'function', 'if', 'import', 'new', 'return', 'super', 'switch',
  1392. 'this', 'throw', 'try', 'while', 'with',
  1393. 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield',
  1394. 'as', 'async', 'await', 'constructor', 'get', 'set', 'from', 'of',
  1395. 'enum', 'eval', 'arguments', 'escaped keyword', 'escaped future reserved keyword', 'reserved if strict', '#',
  1396. 'BigIntLiteral', '??', '?.', 'WhiteSpace', 'Illegal', 'LineTerminator', 'PrivateField',
  1397. 'Template', '@', 'target', 'meta', 'LineFeed', 'Escaped', 'JSXText'
  1398. ];
  1399. const descKeywordTable = Object.create(null, {
  1400. this: { value: 86113 },
  1401. function: { value: 86106 },
  1402. if: { value: 20571 },
  1403. return: { value: 20574 },
  1404. var: { value: 86090 },
  1405. else: { value: 20565 },
  1406. for: { value: 20569 },
  1407. new: { value: 86109 },
  1408. in: { value: 8738868 },
  1409. typeof: { value: 16863277 },
  1410. while: { value: 20580 },
  1411. case: { value: 20558 },
  1412. break: { value: 20557 },
  1413. try: { value: 20579 },
  1414. catch: { value: 20559 },
  1415. delete: { value: 16863278 },
  1416. throw: { value: 86114 },
  1417. switch: { value: 86112 },
  1418. continue: { value: 20561 },
  1419. default: { value: 20563 },
  1420. instanceof: { value: 8476725 },
  1421. do: { value: 20564 },
  1422. void: { value: 16863279 },
  1423. finally: { value: 20568 },
  1424. async: { value: 209007 },
  1425. await: { value: 209008 },
  1426. class: { value: 86096 },
  1427. const: { value: 86092 },
  1428. constructor: { value: 12401 },
  1429. debugger: { value: 20562 },
  1430. export: { value: 20566 },
  1431. extends: { value: 20567 },
  1432. false: { value: 86021 },
  1433. from: { value: 12404 },
  1434. get: { value: 12402 },
  1435. implements: { value: 36966 },
  1436. import: { value: 86108 },
  1437. interface: { value: 36967 },
  1438. let: { value: 241739 },
  1439. null: { value: 86023 },
  1440. of: { value: 274549 },
  1441. package: { value: 36968 },
  1442. private: { value: 36969 },
  1443. protected: { value: 36970 },
  1444. public: { value: 36971 },
  1445. set: { value: 12403 },
  1446. static: { value: 36972 },
  1447. super: { value: 86111 },
  1448. true: { value: 86022 },
  1449. with: { value: 20581 },
  1450. yield: { value: 241773 },
  1451. enum: { value: 86134 },
  1452. eval: { value: 537079927 },
  1453. as: { value: 77934 },
  1454. arguments: { value: 537079928 },
  1455. target: { value: 143494 },
  1456. meta: { value: 143495 },
  1457. });
  1458. function scanIdentifier(parser, context, isValidAsKeyword) {
  1459. while (isIdPart[advanceChar(parser)]) { }
  1460. parser.tokenValue = parser.source.slice(parser.tokenPos, parser.index);
  1461. return parser.currentChar !== 92 && parser.currentChar < 0x7e
  1462. ? descKeywordTable[parser.tokenValue] || 208897
  1463. : scanIdentifierSlowCase(parser, context, 0, isValidAsKeyword);
  1464. }
  1465. function scanUnicodeIdentifier(parser, context) {
  1466. const cookedChar = scanIdentifierUnicodeEscape(parser);
  1467. if (!isIdentifierPart(cookedChar))
  1468. report(parser, 4);
  1469. parser.tokenValue = fromCodePoint(cookedChar);
  1470. return scanIdentifierSlowCase(parser, context, 1, CharTypes[cookedChar] & 4);
  1471. }
  1472. function scanIdentifierSlowCase(parser, context, hasEscape, isValidAsKeyword) {
  1473. let start = parser.index;
  1474. while (parser.index < parser.end) {
  1475. if (parser.currentChar === 92) {
  1476. parser.tokenValue += parser.source.slice(start, parser.index);
  1477. hasEscape = 1;
  1478. const code = scanIdentifierUnicodeEscape(parser);
  1479. if (!isIdentifierPart(code))
  1480. report(parser, 4);
  1481. isValidAsKeyword = isValidAsKeyword && CharTypes[code] & 4;
  1482. parser.tokenValue += fromCodePoint(code);
  1483. start = parser.index;
  1484. }
  1485. else if (isIdentifierPart(parser.currentChar) || consumeMultiUnitCodePoint(parser, parser.currentChar)) {
  1486. advanceChar(parser);
  1487. }
  1488. else {
  1489. break;
  1490. }
  1491. }
  1492. if (parser.index <= parser.end) {
  1493. parser.tokenValue += parser.source.slice(start, parser.index);
  1494. }
  1495. const length = parser.tokenValue.length;
  1496. if (isValidAsKeyword && length >= 2 && length <= 11) {
  1497. const token = descKeywordTable[parser.tokenValue];
  1498. if (token === void 0)
  1499. return 208897;
  1500. if (!hasEscape)
  1501. return token;
  1502. if (context & 1024) {
  1503. return token === 209008 && (context & (2048 | 4194304)) === 0
  1504. ? token
  1505. : token === 36972
  1506. ? 122
  1507. : (token & 36864) === 36864
  1508. ? 122
  1509. : 121;
  1510. }
  1511. if (context & 1073741824 &&
  1512. (context & 8192) === 0 &&
  1513. (token & 20480) === 20480)
  1514. return token;
  1515. if (token === 241773) {
  1516. return context & 1073741824
  1517. ? 143483
  1518. : context & 2097152
  1519. ? 121
  1520. : token;
  1521. }
  1522. return token === 209007 && context & 1073741824
  1523. ? 143483
  1524. : (token & 36864) === 36864
  1525. ? token
  1526. : token === 209008 && (context & 4194304) === 0
  1527. ? token
  1528. : 121;
  1529. }
  1530. return 208897;
  1531. }
  1532. function scanPrivateIdentifier(parser) {
  1533. if (!isIdentifierStart(advanceChar(parser)))
  1534. report(parser, 93);
  1535. return 131;
  1536. }
  1537. function scanIdentifierUnicodeEscape(parser) {
  1538. if (parser.source.charCodeAt(parser.index + 1) !== 117) {
  1539. report(parser, 4);
  1540. }
  1541. parser.currentChar = parser.source.charCodeAt((parser.index += 2));
  1542. return scanUnicodeEscape(parser);
  1543. }
  1544. function scanUnicodeEscape(parser) {
  1545. let codePoint = 0;
  1546. const char = parser.currentChar;
  1547. if (char === 123) {
  1548. const begin = parser.index - 2;
  1549. while (CharTypes[advanceChar(parser)] & 64) {
  1550. codePoint = (codePoint << 4) | toHex(parser.currentChar);
  1551. if (codePoint > 1114111)
  1552. reportScannerError(begin, parser.line, parser.index + 1, 101);
  1553. }
  1554. if (parser.currentChar !== 125) {
  1555. reportScannerError(begin, parser.line, parser.index - 1, 6);
  1556. }
  1557. advanceChar(parser);
  1558. return codePoint;
  1559. }
  1560. if ((CharTypes[char] & 64) === 0)
  1561. report(parser, 6);
  1562. const char2 = parser.source.charCodeAt(parser.index + 1);
  1563. if ((CharTypes[char2] & 64) === 0)
  1564. report(parser, 6);
  1565. const char3 = parser.source.charCodeAt(parser.index + 2);
  1566. if ((CharTypes[char3] & 64) === 0)
  1567. report(parser, 6);
  1568. const char4 = parser.source.charCodeAt(parser.index + 3);
  1569. if ((CharTypes[char4] & 64) === 0)
  1570. report(parser, 6);
  1571. codePoint = (toHex(char) << 12) | (toHex(char2) << 8) | (toHex(char3) << 4) | toHex(char4);
  1572. parser.currentChar = parser.source.charCodeAt((parser.index += 4));
  1573. return codePoint;
  1574. }
  1575. const TokenLookup = [
  1576. 129,
  1577. 129,
  1578. 129,
  1579. 129,
  1580. 129,
  1581. 129,
  1582. 129,
  1583. 129,
  1584. 129,
  1585. 128,
  1586. 136,
  1587. 128,
  1588. 128,
  1589. 130,
  1590. 129,
  1591. 129,
  1592. 129,
  1593. 129,
  1594. 129,
  1595. 129,
  1596. 129,
  1597. 129,
  1598. 129,
  1599. 129,
  1600. 129,
  1601. 129,
  1602. 129,
  1603. 129,
  1604. 129,
  1605. 129,
  1606. 129,
  1607. 129,
  1608. 128,
  1609. 16842800,
  1610. 134283267,
  1611. 131,
  1612. 208897,
  1613. 8457015,
  1614. 8455751,
  1615. 134283267,
  1616. 67174411,
  1617. 16,
  1618. 8457014,
  1619. 25233970,
  1620. 18,
  1621. 25233971,
  1622. 67108877,
  1623. 8457016,
  1624. 134283266,
  1625. 134283266,
  1626. 134283266,
  1627. 134283266,
  1628. 134283266,
  1629. 134283266,
  1630. 134283266,
  1631. 134283266,
  1632. 134283266,
  1633. 134283266,
  1634. 21,
  1635. 1074790417,
  1636. 8456258,
  1637. 1077936157,
  1638. 8456259,
  1639. 22,
  1640. 133,
  1641. 208897,
  1642. 208897,
  1643. 208897,
  1644. 208897,
  1645. 208897,
  1646. 208897,
  1647. 208897,
  1648. 208897,
  1649. 208897,
  1650. 208897,
  1651. 208897,
  1652. 208897,
  1653. 208897,
  1654. 208897,
  1655. 208897,
  1656. 208897,
  1657. 208897,
  1658. 208897,
  1659. 208897,
  1660. 208897,
  1661. 208897,
  1662. 208897,
  1663. 208897,
  1664. 208897,
  1665. 208897,
  1666. 208897,
  1667. 69271571,
  1668. 137,
  1669. 20,
  1670. 8455497,
  1671. 208897,
  1672. 132,
  1673. 4096,
  1674. 4096,
  1675. 4096,
  1676. 4096,
  1677. 4096,
  1678. 4096,
  1679. 4096,
  1680. 208897,
  1681. 4096,
  1682. 208897,
  1683. 208897,
  1684. 4096,
  1685. 208897,
  1686. 4096,
  1687. 208897,
  1688. 4096,
  1689. 208897,
  1690. 4096,
  1691. 4096,
  1692. 4096,
  1693. 208897,
  1694. 4096,
  1695. 4096,
  1696. 208897,
  1697. 4096,
  1698. 4096,
  1699. 2162700,
  1700. 8455240,
  1701. 1074790415,
  1702. 16842801,
  1703. 129
  1704. ];
  1705. function nextToken(parser, context) {
  1706. parser.flags = (parser.flags | 1) ^ 1;
  1707. parser.startPos = parser.index;
  1708. parser.startColumn = parser.column;
  1709. parser.startLine = parser.line;
  1710. parser.token = scanSingleToken(parser, context, 0);
  1711. if (parser.onToken && parser.token !== 1048576) {
  1712. const loc = {
  1713. start: {
  1714. line: parser.linePos,
  1715. column: parser.colPos
  1716. },
  1717. end: {
  1718. line: parser.line,
  1719. column: parser.column
  1720. }
  1721. };
  1722. parser.onToken(convertTokenType(parser.token), parser.tokenPos, parser.index, loc);
  1723. }
  1724. }
  1725. function scanSingleToken(parser, context, state) {
  1726. const isStartOfLine = parser.index === 0;
  1727. const source = parser.source;
  1728. let startPos = parser.index;
  1729. let startLine = parser.line;
  1730. let startColumn = parser.column;
  1731. while (parser.index < parser.end) {
  1732. parser.tokenPos = parser.index;
  1733. parser.colPos = parser.column;
  1734. parser.linePos = parser.line;
  1735. let char = parser.currentChar;
  1736. if (char <= 0x7e) {
  1737. const token = TokenLookup[char];
  1738. switch (token) {
  1739. case 67174411:
  1740. case 16:
  1741. case 2162700:
  1742. case 1074790415:
  1743. case 69271571:
  1744. case 20:
  1745. case 21:
  1746. case 1074790417:
  1747. case 18:
  1748. case 16842801:
  1749. case 133:
  1750. case 129:
  1751. advanceChar(parser);
  1752. return token;
  1753. case 208897:
  1754. return scanIdentifier(parser, context, 0);
  1755. case 4096:
  1756. return scanIdentifier(parser, context, 1);
  1757. case 134283266:
  1758. return scanNumber(parser, context, 16 | 128);
  1759. case 134283267:
  1760. return scanString(parser, context, char);
  1761. case 132:
  1762. return scanTemplate(parser, context);
  1763. case 137:
  1764. return scanUnicodeIdentifier(parser, context);
  1765. case 131:
  1766. return scanPrivateIdentifier(parser);
  1767. case 128:
  1768. advanceChar(parser);
  1769. break;
  1770. case 130:
  1771. state |= 1 | 4;
  1772. scanNewLine(parser);
  1773. break;
  1774. case 136:
  1775. consumeLineFeed(parser, state);
  1776. state = (state & ~4) | 1;
  1777. break;
  1778. case 8456258:
  1779. let ch = advanceChar(parser);
  1780. if (parser.index < parser.end) {
  1781. if (ch === 60) {
  1782. if (parser.index < parser.end && advanceChar(parser) === 61) {
  1783. advanceChar(parser);
  1784. return 4194334;
  1785. }
  1786. return 8456516;
  1787. }
  1788. else if (ch === 61) {
  1789. advanceChar(parser);
  1790. return 8456000;
  1791. }
  1792. if (ch === 33) {
  1793. const index = parser.index + 1;
  1794. if (index + 1 < parser.end &&
  1795. source.charCodeAt(index) === 45 &&
  1796. source.charCodeAt(index + 1) == 45) {
  1797. parser.column += 3;
  1798. parser.currentChar = source.charCodeAt((parser.index += 3));
  1799. state = skipSingleHTMLComment(parser, source, state, context, 2, parser.tokenPos, parser.linePos, parser.colPos);
  1800. startPos = parser.tokenPos;
  1801. startLine = parser.linePos;
  1802. startColumn = parser.colPos;
  1803. continue;
  1804. }
  1805. return 8456258;
  1806. }
  1807. if (ch === 47) {
  1808. if ((context & 16) < 1)
  1809. return 8456258;
  1810. const index = parser.index + 1;
  1811. if (index < parser.end) {
  1812. ch = source.charCodeAt(index);
  1813. if (ch === 42 || ch === 47)
  1814. break;
  1815. }
  1816. advanceChar(parser);
  1817. return 25;
  1818. }
  1819. }
  1820. return 8456258;
  1821. case 1077936157: {
  1822. advanceChar(parser);
  1823. const ch = parser.currentChar;
  1824. if (ch === 61) {
  1825. if (advanceChar(parser) === 61) {
  1826. advanceChar(parser);
  1827. return 8455996;
  1828. }
  1829. return 8455998;
  1830. }
  1831. if (ch === 62) {
  1832. advanceChar(parser);
  1833. return 10;
  1834. }
  1835. return 1077936157;
  1836. }
  1837. case 16842800:
  1838. if (advanceChar(parser) !== 61) {
  1839. return 16842800;
  1840. }
  1841. if (advanceChar(parser) !== 61) {
  1842. return 8455999;
  1843. }
  1844. advanceChar(parser);
  1845. return 8455997;
  1846. case 8457015:
  1847. if (advanceChar(parser) !== 61)
  1848. return 8457015;
  1849. advanceChar(parser);
  1850. return 4194342;
  1851. case 8457014: {
  1852. advanceChar(parser);
  1853. if (parser.index >= parser.end)
  1854. return 8457014;
  1855. const ch = parser.currentChar;
  1856. if (ch === 61) {
  1857. advanceChar(parser);
  1858. return 4194340;
  1859. }
  1860. if (ch !== 42)
  1861. return 8457014;
  1862. if (advanceChar(parser) !== 61)
  1863. return 8457273;
  1864. advanceChar(parser);
  1865. return 4194337;
  1866. }
  1867. case 8455497:
  1868. if (advanceChar(parser) !== 61)
  1869. return 8455497;
  1870. advanceChar(parser);
  1871. return 4194343;
  1872. case 25233970: {
  1873. advanceChar(parser);
  1874. const ch = parser.currentChar;
  1875. if (ch === 43) {
  1876. advanceChar(parser);
  1877. return 33619995;
  1878. }
  1879. if (ch === 61) {
  1880. advanceChar(parser);
  1881. return 4194338;
  1882. }
  1883. return 25233970;
  1884. }
  1885. case 25233971: {
  1886. advanceChar(parser);
  1887. const ch = parser.currentChar;
  1888. if (ch === 45) {
  1889. advanceChar(parser);
  1890. if ((state & 1 || isStartOfLine) && parser.currentChar === 62) {
  1891. if ((context & 256) === 0)
  1892. report(parser, 108);
  1893. advanceChar(parser);
  1894. state = skipSingleHTMLComment(parser, source, state, context, 3, startPos, startLine, startColumn);
  1895. startPos = parser.tokenPos;
  1896. startLine = parser.linePos;
  1897. startColumn = parser.colPos;
  1898. continue;
  1899. }
  1900. return 33619996;
  1901. }
  1902. if (ch === 61) {
  1903. advanceChar(parser);
  1904. return 4194339;
  1905. }
  1906. return 25233971;
  1907. }
  1908. case 8457016: {
  1909. advanceChar(parser);
  1910. if (parser.index < parser.end) {
  1911. const ch = parser.currentChar;
  1912. if (ch === 47) {
  1913. advanceChar(parser);
  1914. state = skipSingleLineComment(parser, source, state, 0, parser.tokenPos, parser.linePos, parser.colPos);
  1915. startPos = parser.tokenPos;
  1916. startLine = parser.linePos;
  1917. startColumn = parser.colPos;
  1918. continue;
  1919. }
  1920. if (ch === 42) {
  1921. advanceChar(parser);
  1922. state = skipMultiLineComment(parser, source, state);
  1923. startPos = parser.tokenPos;
  1924. startLine = parser.linePos;
  1925. startColumn = parser.colPos;
  1926. continue;
  1927. }
  1928. if (context & 32768) {
  1929. return scanRegularExpression(parser, context);
  1930. }
  1931. if (ch === 61) {
  1932. advanceChar(parser);
  1933. return 4259877;
  1934. }
  1935. }
  1936. return 8457016;
  1937. }
  1938. case 67108877:
  1939. const next = advanceChar(parser);
  1940. if (next >= 48 && next <= 57)
  1941. return scanNumber(parser, context, 64 | 16);
  1942. if (next === 46) {
  1943. const index = parser.index + 1;
  1944. if (index < parser.end && source.charCodeAt(index) === 46) {
  1945. parser.column += 2;
  1946. parser.currentChar = source.charCodeAt((parser.index += 2));
  1947. return 14;
  1948. }
  1949. }
  1950. return 67108877;
  1951. case 8455240: {
  1952. advanceChar(parser);
  1953. const ch = parser.currentChar;
  1954. if (ch === 124) {
  1955. advanceChar(parser);
  1956. if (parser.currentChar === 61) {
  1957. advanceChar(parser);
  1958. return 4194346;
  1959. }
  1960. return 8979003;
  1961. }
  1962. if (ch === 61) {
  1963. advanceChar(parser);
  1964. return 4194344;
  1965. }
  1966. return 8455240;
  1967. }
  1968. case 8456259: {
  1969. advanceChar(parser);
  1970. const ch = parser.currentChar;
  1971. if (ch === 61) {
  1972. advanceChar(parser);
  1973. return 8456001;
  1974. }
  1975. if (ch !== 62)
  1976. return 8456259;
  1977. advanceChar(parser);
  1978. if (parser.index < parser.end) {
  1979. const ch = parser.currentChar;
  1980. if (ch === 62) {
  1981. if (advanceChar(parser) === 61) {
  1982. advanceChar(parser);
  1983. return 4194336;
  1984. }
  1985. return 8456518;
  1986. }
  1987. if (ch === 61) {
  1988. advanceChar(parser);
  1989. return 4194335;
  1990. }
  1991. }
  1992. return 8456517;
  1993. }
  1994. case 8455751: {
  1995. advanceChar(parser);
  1996. const ch = parser.currentChar;
  1997. if (ch === 38) {
  1998. advanceChar(parser);
  1999. if (parser.currentChar === 61) {
  2000. advanceChar(parser);
  2001. return 4194347;
  2002. }
  2003. return 8979258;
  2004. }
  2005. if (ch === 61) {
  2006. advanceChar(parser);
  2007. return 4194345;
  2008. }
  2009. return 8455751;
  2010. }
  2011. case 22: {
  2012. let ch = advanceChar(parser);
  2013. if (ch === 63) {
  2014. advanceChar(parser);
  2015. if (parser.currentChar === 61) {
  2016. advanceChar(parser);
  2017. return 4194348;
  2018. }
  2019. return 276889982;
  2020. }
  2021. if (ch === 46) {
  2022. const index = parser.index + 1;
  2023. if (index < parser.end) {
  2024. ch = source.charCodeAt(index);
  2025. if (!(ch >= 48 && ch <= 57)) {
  2026. advanceChar(parser);
  2027. return 67108991;
  2028. }
  2029. }
  2030. }
  2031. return 22;
  2032. }
  2033. }
  2034. }
  2035. else {
  2036. if ((char ^ 8232) <= 1) {
  2037. state = (state & ~4) | 1;
  2038. scanNewLine(parser);
  2039. continue;
  2040. }
  2041. if ((char & 0xfc00) === 0xd800 || ((unicodeLookup[(char >>> 5) + 34816] >>> char) & 31 & 1) !== 0) {
  2042. if ((char & 0xfc00) === 0xdc00) {
  2043. char = ((char & 0x3ff) << 10) | (char & 0x3ff) | 0x10000;
  2044. if (((unicodeLookup[(char >>> 5) + 0] >>> char) & 31 & 1) === 0) {
  2045. report(parser, 18, fromCodePoint(char));
  2046. }
  2047. parser.index++;
  2048. parser.currentChar = char;
  2049. }
  2050. parser.column++;
  2051. parser.tokenValue = '';
  2052. return scanIdentifierSlowCase(parser, context, 0, 0);
  2053. }
  2054. if (isExoticECMAScriptWhitespace(char)) {
  2055. advanceChar(parser);
  2056. continue;
  2057. }
  2058. report(parser, 18, fromCodePoint(char));
  2059. }
  2060. }
  2061. return 1048576;
  2062. }
  2063. const entities = {
  2064. AElig: '\u00C6',
  2065. AMP: '\u0026',
  2066. Aacute: '\u00C1',
  2067. Abreve: '\u0102',
  2068. Acirc: '\u00C2',
  2069. Acy: '\u0410',
  2070. Afr: '\uD835\uDD04',
  2071. Agrave: '\u00C0',
  2072. Alpha: '\u0391',
  2073. Amacr: '\u0100',
  2074. And: '\u2A53',
  2075. Aogon: '\u0104',
  2076. Aopf: '\uD835\uDD38',
  2077. ApplyFunction: '\u2061',
  2078. Aring: '\u00C5',
  2079. Ascr: '\uD835\uDC9C',
  2080. Assign: '\u2254',
  2081. Atilde: '\u00C3',
  2082. Auml: '\u00C4',
  2083. Backslash: '\u2216',
  2084. Barv: '\u2AE7',
  2085. Barwed: '\u2306',
  2086. Bcy: '\u0411',
  2087. Because: '\u2235',
  2088. Bernoullis: '\u212C',
  2089. Beta: '\u0392',
  2090. Bfr: '\uD835\uDD05',
  2091. Bopf: '\uD835\uDD39',
  2092. Breve: '\u02D8',
  2093. Bscr: '\u212C',
  2094. Bumpeq: '\u224E',
  2095. CHcy: '\u0427',
  2096. COPY: '\u00A9',
  2097. Cacute: '\u0106',
  2098. Cap: '\u22D2',
  2099. CapitalDifferentialD: '\u2145',
  2100. Cayleys: '\u212D',
  2101. Ccaron: '\u010C',
  2102. Ccedil: '\u00C7',
  2103. Ccirc: '\u0108',
  2104. Cconint: '\u2230',
  2105. Cdot: '\u010A',
  2106. Cedilla: '\u00B8',
  2107. CenterDot: '\u00B7',
  2108. Cfr: '\u212D',
  2109. Chi: '\u03A7',
  2110. CircleDot: '\u2299',
  2111. CircleMinus: '\u2296',
  2112. CirclePlus: '\u2295',
  2113. CircleTimes: '\u2297',
  2114. ClockwiseContourIntegral: '\u2232',
  2115. CloseCurlyDoubleQuote: '\u201D',
  2116. CloseCurlyQuote: '\u2019',
  2117. Colon: '\u2237',
  2118. Colone: '\u2A74',
  2119. Congruent: '\u2261',
  2120. Conint: '\u222F',
  2121. ContourIntegral: '\u222E',
  2122. Copf: '\u2102',
  2123. Coproduct: '\u2210',
  2124. CounterClockwiseContourIntegral: '\u2233',
  2125. Cross: '\u2A2F',
  2126. Cscr: '\uD835\uDC9E',
  2127. Cup: '\u22D3',
  2128. CupCap: '\u224D',
  2129. DD: '\u2145',
  2130. DDotrahd: '\u2911',
  2131. DJcy: '\u0402',
  2132. DScy: '\u0405',
  2133. DZcy: '\u040F',
  2134. Dagger: '\u2021',
  2135. Darr: '\u21A1',
  2136. Dashv: '\u2AE4',
  2137. Dcaron: '\u010E',
  2138. Dcy: '\u0414',
  2139. Del: '\u2207',
  2140. Delta: '\u0394',
  2141. Dfr: '\uD835\uDD07',
  2142. DiacriticalAcute: '\u00B4',
  2143. DiacriticalDot: '\u02D9',
  2144. DiacriticalDoubleAcute: '\u02DD',
  2145. DiacriticalGrave: '\u0060',
  2146. DiacriticalTilde: '\u02DC',
  2147. Diamond: '\u22C4',
  2148. DifferentialD: '\u2146',
  2149. Dopf: '\uD835\uDD3B',
  2150. Dot: '\u00A8',
  2151. DotDot: '\u20DC',
  2152. DotEqual: '\u2250',
  2153. DoubleContourIntegral: '\u222F',
  2154. DoubleDot: '\u00A8',
  2155. DoubleDownArrow: '\u21D3',
  2156. DoubleLeftArrow: '\u21D0',
  2157. DoubleLeftRightArrow: '\u21D4',
  2158. DoubleLeftTee: '\u2AE4',
  2159. DoubleLongLeftArrow: '\u27F8',
  2160. DoubleLongLeftRightArrow: '\u27FA',
  2161. DoubleLongRightArrow: '\u27F9',
  2162. DoubleRightArrow: '\u21D2',
  2163. DoubleRightTee: '\u22A8',
  2164. DoubleUpArrow: '\u21D1',
  2165. DoubleUpDownArrow: '\u21D5',
  2166. DoubleVerticalBar: '\u2225',
  2167. DownArrow: '\u2193',
  2168. DownArrowBar: '\u2913',
  2169. DownArrowUpArrow: '\u21F5',
  2170. DownBreve: '\u0311',
  2171. DownLeftRightVector: '\u2950',
  2172. DownLeftTeeVector: '\u295E',
  2173. DownLeftVector: '\u21BD',
  2174. DownLeftVectorBar: '\u2956',
  2175. DownRightTeeVector: '\u295F',
  2176. DownRightVector: '\u21C1',
  2177. DownRightVectorBar: '\u2957',
  2178. DownTee: '\u22A4',
  2179. DownTeeArrow: '\u21A7',
  2180. Downarrow: '\u21D3',
  2181. Dscr: '\uD835\uDC9F',
  2182. Dstrok: '\u0110',
  2183. ENG: '\u014A',
  2184. ETH: '\u00D0',
  2185. Eacute: '\u00C9',
  2186. Ecaron: '\u011A',
  2187. Ecirc: '\u00CA',
  2188. Ecy: '\u042D',
  2189. Edot: '\u0116',
  2190. Efr: '\uD835\uDD08',
  2191. Egrave: '\u00C8',
  2192. Element: '\u2208',
  2193. Emacr: '\u0112',
  2194. EmptySmallSquare: '\u25FB',
  2195. EmptyVerySmallSquare: '\u25AB',
  2196. Eogon: '\u0118',
  2197. Eopf: '\uD835\uDD3C',
  2198. Epsilon: '\u0395',
  2199. Equal: '\u2A75',
  2200. EqualTilde: '\u2242',
  2201. Equilibrium: '\u21CC',
  2202. Escr: '\u2130',
  2203. Esim: '\u2A73',
  2204. Eta: '\u0397',
  2205. Euml: '\u00CB',
  2206. Exists: '\u2203',
  2207. ExponentialE: '\u2147',
  2208. Fcy: '\u0424',
  2209. Ffr: '\uD835\uDD09',
  2210. FilledSmallSquare: '\u25FC',
  2211. FilledVerySmallSquare: '\u25AA',
  2212. Fopf: '\uD835\uDD3D',
  2213. ForAll: '\u2200',
  2214. Fouriertrf: '\u2131',
  2215. Fscr: '\u2131',
  2216. GJcy: '\u0403',
  2217. GT: '\u003E',
  2218. Gamma: '\u0393',
  2219. Gammad: '\u03DC',
  2220. Gbreve: '\u011E',
  2221. Gcedil: '\u0122',
  2222. Gcirc: '\u011C',
  2223. Gcy: '\u0413',
  2224. Gdot: '\u0120',
  2225. Gfr: '\uD835\uDD0A',
  2226. Gg: '\u22D9',
  2227. Gopf: '\uD835\uDD3E',
  2228. GreaterEqual: '\u2265',
  2229. GreaterEqualLess: '\u22DB',
  2230. GreaterFullEqual: '\u2267',
  2231. GreaterGreater: '\u2AA2',
  2232. GreaterLess: '\u2277',
  2233. GreaterSlantEqual: '\u2A7E',
  2234. GreaterTilde: '\u2273',
  2235. Gscr: '\uD835\uDCA2',
  2236. Gt: '\u226B',
  2237. HARDcy: '\u042A',
  2238. Hacek: '\u02C7',
  2239. Hat: '\u005E',
  2240. Hcirc: '\u0124',
  2241. Hfr: '\u210C',
  2242. HilbertSpace: '\u210B',
  2243. Hopf: '\u210D',
  2244. HorizontalLine: '\u2500',
  2245. Hscr: '\u210B',
  2246. Hstrok: '\u0126',
  2247. HumpDownHump: '\u224E',
  2248. HumpEqual: '\u224F',
  2249. IEcy: '\u0415',
  2250. IJlig: '\u0132',
  2251. IOcy: '\u0401',
  2252. Iacute: '\u00CD',
  2253. Icirc: '\u00CE',
  2254. Icy: '\u0418',
  2255. Idot: '\u0130',
  2256. Ifr: '\u2111',
  2257. Igrave: '\u00CC',
  2258. Im: '\u2111',
  2259. Imacr: '\u012A',
  2260. ImaginaryI: '\u2148',
  2261. Implies: '\u21D2',
  2262. Int: '\u222C',
  2263. Integral: '\u222B',
  2264. Intersection: '\u22C2',
  2265. InvisibleComma: '\u2063',
  2266. InvisibleTimes: '\u2062',
  2267. Iogon: '\u012E',
  2268. Iopf: '\uD835\uDD40',
  2269. Iota: '\u0399',
  2270. Iscr: '\u2110',
  2271. Itilde: '\u0128',
  2272. Iukcy: '\u0406',
  2273. Iuml: '\u00CF',
  2274. Jcirc: '\u0134',
  2275. Jcy: '\u0419',
  2276. Jfr: '\uD835\uDD0D',
  2277. Jopf: '\uD835\uDD41',
  2278. Jscr: '\uD835\uDCA5',
  2279. Jsercy: '\u0408',
  2280. Jukcy: '\u0404',
  2281. KHcy: '\u0425',
  2282. KJcy: '\u040C',
  2283. Kappa: '\u039A',
  2284. Kcedil: '\u0136',
  2285. Kcy: '\u041A',
  2286. Kfr: '\uD835\uDD0E',
  2287. Kopf: '\uD835\uDD42',
  2288. Kscr: '\uD835\uDCA6',
  2289. LJcy: '\u0409',
  2290. LT: '\u003C',
  2291. Lacute: '\u0139',
  2292. Lambda: '\u039B',
  2293. Lang: '\u27EA',
  2294. Laplacetrf: '\u2112',
  2295. Larr: '\u219E',
  2296. Lcaron: '\u013D',
  2297. Lcedil: '\u013B',
  2298. Lcy: '\u041B',
  2299. LeftAngleBracket: '\u27E8',
  2300. LeftArrow: '\u2190',
  2301. LeftArrowBar: '\u21E4',
  2302. LeftArrowRightArrow: '\u21C6',
  2303. LeftCeiling: '\u2308',
  2304. LeftDoubleBracket: '\u27E6',
  2305. LeftDownTeeVector: '\u2961',
  2306. LeftDownVector: '\u21C3',
  2307. LeftDownVectorBar: '\u2959',
  2308. LeftFloor: '\u230A',
  2309. LeftRightArrow: '\u2194',
  2310. LeftRightVector: '\u294E',
  2311. LeftTee: '\u22A3',
  2312. LeftTeeArrow: '\u21A4',
  2313. LeftTeeVector: '\u295A',
  2314. LeftTriangle: '\u22B2',
  2315. LeftTriangleBar: '\u29CF',
  2316. LeftTriangleEqual: '\u22B4',
  2317. LeftUpDownVector: '\u2951',
  2318. LeftUpTeeVector: '\u2960',
  2319. LeftUpVector: '\u21BF',
  2320. LeftUpVectorBar: '\u2958',
  2321. LeftVector: '\u21BC',
  2322. LeftVectorBar: '\u2952',
  2323. Leftarrow: '\u21D0',
  2324. Leftrightarrow: '\u21D4',
  2325. LessEqualGreater: '\u22DA',
  2326. LessFullEqual: '\u2266',
  2327. LessGreater: '\u2276',
  2328. LessLess: '\u2AA1',
  2329. LessSlantEqual: '\u2A7D',
  2330. LessTilde: '\u2272',
  2331. Lfr: '\uD835\uDD0F',
  2332. Ll: '\u22D8',
  2333. Lleftarrow: '\u21DA',
  2334. Lmidot: '\u013F',
  2335. LongLeftArrow: '\u27F5',
  2336. LongLeftRightArrow: '\u27F7',
  2337. LongRightArrow: '\u27F6',
  2338. Longleftarrow: '\u27F8',
  2339. Longleftrightarrow: '\u27FA',
  2340. Longrightarrow: '\u27F9',
  2341. Lopf: '\uD835\uDD43',
  2342. LowerLeftArrow: '\u2199',
  2343. LowerRightArrow: '\u2198',
  2344. Lscr: '\u2112',
  2345. Lsh: '\u21B0',
  2346. Lstrok: '\u0141',
  2347. Lt: '\u226A',
  2348. Map: '\u2905',
  2349. Mcy: '\u041C',
  2350. MediumSpace: '\u205F',
  2351. Mellintrf: '\u2133',
  2352. Mfr: '\uD835\uDD10',
  2353. MinusPlus: '\u2213',
  2354. Mopf: '\uD835\uDD44',
  2355. Mscr: '\u2133',
  2356. Mu: '\u039C',
  2357. NJcy: '\u040A',
  2358. Nacute: '\u0143',
  2359. Ncaron: '\u0147',
  2360. Ncedil: '\u0145',
  2361. Ncy: '\u041D',
  2362. NegativeMediumSpace: '\u200B',
  2363. NegativeThickSpace: '\u200B',
  2364. NegativeThinSpace: '\u200B',
  2365. NegativeVeryThinSpace: '\u200B',
  2366. NestedGreaterGreater: '\u226B',
  2367. NestedLessLess: '\u226A',
  2368. NewLine: '\u000A',
  2369. Nfr: '\uD835\uDD11',
  2370. NoBreak: '\u2060',
  2371. NonBreakingSpace: '\u00A0',
  2372. Nopf: '\u2115',
  2373. Not: '\u2AEC',
  2374. NotCongruent: '\u2262',
  2375. NotCupCap: '\u226D',
  2376. NotDoubleVerticalBar: '\u2226',
  2377. NotElement: '\u2209',
  2378. NotEqual: '\u2260',
  2379. NotEqualTilde: '\u2242\u0338',
  2380. NotExists: '\u2204',
  2381. NotGreater: '\u226F',
  2382. NotGreaterEqual: '\u2271',
  2383. NotGreaterFullEqual: '\u2267\u0338',
  2384. NotGreaterGreater: '\u226B\u0338',
  2385. NotGreaterLess: '\u2279',
  2386. NotGreaterSlantEqual: '\u2A7E\u0338',
  2387. NotGreaterTilde: '\u2275',
  2388. NotHumpDownHump: '\u224E\u0338',
  2389. NotHumpEqual: '\u224F\u0338',
  2390. NotLeftTriangle: '\u22EA',
  2391. NotLeftTriangleBar: '\u29CF\u0338',
  2392. NotLeftTriangleEqual: '\u22EC',
  2393. NotLess: '\u226E',
  2394. NotLessEqual: '\u2270',
  2395. NotLessGreater: '\u2278',
  2396. NotLessLess: '\u226A\u0338',
  2397. NotLessSlantEqual: '\u2A7D\u0338',
  2398. NotLessTilde: '\u2274',
  2399. NotNestedGreaterGreater: '\u2AA2\u0338',
  2400. NotNestedLessLess: '\u2AA1\u0338',
  2401. NotPrecedes: '\u2280',
  2402. NotPrecedesEqual: '\u2AAF\u0338',
  2403. NotPrecedesSlantEqual: '\u22E0',
  2404. NotReverseElement: '\u220C',
  2405. NotRightTriangle: '\u22EB',
  2406. NotRightTriangleBar: '\u29D0\u0338',
  2407. NotRightTriangleEqual: '\u22ED',
  2408. NotSquareSubset: '\u228F\u0338',
  2409. NotSquareSubsetEqual: '\u22E2',
  2410. NotSquareSuperset: '\u2290\u0338',
  2411. NotSquareSupersetEqual: '\u22E3',
  2412. NotSubset: '\u2282\u20D2',
  2413. NotSubsetEqual: '\u2288',
  2414. NotSucceeds: '\u2281',
  2415. NotSucceedsEqual: '\u2AB0\u0338',
  2416. NotSucceedsSlantEqual: '\u22E1',
  2417. NotSucceedsTilde: '\u227F\u0338',
  2418. NotSuperset: '\u2283\u20D2',
  2419. NotSupersetEqual: '\u2289',
  2420. NotTilde: '\u2241',
  2421. NotTildeEqual: '\u2244',
  2422. NotTildeFullEqual: '\u2247',
  2423. NotTildeTilde: '\u2249',
  2424. NotVerticalBar: '\u2224',
  2425. Nscr: '\uD835\uDCA9',
  2426. Ntilde: '\u00D1',
  2427. Nu: '\u039D',
  2428. OElig: '\u0152',
  2429. Oacute: '\u00D3',
  2430. Ocirc: '\u00D4',
  2431. Ocy: '\u041E',
  2432. Odblac: '\u0150',
  2433. Ofr: '\uD835\uDD12',
  2434. Ograve: '\u00D2',
  2435. Omacr: '\u014C',
  2436. Omega: '\u03A9',
  2437. Omicron: '\u039F',
  2438. Oopf: '\uD835\uDD46',
  2439. OpenCurlyDoubleQuote: '\u201C',
  2440. OpenCurlyQuote: '\u2018',
  2441. Or: '\u2A54',
  2442. Oscr: '\uD835\uDCAA',
  2443. Oslash: '\u00D8',
  2444. Otilde: '\u00D5',
  2445. Otimes: '\u2A37',
  2446. Ouml: '\u00D6',
  2447. OverBar: '\u203E',
  2448. OverBrace: '\u23DE',
  2449. OverBracket: '\u23B4',
  2450. OverParenthesis: '\u23DC',
  2451. PartialD: '\u2202',
  2452. Pcy: '\u041F',
  2453. Pfr: '\uD835\uDD13',
  2454. Phi: '\u03A6',
  2455. Pi: '\u03A0',
  2456. PlusMinus: '\u00B1',
  2457. Poincareplane: '\u210C',
  2458. Popf: '\u2119',
  2459. Pr: '\u2ABB',
  2460. Precedes: '\u227A',
  2461. PrecedesEqual: '\u2AAF',
  2462. PrecedesSlantEqual: '\u227C',
  2463. PrecedesTilde: '\u227E',
  2464. Prime: '\u2033',
  2465. Product: '\u220F',
  2466. Proportion: '\u2237',
  2467. Proportional: '\u221D',
  2468. Pscr: '\uD835\uDCAB',
  2469. Psi: '\u03A8',
  2470. QUOT: '\u0022',
  2471. Qfr: '\uD835\uDD14',
  2472. Qopf: '\u211A',
  2473. Qscr: '\uD835\uDCAC',
  2474. RBarr: '\u2910',
  2475. REG: '\u00AE',
  2476. Racute: '\u0154',
  2477. Rang: '\u27EB',
  2478. Rarr: '\u21A0',
  2479. Rarrtl: '\u2916',
  2480. Rcaron: '\u0158',
  2481. Rcedil: '\u0156',
  2482. Rcy: '\u0420',
  2483. Re: '\u211C',
  2484. ReverseElement: '\u220B',
  2485. ReverseEquilibrium: '\u21CB',
  2486. ReverseUpEquilibrium: '\u296F',
  2487. Rfr: '\u211C',
  2488. Rho: '\u03A1',
  2489. RightAngleBracket: '\u27E9',
  2490. RightArrow: '\u2192',
  2491. RightArrowBar: '\u21E5',
  2492. RightArrowLeftArrow: '\u21C4',
  2493. RightCeiling: '\u2309',
  2494. RightDoubleBracket: '\u27E7',
  2495. RightDownTeeVector: '\u295D',
  2496. RightDownVector: '\u21C2',
  2497. RightDownVectorBar: '\u2955',
  2498. RightFloor: '\u230B',
  2499. RightTee: '\u22A2',
  2500. RightTeeArrow: '\u21A6',
  2501. RightTeeVector: '\u295B',
  2502. RightTriangle: '\u22B3',
  2503. RightTriangleBar: '\u29D0',
  2504. RightTriangleEqual: '\u22B5',
  2505. RightUpDownVector: '\u294F',
  2506. RightUpTeeVector: '\u295C',
  2507. RightUpVector: '\u21BE',
  2508. RightUpVectorBar: '\u2954',
  2509. RightVector: '\u21C0',
  2510. RightVectorBar: '\u2953',
  2511. Rightarrow: '\u21D2',
  2512. Ropf: '\u211D',
  2513. RoundImplies: '\u2970',
  2514. Rrightarrow: '\u21DB',
  2515. Rscr: '\u211B',
  2516. Rsh: '\u21B1',
  2517. RuleDelayed: '\u29F4',
  2518. SHCHcy: '\u0429',
  2519. SHcy: '\u0428',
  2520. SOFTcy: '\u042C',
  2521. Sacute: '\u015A',
  2522. Sc: '\u2ABC',
  2523. Scaron: '\u0160',
  2524. Scedil: '\u015E',
  2525. Scirc: '\u015C',
  2526. Scy: '\u0421',
  2527. Sfr: '\uD835\uDD16',
  2528. ShortDownArrow: '\u2193',
  2529. ShortLeftArrow: '\u2190',
  2530. ShortRightArrow: '\u2192',
  2531. ShortUpArrow: '\u2191',
  2532. Sigma: '\u03A3',
  2533. SmallCircle: '\u2218',
  2534. Sopf: '\uD835\uDD4A',
  2535. Sqrt: '\u221A',
  2536. Square: '\u25A1',
  2537. SquareIntersection: '\u2293',
  2538. SquareSubset: '\u228F',
  2539. SquareSubsetEqual: '\u2291',
  2540. SquareSuperset: '\u2290',
  2541. SquareSupersetEqual: '\u2292',
  2542. SquareUnion: '\u2294',
  2543. Sscr: '\uD835\uDCAE',
  2544. Star: '\u22C6',
  2545. Sub: '\u22D0',
  2546. Subset: '\u22D0',
  2547. SubsetEqual: '\u2286',
  2548. Succeeds: '\u227B',
  2549. SucceedsEqual: '\u2AB0',
  2550. SucceedsSlantEqual: '\u227D',
  2551. SucceedsTilde: '\u227F',
  2552. SuchThat: '\u220B',
  2553. Sum: '\u2211',
  2554. Sup: '\u22D1',
  2555. Superset: '\u2283',
  2556. SupersetEqual: '\u2287',
  2557. Supset: '\u22D1',
  2558. THORN: '\u00DE',
  2559. TRADE: '\u2122',
  2560. TSHcy: '\u040B',
  2561. TScy: '\u0426',
  2562. Tab: '\u0009',
  2563. Tau: '\u03A4',
  2564. Tcaron: '\u0164',
  2565. Tcedil: '\u0162',
  2566. Tcy: '\u0422',
  2567. Tfr: '\uD835\uDD17',
  2568. Therefore: '\u2234',
  2569. Theta: '\u0398',
  2570. ThickSpace: '\u205F\u200A',
  2571. ThinSpace: '\u2009',
  2572. Tilde: '\u223C',
  2573. TildeEqual: '\u2243',
  2574. TildeFullEqual: '\u2245',
  2575. TildeTilde: '\u2248',
  2576. Topf: '\uD835\uDD4B',
  2577. TripleDot: '\u20DB',
  2578. Tscr: '\uD835\uDCAF',
  2579. Tstrok: '\u0166',
  2580. Uacute: '\u00DA',
  2581. Uarr: '\u219F',
  2582. Uarrocir: '\u2949',
  2583. Ubrcy: '\u040E',
  2584. Ubreve: '\u016C',
  2585. Ucirc: '\u00DB',
  2586. Ucy: '\u0423',
  2587. Udblac: '\u0170',
  2588. Ufr: '\uD835\uDD18',
  2589. Ugrave: '\u00D9',
  2590. Umacr: '\u016A',
  2591. UnderBar: '\u005F',
  2592. UnderBrace: '\u23DF',
  2593. UnderBracket: '\u23B5',
  2594. UnderParenthesis: '\u23DD',
  2595. Union: '\u22C3',
  2596. UnionPlus: '\u228E',
  2597. Uogon: '\u0172',
  2598. Uopf: '\uD835\uDD4C',
  2599. UpArrow: '\u2191',
  2600. UpArrowBar: '\u2912',
  2601. UpArrowDownArrow: '\u21C5',
  2602. UpDownArrow: '\u2195',
  2603. UpEquilibrium: '\u296E',
  2604. UpTee: '\u22A5',
  2605. UpTeeArrow: '\u21A5',
  2606. Uparrow: '\u21D1',
  2607. Updownarrow: '\u21D5',
  2608. UpperLeftArrow: '\u2196',
  2609. UpperRightArrow: '\u2197',
  2610. Upsi: '\u03D2',
  2611. Upsilon: '\u03A5',
  2612. Uring: '\u016E',
  2613. Uscr: '\uD835\uDCB0',
  2614. Utilde: '\u0168',
  2615. Uuml: '\u00DC',
  2616. VDash: '\u22AB',
  2617. Vbar: '\u2AEB',
  2618. Vcy: '\u0412',
  2619. Vdash: '\u22A9',
  2620. Vdashl: '\u2AE6',
  2621. Vee: '\u22C1',
  2622. Verbar: '\u2016',
  2623. Vert: '\u2016',
  2624. VerticalBar: '\u2223',
  2625. VerticalLine: '\u007C',
  2626. VerticalSeparator: '\u2758',
  2627. VerticalTilde: '\u2240',
  2628. VeryThinSpace: '\u200A',
  2629. Vfr: '\uD835\uDD19',
  2630. Vopf: '\uD835\uDD4D',
  2631. Vscr: '\uD835\uDCB1',
  2632. Vvdash: '\u22AA',
  2633. Wcirc: '\u0174',
  2634. Wedge: '\u22C0',
  2635. Wfr: '\uD835\uDD1A',
  2636. Wopf: '\uD835\uDD4E',
  2637. Wscr: '\uD835\uDCB2',
  2638. Xfr: '\uD835\uDD1B',
  2639. Xi: '\u039E',
  2640. Xopf: '\uD835\uDD4F',
  2641. Xscr: '\uD835\uDCB3',
  2642. YAcy: '\u042F',
  2643. YIcy: '\u0407',
  2644. YUcy: '\u042E',
  2645. Yacute: '\u00DD',
  2646. Ycirc: '\u0176',
  2647. Ycy: '\u042B',
  2648. Yfr: '\uD835\uDD1C',
  2649. Yopf: '\uD835\uDD50',
  2650. Yscr: '\uD835\uDCB4',
  2651. Yuml: '\u0178',
  2652. ZHcy: '\u0416',
  2653. Zacute: '\u0179',
  2654. Zcaron: '\u017D',
  2655. Zcy: '\u0417',
  2656. Zdot: '\u017B',
  2657. ZeroWidthSpace: '\u200B',
  2658. Zeta: '\u0396',
  2659. Zfr: '\u2128',
  2660. Zopf: '\u2124',
  2661. Zscr: '\uD835\uDCB5',
  2662. aacute: '\u00E1',
  2663. abreve: '\u0103',
  2664. ac: '\u223E',
  2665. acE: '\u223E\u0333',
  2666. acd: '\u223F',
  2667. acirc: '\u00E2',
  2668. acute: '\u00B4',
  2669. acy: '\u0430',
  2670. aelig: '\u00E6',
  2671. af: '\u2061',
  2672. afr: '\uD835\uDD1E',
  2673. agrave: '\u00E0',
  2674. alefsym: '\u2135',
  2675. aleph: '\u2135',
  2676. alpha: '\u03B1',
  2677. amacr: '\u0101',
  2678. amalg: '\u2A3F',
  2679. amp: '\u0026',
  2680. and: '\u2227',
  2681. andand: '\u2A55',
  2682. andd: '\u2A5C',
  2683. andslope: '\u2A58',
  2684. andv: '\u2A5A',
  2685. ang: '\u2220',
  2686. ange: '\u29A4',
  2687. angle: '\u2220',
  2688. angmsd: '\u2221',
  2689. angmsdaa: '\u29A8',
  2690. angmsdab: '\u29A9',
  2691. angmsdac: '\u29AA',
  2692. angmsdad: '\u29AB',
  2693. angmsdae: '\u29AC',
  2694. angmsdaf: '\u29AD',
  2695. angmsdag: '\u29AE',
  2696. angmsdah: '\u29AF',
  2697. angrt: '\u221F',
  2698. angrtvb: '\u22BE',
  2699. angrtvbd: '\u299D',
  2700. angsph: '\u2222',
  2701. angst: '\u00C5',
  2702. angzarr: '\u237C',
  2703. aogon: '\u0105',
  2704. aopf: '\uD835\uDD52',
  2705. ap: '\u2248',
  2706. apE: '\u2A70',
  2707. apacir: '\u2A6F',
  2708. ape: '\u224A',
  2709. apid: '\u224B',
  2710. apos: '\u0027',
  2711. approx: '\u2248',
  2712. approxeq: '\u224A',
  2713. aring: '\u00E5',
  2714. ascr: '\uD835\uDCB6',
  2715. ast: '\u002A',
  2716. asymp: '\u2248',
  2717. asympeq: '\u224D',
  2718. atilde: '\u00E3',
  2719. auml: '\u00E4',
  2720. awconint: '\u2233',
  2721. awint: '\u2A11',
  2722. bNot: '\u2AED',
  2723. backcong: '\u224C',
  2724. backepsilon: '\u03F6',
  2725. backprime: '\u2035',
  2726. backsim: '\u223D',
  2727. backsimeq: '\u22CD',
  2728. barvee: '\u22BD',
  2729. barwed: '\u2305',
  2730. barwedge: '\u2305',
  2731. bbrk: '\u23B5',
  2732. bbrktbrk: '\u23B6',
  2733. bcong: '\u224C',
  2734. bcy: '\u0431',
  2735. bdquo: '\u201E',
  2736. becaus: '\u2235',
  2737. because: '\u2235',
  2738. bemptyv: '\u29B0',
  2739. bepsi: '\u03F6',
  2740. bernou: '\u212C',
  2741. beta: '\u03B2',
  2742. beth: '\u2136',
  2743. between: '\u226C',
  2744. bfr: '\uD835\uDD1F',
  2745. bigcap: '\u22C2',
  2746. bigcirc: '\u25EF',
  2747. bigcup: '\u22C3',
  2748. bigodot: '\u2A00',
  2749. bigoplus: '\u2A01',
  2750. bigotimes: '\u2A02',
  2751. bigsqcup: '\u2A06',
  2752. bigstar: '\u2605',
  2753. bigtriangledown: '\u25BD',
  2754. bigtriangleup: '\u25B3',
  2755. biguplus: '\u2A04',
  2756. bigvee: '\u22C1',
  2757. bigwedge: '\u22C0',
  2758. bkarow: '\u290D',
  2759. blacklozenge: '\u29EB',
  2760. blacksquare: '\u25AA',
  2761. blacktriangle: '\u25B4',
  2762. blacktriangledown: '\u25BE',
  2763. blacktriangleleft: '\u25C2',
  2764. blacktriangleright: '\u25B8',
  2765. blank: '\u2423',
  2766. blk12: '\u2592',
  2767. blk14: '\u2591',
  2768. blk34: '\u2593',
  2769. block: '\u2588',
  2770. bne: '\u003D\u20E5',
  2771. bnequiv: '\u2261\u20E5',
  2772. bnot: '\u2310',
  2773. bopf: '\uD835\uDD53',
  2774. bot: '\u22A5',
  2775. bottom: '\u22A5',
  2776. bowtie: '\u22C8',
  2777. boxDL: '\u2557',
  2778. boxDR: '\u2554',
  2779. boxDl: '\u2556',
  2780. boxDr: '\u2553',
  2781. boxH: '\u2550',
  2782. boxHD: '\u2566',
  2783. boxHU: '\u2569',
  2784. boxHd: '\u2564',
  2785. boxHu: '\u2567',
  2786. boxUL: '\u255D',
  2787. boxUR: '\u255A',
  2788. boxUl: '\u255C',
  2789. boxUr: '\u2559',
  2790. boxV: '\u2551',
  2791. boxVH: '\u256C',
  2792. boxVL: '\u2563',
  2793. boxVR: '\u2560',
  2794. boxVh: '\u256B',
  2795. boxVl: '\u2562',
  2796. boxVr: '\u255F',
  2797. boxbox: '\u29C9',
  2798. boxdL: '\u2555',
  2799. boxdR: '\u2552',
  2800. boxdl: '\u2510',
  2801. boxdr: '\u250C',
  2802. boxh: '\u2500',
  2803. boxhD: '\u2565',
  2804. boxhU: '\u2568',
  2805. boxhd: '\u252C',
  2806. boxhu: '\u2534',
  2807. boxminus: '\u229F',
  2808. boxplus: '\u229E',
  2809. boxtimes: '\u22A0',
  2810. boxuL: '\u255B',
  2811. boxuR: '\u2558',
  2812. boxul: '\u2518',
  2813. boxur: '\u2514',
  2814. boxv: '\u2502',
  2815. boxvH: '\u256A',
  2816. boxvL: '\u2561',
  2817. boxvR: '\u255E',
  2818. boxvh: '\u253C',
  2819. boxvl: '\u2524',
  2820. boxvr: '\u251C',
  2821. bprime: '\u2035',
  2822. breve: '\u02D8',
  2823. brvbar: '\u00A6',
  2824. bscr: '\uD835\uDCB7',
  2825. bsemi: '\u204F',
  2826. bsim: '\u223D',
  2827. bsime: '\u22CD',
  2828. bsol: '\u005C',
  2829. bsolb: '\u29C5',
  2830. bsolhsub: '\u27C8',
  2831. bull: '\u2022',
  2832. bullet: '\u2022',
  2833. bump: '\u224E',
  2834. bumpE: '\u2AAE',
  2835. bumpe: '\u224F',
  2836. bumpeq: '\u224F',
  2837. cacute: '\u0107',
  2838. cap: '\u2229',
  2839. capand: '\u2A44',
  2840. capbrcup: '\u2A49',
  2841. capcap: '\u2A4B',
  2842. capcup: '\u2A47',
  2843. capdot: '\u2A40',
  2844. caps: '\u2229\uFE00',
  2845. caret: '\u2041',
  2846. caron: '\u02C7',
  2847. ccaps: '\u2A4D',
  2848. ccaron: '\u010D',
  2849. ccedil: '\u00E7',
  2850. ccirc: '\u0109',
  2851. ccups: '\u2A4C',
  2852. ccupssm: '\u2A50',
  2853. cdot: '\u010B',
  2854. cedil: '\u00B8',
  2855. cemptyv: '\u29B2',
  2856. cent: '\u00A2',
  2857. centerdot: '\u00B7',
  2858. cfr: '\uD835\uDD20',
  2859. chcy: '\u0447',
  2860. check: '\u2713',
  2861. checkmark: '\u2713',
  2862. chi: '\u03C7',
  2863. cir: '\u25CB',
  2864. cirE: '\u29C3',
  2865. circ: '\u02C6',
  2866. circeq: '\u2257',
  2867. circlearrowleft: '\u21BA',
  2868. circlearrowright: '\u21BB',
  2869. circledR: '\u00AE',
  2870. circledS: '\u24C8',
  2871. circledast: '\u229B',
  2872. circledcirc: '\u229A',
  2873. circleddash: '\u229D',
  2874. cire: '\u2257',
  2875. cirfnint: '\u2A10',
  2876. cirmid: '\u2AEF',
  2877. cirscir: '\u29C2',
  2878. clubs: '\u2663',
  2879. clubsuit: '\u2663',
  2880. colon: '\u003A',
  2881. colone: '\u2254',
  2882. coloneq: '\u2254',
  2883. comma: '\u002C',
  2884. commat: '\u0040',
  2885. comp: '\u2201',
  2886. compfn: '\u2218',
  2887. complement: '\u2201',
  2888. complexes: '\u2102',
  2889. cong: '\u2245',
  2890. congdot: '\u2A6D',
  2891. conint: '\u222E',
  2892. copf: '\uD835\uDD54',
  2893. coprod: '\u2210',
  2894. copy: '\u00A9',
  2895. copysr: '\u2117',
  2896. crarr: '\u21B5',
  2897. cross: '\u2717',
  2898. cscr: '\uD835\uDCB8',
  2899. csub: '\u2ACF',
  2900. csube: '\u2AD1',
  2901. csup: '\u2AD0',
  2902. csupe: '\u2AD2',
  2903. ctdot: '\u22EF',
  2904. cudarrl: '\u2938',
  2905. cudarrr: '\u2935',
  2906. cuepr: '\u22DE',
  2907. cuesc: '\u22DF',
  2908. cularr: '\u21B6',
  2909. cularrp: '\u293D',
  2910. cup: '\u222A',
  2911. cupbrcap: '\u2A48',
  2912. cupcap: '\u2A46',
  2913. cupcup: '\u2A4A',
  2914. cupdot: '\u228D',
  2915. cupor: '\u2A45',
  2916. cups: '\u222A\uFE00',
  2917. curarr: '\u21B7',
  2918. curarrm: '\u293C',
  2919. curlyeqprec: '\u22DE',
  2920. curlyeqsucc: '\u22DF',
  2921. curlyvee: '\u22CE',
  2922. curlywedge: '\u22CF',
  2923. curren: '\u00A4',
  2924. curvearrowleft: '\u21B6',
  2925. curvearrowright: '\u21B7',
  2926. cuvee: '\u22CE',
  2927. cuwed: '\u22CF',
  2928. cwconint: '\u2232',
  2929. cwint: '\u2231',
  2930. cylcty: '\u232D',
  2931. dArr: '\u21D3',
  2932. dHar: '\u2965',
  2933. dagger: '\u2020',
  2934. daleth: '\u2138',
  2935. darr: '\u2193',
  2936. dash: '\u2010',
  2937. dashv: '\u22A3',
  2938. dbkarow: '\u290F',
  2939. dblac: '\u02DD',
  2940. dcaron: '\u010F',
  2941. dcy: '\u0434',
  2942. dd: '\u2146',
  2943. ddagger: '\u2021',
  2944. ddarr: '\u21CA',
  2945. ddotseq: '\u2A77',
  2946. deg: '\u00B0',
  2947. delta: '\u03B4',
  2948. demptyv: '\u29B1',
  2949. dfisht: '\u297F',
  2950. dfr: '\uD835\uDD21',
  2951. dharl: '\u21C3',
  2952. dharr: '\u21C2',
  2953. diam: '\u22C4',
  2954. diamond: '\u22C4',
  2955. diamondsuit: '\u2666',
  2956. diams: '\u2666',
  2957. die: '\u00A8',
  2958. digamma: '\u03DD',
  2959. disin: '\u22F2',
  2960. div: '\u00F7',
  2961. divide: '\u00F7',
  2962. divideontimes: '\u22C7',
  2963. divonx: '\u22C7',
  2964. djcy: '\u0452',
  2965. dlcorn: '\u231E',
  2966. dlcrop: '\u230D',
  2967. dollar: '\u0024',
  2968. dopf: '\uD835\uDD55',
  2969. dot: '\u02D9',
  2970. doteq: '\u2250',
  2971. doteqdot: '\u2251',
  2972. dotminus: '\u2238',
  2973. dotplus: '\u2214',
  2974. dotsquare: '\u22A1',
  2975. doublebarwedge: '\u2306',
  2976. downarrow: '\u2193',
  2977. downdownarrows: '\u21CA',
  2978. downharpoonleft: '\u21C3',
  2979. downharpoonright: '\u21C2',
  2980. drbkarow: '\u2910',
  2981. drcorn: '\u231F',
  2982. drcrop: '\u230C',
  2983. dscr: '\uD835\uDCB9',
  2984. dscy: '\u0455',
  2985. dsol: '\u29F6',
  2986. dstrok: '\u0111',
  2987. dtdot: '\u22F1',
  2988. dtri: '\u25BF',
  2989. dtrif: '\u25BE',
  2990. duarr: '\u21F5',
  2991. duhar: '\u296F',
  2992. dwangle: '\u29A6',
  2993. dzcy: '\u045F',
  2994. dzigrarr: '\u27FF',
  2995. eDDot: '\u2A77',
  2996. eDot: '\u2251',
  2997. eacute: '\u00E9',
  2998. easter: '\u2A6E',
  2999. ecaron: '\u011B',
  3000. ecir: '\u2256',
  3001. ecirc: '\u00EA',
  3002. ecolon: '\u2255',
  3003. ecy: '\u044D',
  3004. edot: '\u0117',
  3005. ee: '\u2147',
  3006. efDot: '\u2252',
  3007. efr: '\uD835\uDD22',
  3008. eg: '\u2A9A',
  3009. egrave: '\u00E8',
  3010. egs: '\u2A96',
  3011. egsdot: '\u2A98',
  3012. el: '\u2A99',
  3013. elinters: '\u23E7',
  3014. ell: '\u2113',
  3015. els: '\u2A95',
  3016. elsdot: '\u2A97',
  3017. emacr: '\u0113',
  3018. empty: '\u2205',
  3019. emptyset: '\u2205',
  3020. emptyv: '\u2205',
  3021. emsp13: '\u2004',
  3022. emsp14: '\u2005',
  3023. emsp: '\u2003',
  3024. eng: '\u014B',
  3025. ensp: '\u2002',
  3026. eogon: '\u0119',
  3027. eopf: '\uD835\uDD56',
  3028. epar: '\u22D5',
  3029. eparsl: '\u29E3',
  3030. eplus: '\u2A71',
  3031. epsi: '\u03B5',
  3032. epsilon: '\u03B5',
  3033. epsiv: '\u03F5',
  3034. eqcirc: '\u2256',
  3035. eqcolon: '\u2255',
  3036. eqsim: '\u2242',
  3037. eqslantgtr: '\u2A96',
  3038. eqslantless: '\u2A95',
  3039. equals: '\u003D',
  3040. equest: '\u225F',
  3041. equiv: '\u2261',
  3042. equivDD: '\u2A78',
  3043. eqvparsl: '\u29E5',
  3044. erDot: '\u2253',
  3045. erarr: '\u2971',
  3046. escr: '\u212F',
  3047. esdot: '\u2250',
  3048. esim: '\u2242',
  3049. eta: '\u03B7',
  3050. eth: '\u00F0',
  3051. euml: '\u00EB',
  3052. euro: '\u20AC',
  3053. excl: '\u0021',
  3054. exist: '\u2203',
  3055. expectation: '\u2130',
  3056. exponentiale: '\u2147',
  3057. fallingdotseq: '\u2252',
  3058. fcy: '\u0444',
  3059. female: '\u2640',
  3060. ffilig: '\uFB03',
  3061. fflig: '\uFB00',
  3062. ffllig: '\uFB04',
  3063. ffr: '\uD835\uDD23',
  3064. filig: '\uFB01',
  3065. fjlig: '\u0066\u006A',
  3066. flat: '\u266D',
  3067. fllig: '\uFB02',
  3068. fltns: '\u25B1',
  3069. fnof: '\u0192',
  3070. fopf: '\uD835\uDD57',
  3071. forall: '\u2200',
  3072. fork: '\u22D4',
  3073. forkv: '\u2AD9',
  3074. fpartint: '\u2A0D',
  3075. frac12: '\u00BD',
  3076. frac13: '\u2153',
  3077. frac14: '\u00BC',
  3078. frac15: '\u2155',
  3079. frac16: '\u2159',
  3080. frac18: '\u215B',
  3081. frac23: '\u2154',
  3082. frac25: '\u2156',
  3083. frac34: '\u00BE',
  3084. frac35: '\u2157',
  3085. frac38: '\u215C',
  3086. frac45: '\u2158',
  3087. frac56: '\u215A',
  3088. frac58: '\u215D',
  3089. frac78: '\u215E',
  3090. frasl: '\u2044',
  3091. frown: '\u2322',
  3092. fscr: '\uD835\uDCBB',
  3093. gE: '\u2267',
  3094. gEl: '\u2A8C',
  3095. gacute: '\u01F5',
  3096. gamma: '\u03B3',
  3097. gammad: '\u03DD',
  3098. gap: '\u2A86',
  3099. gbreve: '\u011F',
  3100. gcirc: '\u011D',
  3101. gcy: '\u0433',
  3102. gdot: '\u0121',
  3103. ge: '\u2265',
  3104. gel: '\u22DB',
  3105. geq: '\u2265',
  3106. geqq: '\u2267',
  3107. geqslant: '\u2A7E',
  3108. ges: '\u2A7E',
  3109. gescc: '\u2AA9',
  3110. gesdot: '\u2A80',
  3111. gesdoto: '\u2A82',
  3112. gesdotol: '\u2A84',
  3113. gesl: '\u22DB\uFE00',
  3114. gesles: '\u2A94',
  3115. gfr: '\uD835\uDD24',
  3116. gg: '\u226B',
  3117. ggg: '\u22D9',
  3118. gimel: '\u2137',
  3119. gjcy: '\u0453',
  3120. gl: '\u2277',
  3121. glE: '\u2A92',
  3122. gla: '\u2AA5',
  3123. glj: '\u2AA4',
  3124. gnE: '\u2269',
  3125. gnap: '\u2A8A',
  3126. gnapprox: '\u2A8A',
  3127. gne: '\u2A88',
  3128. gneq: '\u2A88',
  3129. gneqq: '\u2269',
  3130. gnsim: '\u22E7',
  3131. gopf: '\uD835\uDD58',
  3132. grave: '\u0060',
  3133. gscr: '\u210A',
  3134. gsim: '\u2273',
  3135. gsime: '\u2A8E',
  3136. gsiml: '\u2A90',
  3137. gt: '\u003E',
  3138. gtcc: '\u2AA7',
  3139. gtcir: '\u2A7A',
  3140. gtdot: '\u22D7',
  3141. gtlPar: '\u2995',
  3142. gtquest: '\u2A7C',
  3143. gtrapprox: '\u2A86',
  3144. gtrarr: '\u2978',
  3145. gtrdot: '\u22D7',
  3146. gtreqless: '\u22DB',
  3147. gtreqqless: '\u2A8C',
  3148. gtrless: '\u2277',
  3149. gtrsim: '\u2273',
  3150. gvertneqq: '\u2269\uFE00',
  3151. gvnE: '\u2269\uFE00',
  3152. hArr: '\u21D4',
  3153. hairsp: '\u200A',
  3154. half: '\u00BD',
  3155. hamilt: '\u210B',
  3156. hardcy: '\u044A',
  3157. harr: '\u2194',
  3158. harrcir: '\u2948',
  3159. harrw: '\u21AD',
  3160. hbar: '\u210F',
  3161. hcirc: '\u0125',
  3162. hearts: '\u2665',
  3163. heartsuit: '\u2665',
  3164. hellip: '\u2026',
  3165. hercon: '\u22B9',
  3166. hfr: '\uD835\uDD25',
  3167. hksearow: '\u2925',
  3168. hkswarow: '\u2926',
  3169. hoarr: '\u21FF',
  3170. homtht: '\u223B',
  3171. hookleftarrow: '\u21A9',
  3172. hookrightarrow: '\u21AA',
  3173. hopf: '\uD835\uDD59',
  3174. horbar: '\u2015',
  3175. hscr: '\uD835\uDCBD',
  3176. hslash: '\u210F',
  3177. hstrok: '\u0127',
  3178. hybull: '\u2043',
  3179. hyphen: '\u2010',
  3180. iacute: '\u00ED',
  3181. ic: '\u2063',
  3182. icirc: '\u00EE',
  3183. icy: '\u0438',
  3184. iecy: '\u0435',
  3185. iexcl: '\u00A1',
  3186. iff: '\u21D4',
  3187. ifr: '\uD835\uDD26',
  3188. igrave: '\u00EC',
  3189. ii: '\u2148',
  3190. iiiint: '\u2A0C',
  3191. iiint: '\u222D',
  3192. iinfin: '\u29DC',
  3193. iiota: '\u2129',
  3194. ijlig: '\u0133',
  3195. imacr: '\u012B',
  3196. image: '\u2111',
  3197. imagline: '\u2110',
  3198. imagpart: '\u2111',
  3199. imath: '\u0131',
  3200. imof: '\u22B7',
  3201. imped: '\u01B5',
  3202. in: '\u2208',
  3203. incare: '\u2105',
  3204. infin: '\u221E',
  3205. infintie: '\u29DD',
  3206. inodot: '\u0131',
  3207. int: '\u222B',
  3208. intcal: '\u22BA',
  3209. integers: '\u2124',
  3210. intercal: '\u22BA',
  3211. intlarhk: '\u2A17',
  3212. intprod: '\u2A3C',
  3213. iocy: '\u0451',
  3214. iogon: '\u012F',
  3215. iopf: '\uD835\uDD5A',
  3216. iota: '\u03B9',
  3217. iprod: '\u2A3C',
  3218. iquest: '\u00BF',
  3219. iscr: '\uD835\uDCBE',
  3220. isin: '\u2208',
  3221. isinE: '\u22F9',
  3222. isindot: '\u22F5',
  3223. isins: '\u22F4',
  3224. isinsv: '\u22F3',
  3225. isinv: '\u2208',
  3226. it: '\u2062',
  3227. itilde: '\u0129',
  3228. iukcy: '\u0456',
  3229. iuml: '\u00EF',
  3230. jcirc: '\u0135',
  3231. jcy: '\u0439',
  3232. jfr: '\uD835\uDD27',
  3233. jmath: '\u0237',
  3234. jopf: '\uD835\uDD5B',
  3235. jscr: '\uD835\uDCBF',
  3236. jsercy: '\u0458',
  3237. jukcy: '\u0454',
  3238. kappa: '\u03BA',
  3239. kappav: '\u03F0',
  3240. kcedil: '\u0137',
  3241. kcy: '\u043A',
  3242. kfr: '\uD835\uDD28',
  3243. kgreen: '\u0138',
  3244. khcy: '\u0445',
  3245. kjcy: '\u045C',
  3246. kopf: '\uD835\uDD5C',
  3247. kscr: '\uD835\uDCC0',
  3248. lAarr: '\u21DA',
  3249. lArr: '\u21D0',
  3250. lAtail: '\u291B',
  3251. lBarr: '\u290E',
  3252. lE: '\u2266',
  3253. lEg: '\u2A8B',
  3254. lHar: '\u2962',
  3255. lacute: '\u013A',
  3256. laemptyv: '\u29B4',
  3257. lagran: '\u2112',
  3258. lambda: '\u03BB',
  3259. lang: '\u27E8',
  3260. langd: '\u2991',
  3261. langle: '\u27E8',
  3262. lap: '\u2A85',
  3263. laquo: '\u00AB',
  3264. larr: '\u2190',
  3265. larrb: '\u21E4',
  3266. larrbfs: '\u291F',
  3267. larrfs: '\u291D',
  3268. larrhk: '\u21A9',
  3269. larrlp: '\u21AB',
  3270. larrpl: '\u2939',
  3271. larrsim: '\u2973',
  3272. larrtl: '\u21A2',
  3273. lat: '\u2AAB',
  3274. latail: '\u2919',
  3275. late: '\u2AAD',
  3276. lates: '\u2AAD\uFE00',
  3277. lbarr: '\u290C',
  3278. lbbrk: '\u2772',
  3279. lbrace: '\u007B',
  3280. lbrack: '\u005B',
  3281. lbrke: '\u298B',
  3282. lbrksld: '\u298F',
  3283. lbrkslu: '\u298D',
  3284. lcaron: '\u013E',
  3285. lcedil: '\u013C',
  3286. lceil: '\u2308',
  3287. lcub: '\u007B',
  3288. lcy: '\u043B',
  3289. ldca: '\u2936',
  3290. ldquo: '\u201C',
  3291. ldquor: '\u201E',
  3292. ldrdhar: '\u2967',
  3293. ldrushar: '\u294B',
  3294. ldsh: '\u21B2',
  3295. le: '\u2264',
  3296. leftarrow: '\u2190',
  3297. leftarrowtail: '\u21A2',
  3298. leftharpoondown: '\u21BD',
  3299. leftharpoonup: '\u21BC',
  3300. leftleftarrows: '\u21C7',
  3301. leftrightarrow: '\u2194',
  3302. leftrightarrows: '\u21C6',
  3303. leftrightharpoons: '\u21CB',
  3304. leftrightsquigarrow: '\u21AD',
  3305. leftthreetimes: '\u22CB',
  3306. leg: '\u22DA',
  3307. leq: '\u2264',
  3308. leqq: '\u2266',
  3309. leqslant: '\u2A7D',
  3310. les: '\u2A7D',
  3311. lescc: '\u2AA8',
  3312. lesdot: '\u2A7F',
  3313. lesdoto: '\u2A81',
  3314. lesdotor: '\u2A83',
  3315. lesg: '\u22DA\uFE00',
  3316. lesges: '\u2A93',
  3317. lessapprox: '\u2A85',
  3318. lessdot: '\u22D6',
  3319. lesseqgtr: '\u22DA',
  3320. lesseqqgtr: '\u2A8B',
  3321. lessgtr: '\u2276',
  3322. lesssim: '\u2272',
  3323. lfisht: '\u297C',
  3324. lfloor: '\u230A',
  3325. lfr: '\uD835\uDD29',
  3326. lg: '\u2276',
  3327. lgE: '\u2A91',
  3328. lhard: '\u21BD',
  3329. lharu: '\u21BC',
  3330. lharul: '\u296A',
  3331. lhblk: '\u2584',
  3332. ljcy: '\u0459',
  3333. ll: '\u226A',
  3334. llarr: '\u21C7',
  3335. llcorner: '\u231E',
  3336. llhard: '\u296B',
  3337. lltri: '\u25FA',
  3338. lmidot: '\u0140',
  3339. lmoust: '\u23B0',
  3340. lmoustache: '\u23B0',
  3341. lnE: '\u2268',
  3342. lnap: '\u2A89',
  3343. lnapprox: '\u2A89',
  3344. lne: '\u2A87',
  3345. lneq: '\u2A87',
  3346. lneqq: '\u2268',
  3347. lnsim: '\u22E6',
  3348. loang: '\u27EC',
  3349. loarr: '\u21FD',
  3350. lobrk: '\u27E6',
  3351. longleftarrow: '\u27F5',
  3352. longleftrightarrow: '\u27F7',
  3353. longmapsto: '\u27FC',
  3354. longrightarrow: '\u27F6',
  3355. looparrowleft: '\u21AB',
  3356. looparrowright: '\u21AC',
  3357. lopar: '\u2985',
  3358. lopf: '\uD835\uDD5D',
  3359. loplus: '\u2A2D',
  3360. lotimes: '\u2A34',
  3361. lowast: '\u2217',
  3362. lowbar: '\u005F',
  3363. loz: '\u25CA',
  3364. lozenge: '\u25CA',
  3365. lozf: '\u29EB',
  3366. lpar: '\u0028',
  3367. lparlt: '\u2993',
  3368. lrarr: '\u21C6',
  3369. lrcorner: '\u231F',
  3370. lrhar: '\u21CB',
  3371. lrhard: '\u296D',
  3372. lrm: '\u200E',
  3373. lrtri: '\u22BF',
  3374. lsaquo: '\u2039',
  3375. lscr: '\uD835\uDCC1',
  3376. lsh: '\u21B0',
  3377. lsim: '\u2272',
  3378. lsime: '\u2A8D',
  3379. lsimg: '\u2A8F',
  3380. lsqb: '\u005B',
  3381. lsquo: '\u2018',
  3382. lsquor: '\u201A',
  3383. lstrok: '\u0142',
  3384. lt: '\u003C',
  3385. ltcc: '\u2AA6',
  3386. ltcir: '\u2A79',
  3387. ltdot: '\u22D6',
  3388. lthree: '\u22CB',
  3389. ltimes: '\u22C9',
  3390. ltlarr: '\u2976',
  3391. ltquest: '\u2A7B',
  3392. ltrPar: '\u2996',
  3393. ltri: '\u25C3',
  3394. ltrie: '\u22B4',
  3395. ltrif: '\u25C2',
  3396. lurdshar: '\u294A',
  3397. luruhar: '\u2966',
  3398. lvertneqq: '\u2268\uFE00',
  3399. lvnE: '\u2268\uFE00',
  3400. mDDot: '\u223A',
  3401. macr: '\u00AF',
  3402. male: '\u2642',
  3403. malt: '\u2720',
  3404. maltese: '\u2720',
  3405. map: '\u21A6',
  3406. mapsto: '\u21A6',
  3407. mapstodown: '\u21A7',
  3408. mapstoleft: '\u21A4',
  3409. mapstoup: '\u21A5',
  3410. marker: '\u25AE',
  3411. mcomma: '\u2A29',
  3412. mcy: '\u043C',
  3413. mdash: '\u2014',
  3414. measuredangle: '\u2221',
  3415. mfr: '\uD835\uDD2A',
  3416. mho: '\u2127',
  3417. micro: '\u00B5',
  3418. mid: '\u2223',
  3419. midast: '\u002A',
  3420. midcir: '\u2AF0',
  3421. middot: '\u00B7',
  3422. minus: '\u2212',
  3423. minusb: '\u229F',
  3424. minusd: '\u2238',
  3425. minusdu: '\u2A2A',
  3426. mlcp: '\u2ADB',
  3427. mldr: '\u2026',
  3428. mnplus: '\u2213',
  3429. models: '\u22A7',
  3430. mopf: '\uD835\uDD5E',
  3431. mp: '\u2213',
  3432. mscr: '\uD835\uDCC2',
  3433. mstpos: '\u223E',
  3434. mu: '\u03BC',
  3435. multimap: '\u22B8',
  3436. mumap: '\u22B8',
  3437. nGg: '\u22D9\u0338',
  3438. nGt: '\u226B\u20D2',
  3439. nGtv: '\u226B\u0338',
  3440. nLeftarrow: '\u21CD',
  3441. nLeftrightarrow: '\u21CE',
  3442. nLl: '\u22D8\u0338',
  3443. nLt: '\u226A\u20D2',
  3444. nLtv: '\u226A\u0338',
  3445. nRightarrow: '\u21CF',
  3446. nVDash: '\u22AF',
  3447. nVdash: '\u22AE',
  3448. nabla: '\u2207',
  3449. nacute: '\u0144',
  3450. nang: '\u2220\u20D2',
  3451. nap: '\u2249',
  3452. napE: '\u2A70\u0338',
  3453. napid: '\u224B\u0338',
  3454. napos: '\u0149',
  3455. napprox: '\u2249',
  3456. natur: '\u266E',
  3457. natural: '\u266E',
  3458. naturals: '\u2115',
  3459. nbsp: '\u00A0',
  3460. nbump: '\u224E\u0338',
  3461. nbumpe: '\u224F\u0338',
  3462. ncap: '\u2A43',
  3463. ncaron: '\u0148',
  3464. ncedil: '\u0146',
  3465. ncong: '\u2247',
  3466. ncongdot: '\u2A6D\u0338',
  3467. ncup: '\u2A42',
  3468. ncy: '\u043D',
  3469. ndash: '\u2013',
  3470. ne: '\u2260',
  3471. neArr: '\u21D7',
  3472. nearhk: '\u2924',
  3473. nearr: '\u2197',
  3474. nearrow: '\u2197',
  3475. nedot: '\u2250\u0338',
  3476. nequiv: '\u2262',
  3477. nesear: '\u2928',
  3478. nesim: '\u2242\u0338',
  3479. nexist: '\u2204',
  3480. nexists: '\u2204',
  3481. nfr: '\uD835\uDD2B',
  3482. ngE: '\u2267\u0338',
  3483. nge: '\u2271',
  3484. ngeq: '\u2271',
  3485. ngeqq: '\u2267\u0338',
  3486. ngeqslant: '\u2A7E\u0338',
  3487. nges: '\u2A7E\u0338',
  3488. ngsim: '\u2275',
  3489. ngt: '\u226F',
  3490. ngtr: '\u226F',
  3491. nhArr: '\u21CE',
  3492. nharr: '\u21AE',
  3493. nhpar: '\u2AF2',
  3494. ni: '\u220B',
  3495. nis: '\u22FC',
  3496. nisd: '\u22FA',
  3497. niv: '\u220B',
  3498. njcy: '\u045A',
  3499. nlArr: '\u21CD',
  3500. nlE: '\u2266\u0338',
  3501. nlarr: '\u219A',
  3502. nldr: '\u2025',
  3503. nle: '\u2270',
  3504. nleftarrow: '\u219A',
  3505. nleftrightarrow: '\u21AE',
  3506. nleq: '\u2270',
  3507. nleqq: '\u2266\u0338',
  3508. nleqslant: '\u2A7D\u0338',
  3509. nles: '\u2A7D\u0338',
  3510. nless: '\u226E',
  3511. nlsim: '\u2274',
  3512. nlt: '\u226E',
  3513. nltri: '\u22EA',
  3514. nltrie: '\u22EC',
  3515. nmid: '\u2224',
  3516. nopf: '\uD835\uDD5F',
  3517. not: '\u00AC',
  3518. notin: '\u2209',
  3519. notinE: '\u22F9\u0338',
  3520. notindot: '\u22F5\u0338',
  3521. notinva: '\u2209',
  3522. notinvb: '\u22F7',
  3523. notinvc: '\u22F6',
  3524. notni: '\u220C',
  3525. notniva: '\u220C',
  3526. notnivb: '\u22FE',
  3527. notnivc: '\u22FD',
  3528. npar: '\u2226',
  3529. nparallel: '\u2226',
  3530. nparsl: '\u2AFD\u20E5',
  3531. npart: '\u2202\u0338',
  3532. npolint: '\u2A14',
  3533. npr: '\u2280',
  3534. nprcue: '\u22E0',
  3535. npre: '\u2AAF\u0338',
  3536. nprec: '\u2280',
  3537. npreceq: '\u2AAF\u0338',
  3538. nrArr: '\u21CF',
  3539. nrarr: '\u219B',
  3540. nrarrc: '\u2933\u0338',
  3541. nrarrw: '\u219D\u0338',
  3542. nrightarrow: '\u219B',
  3543. nrtri: '\u22EB',
  3544. nrtrie: '\u22ED',
  3545. nsc: '\u2281',
  3546. nsccue: '\u22E1',
  3547. nsce: '\u2AB0\u0338',
  3548. nscr: '\uD835\uDCC3',
  3549. nshortmid: '\u2224',
  3550. nshortparallel: '\u2226',
  3551. nsim: '\u2241',
  3552. nsime: '\u2244',
  3553. nsimeq: '\u2244',
  3554. nsmid: '\u2224',
  3555. nspar: '\u2226',
  3556. nsqsube: '\u22E2',
  3557. nsqsupe: '\u22E3',
  3558. nsub: '\u2284',
  3559. nsubE: '\u2AC5\u0338',
  3560. nsube: '\u2288',
  3561. nsubset: '\u2282\u20D2',
  3562. nsubseteq: '\u2288',
  3563. nsubseteqq: '\u2AC5\u0338',
  3564. nsucc: '\u2281',
  3565. nsucceq: '\u2AB0\u0338',
  3566. nsup: '\u2285',
  3567. nsupE: '\u2AC6\u0338',
  3568. nsupe: '\u2289',
  3569. nsupset: '\u2283\u20D2',
  3570. nsupseteq: '\u2289',
  3571. nsupseteqq: '\u2AC6\u0338',
  3572. ntgl: '\u2279',
  3573. ntilde: '\u00F1',
  3574. ntlg: '\u2278',
  3575. ntriangleleft: '\u22EA',
  3576. ntrianglelefteq: '\u22EC',
  3577. ntriangleright: '\u22EB',
  3578. ntrianglerighteq: '\u22ED',
  3579. nu: '\u03BD',
  3580. num: '\u0023',
  3581. numero: '\u2116',
  3582. numsp: '\u2007',
  3583. nvDash: '\u22AD',
  3584. nvHarr: '\u2904',
  3585. nvap: '\u224D\u20D2',
  3586. nvdash: '\u22AC',
  3587. nvge: '\u2265\u20D2',
  3588. nvgt: '\u003E\u20D2',
  3589. nvinfin: '\u29DE',
  3590. nvlArr: '\u2902',
  3591. nvle: '\u2264\u20D2',
  3592. nvlt: '\u003C\u20D2',
  3593. nvltrie: '\u22B4\u20D2',
  3594. nvrArr: '\u2903',
  3595. nvrtrie: '\u22B5\u20D2',
  3596. nvsim: '\u223C\u20D2',
  3597. nwArr: '\u21D6',
  3598. nwarhk: '\u2923',
  3599. nwarr: '\u2196',
  3600. nwarrow: '\u2196',
  3601. nwnear: '\u2927',
  3602. oS: '\u24C8',
  3603. oacute: '\u00F3',
  3604. oast: '\u229B',
  3605. ocir: '\u229A',
  3606. ocirc: '\u00F4',
  3607. ocy: '\u043E',
  3608. odash: '\u229D',
  3609. odblac: '\u0151',
  3610. odiv: '\u2A38',
  3611. odot: '\u2299',
  3612. odsold: '\u29BC',
  3613. oelig: '\u0153',
  3614. ofcir: '\u29BF',
  3615. ofr: '\uD835\uDD2C',
  3616. ogon: '\u02DB',
  3617. ograve: '\u00F2',
  3618. ogt: '\u29C1',
  3619. ohbar: '\u29B5',
  3620. ohm: '\u03A9',
  3621. oint: '\u222E',
  3622. olarr: '\u21BA',
  3623. olcir: '\u29BE',
  3624. olcross: '\u29BB',
  3625. oline: '\u203E',
  3626. olt: '\u29C0',
  3627. omacr: '\u014D',
  3628. omega: '\u03C9',
  3629. omicron: '\u03BF',
  3630. omid: '\u29B6',
  3631. ominus: '\u2296',
  3632. oopf: '\uD835\uDD60',
  3633. opar: '\u29B7',
  3634. operp: '\u29B9',
  3635. oplus: '\u2295',
  3636. or: '\u2228',
  3637. orarr: '\u21BB',
  3638. ord: '\u2A5D',
  3639. order: '\u2134',
  3640. orderof: '\u2134',
  3641. ordf: '\u00AA',
  3642. ordm: '\u00BA',
  3643. origof: '\u22B6',
  3644. oror: '\u2A56',
  3645. orslope: '\u2A57',
  3646. orv: '\u2A5B',
  3647. oscr: '\u2134',
  3648. oslash: '\u00F8',
  3649. osol: '\u2298',
  3650. otilde: '\u00F5',
  3651. otimes: '\u2297',
  3652. otimesas: '\u2A36',
  3653. ouml: '\u00F6',
  3654. ovbar: '\u233D',
  3655. par: '\u2225',
  3656. para: '\u00B6',
  3657. parallel: '\u2225',
  3658. parsim: '\u2AF3',
  3659. parsl: '\u2AFD',
  3660. part: '\u2202',
  3661. pcy: '\u043F',
  3662. percnt: '\u0025',
  3663. period: '\u002E',
  3664. permil: '\u2030',
  3665. perp: '\u22A5',
  3666. pertenk: '\u2031',
  3667. pfr: '\uD835\uDD2D',
  3668. phi: '\u03C6',
  3669. phiv: '\u03D5',
  3670. phmmat: '\u2133',
  3671. phone: '\u260E',
  3672. pi: '\u03C0',
  3673. pitchfork: '\u22D4',
  3674. piv: '\u03D6',
  3675. planck: '\u210F',
  3676. planckh: '\u210E',
  3677. plankv: '\u210F',
  3678. plus: '\u002B',
  3679. plusacir: '\u2A23',
  3680. plusb: '\u229E',
  3681. pluscir: '\u2A22',
  3682. plusdo: '\u2214',
  3683. plusdu: '\u2A25',
  3684. pluse: '\u2A72',
  3685. plusmn: '\u00B1',
  3686. plussim: '\u2A26',
  3687. plustwo: '\u2A27',
  3688. pm: '\u00B1',
  3689. pointint: '\u2A15',
  3690. popf: '\uD835\uDD61',
  3691. pound: '\u00A3',
  3692. pr: '\u227A',
  3693. prE: '\u2AB3',
  3694. prap: '\u2AB7',
  3695. prcue: '\u227C',
  3696. pre: '\u2AAF',
  3697. prec: '\u227A',
  3698. precapprox: '\u2AB7',
  3699. preccurlyeq: '\u227C',
  3700. preceq: '\u2AAF',
  3701. precnapprox: '\u2AB9',
  3702. precneqq: '\u2AB5',
  3703. precnsim: '\u22E8',
  3704. precsim: '\u227E',
  3705. prime: '\u2032',
  3706. primes: '\u2119',
  3707. prnE: '\u2AB5',
  3708. prnap: '\u2AB9',
  3709. prnsim: '\u22E8',
  3710. prod: '\u220F',
  3711. profalar: '\u232E',
  3712. profline: '\u2312',
  3713. profsurf: '\u2313',
  3714. prop: '\u221D',
  3715. propto: '\u221D',
  3716. prsim: '\u227E',
  3717. prurel: '\u22B0',
  3718. pscr: '\uD835\uDCC5',
  3719. psi: '\u03C8',
  3720. puncsp: '\u2008',
  3721. qfr: '\uD835\uDD2E',
  3722. qint: '\u2A0C',
  3723. qopf: '\uD835\uDD62',
  3724. qprime: '\u2057',
  3725. qscr: '\uD835\uDCC6',
  3726. quaternions: '\u210D',
  3727. quatint: '\u2A16',
  3728. quest: '\u003F',
  3729. questeq: '\u225F',
  3730. quot: '\u0022',
  3731. rAarr: '\u21DB',
  3732. rArr: '\u21D2',
  3733. rAtail: '\u291C',
  3734. rBarr: '\u290F',
  3735. rHar: '\u2964',
  3736. race: '\u223D\u0331',
  3737. racute: '\u0155',
  3738. radic: '\u221A',
  3739. raemptyv: '\u29B3',
  3740. rang: '\u27E9',
  3741. rangd: '\u2992',
  3742. range: '\u29A5',
  3743. rangle: '\u27E9',
  3744. raquo: '\u00BB',
  3745. rarr: '\u2192',
  3746. rarrap: '\u2975',
  3747. rarrb: '\u21E5',
  3748. rarrbfs: '\u2920',
  3749. rarrc: '\u2933',
  3750. rarrfs: '\u291E',
  3751. rarrhk: '\u21AA',
  3752. rarrlp: '\u21AC',
  3753. rarrpl: '\u2945',
  3754. rarrsim: '\u2974',
  3755. rarrtl: '\u21A3',
  3756. rarrw: '\u219D',
  3757. ratail: '\u291A',
  3758. ratio: '\u2236',
  3759. rationals: '\u211A',
  3760. rbarr: '\u290D',
  3761. rbbrk: '\u2773',
  3762. rbrace: '\u007D',
  3763. rbrack: '\u005D',
  3764. rbrke: '\u298C',
  3765. rbrksld: '\u298E',
  3766. rbrkslu: '\u2990',
  3767. rcaron: '\u0159',
  3768. rcedil: '\u0157',
  3769. rceil: '\u2309',
  3770. rcub: '\u007D',
  3771. rcy: '\u0440',
  3772. rdca: '\u2937',
  3773. rdldhar: '\u2969',
  3774. rdquo: '\u201D',
  3775. rdquor: '\u201D',
  3776. rdsh: '\u21B3',
  3777. real: '\u211C',
  3778. realine: '\u211B',
  3779. realpart: '\u211C',
  3780. reals: '\u211D',
  3781. rect: '\u25AD',
  3782. reg: '\u00AE',
  3783. rfisht: '\u297D',
  3784. rfloor: '\u230B',
  3785. rfr: '\uD835\uDD2F',
  3786. rhard: '\u21C1',
  3787. rharu: '\u21C0',
  3788. rharul: '\u296C',
  3789. rho: '\u03C1',
  3790. rhov: '\u03F1',
  3791. rightarrow: '\u2192',
  3792. rightarrowtail: '\u21A3',
  3793. rightharpoondown: '\u21C1',
  3794. rightharpoonup: '\u21C0',
  3795. rightleftarrows: '\u21C4',
  3796. rightleftharpoons: '\u21CC',
  3797. rightrightarrows: '\u21C9',
  3798. rightsquigarrow: '\u219D',
  3799. rightthreetimes: '\u22CC',
  3800. ring: '\u02DA',
  3801. risingdotseq: '\u2253',
  3802. rlarr: '\u21C4',
  3803. rlhar: '\u21CC',
  3804. rlm: '\u200F',
  3805. rmoust: '\u23B1',
  3806. rmoustache: '\u23B1',
  3807. rnmid: '\u2AEE',
  3808. roang: '\u27ED',
  3809. roarr: '\u21FE',
  3810. robrk: '\u27E7',
  3811. ropar: '\u2986',
  3812. ropf: '\uD835\uDD63',
  3813. roplus: '\u2A2E',
  3814. rotimes: '\u2A35',
  3815. rpar: '\u0029',
  3816. rpargt: '\u2994',
  3817. rppolint: '\u2A12',
  3818. rrarr: '\u21C9',
  3819. rsaquo: '\u203A',
  3820. rscr: '\uD835\uDCC7',
  3821. rsh: '\u21B1',
  3822. rsqb: '\u005D',
  3823. rsquo: '\u2019',
  3824. rsquor: '\u2019',
  3825. rthree: '\u22CC',
  3826. rtimes: '\u22CA',
  3827. rtri: '\u25B9',
  3828. rtrie: '\u22B5',
  3829. rtrif: '\u25B8',
  3830. rtriltri: '\u29CE',
  3831. ruluhar: '\u2968',
  3832. rx: '\u211E',
  3833. sacute: '\u015B',
  3834. sbquo: '\u201A',
  3835. sc: '\u227B',
  3836. scE: '\u2AB4',
  3837. scap: '\u2AB8',
  3838. scaron: '\u0161',
  3839. sccue: '\u227D',
  3840. sce: '\u2AB0',
  3841. scedil: '\u015F',
  3842. scirc: '\u015D',
  3843. scnE: '\u2AB6',
  3844. scnap: '\u2ABA',
  3845. scnsim: '\u22E9',
  3846. scpolint: '\u2A13',
  3847. scsim: '\u227F',
  3848. scy: '\u0441',
  3849. sdot: '\u22C5',
  3850. sdotb: '\u22A1',
  3851. sdote: '\u2A66',
  3852. seArr: '\u21D8',
  3853. searhk: '\u2925',
  3854. searr: '\u2198',
  3855. searrow: '\u2198',
  3856. sect: '\u00A7',
  3857. semi: '\u003B',
  3858. seswar: '\u2929',
  3859. setminus: '\u2216',
  3860. setmn: '\u2216',
  3861. sext: '\u2736',
  3862. sfr: '\uD835\uDD30',
  3863. sfrown: '\u2322',
  3864. sharp: '\u266F',
  3865. shchcy: '\u0449',
  3866. shcy: '\u0448',
  3867. shortmid: '\u2223',
  3868. shortparallel: '\u2225',
  3869. shy: '\u00AD',
  3870. sigma: '\u03C3',
  3871. sigmaf: '\u03C2',
  3872. sigmav: '\u03C2',
  3873. sim: '\u223C',
  3874. simdot: '\u2A6A',
  3875. sime: '\u2243',
  3876. simeq: '\u2243',
  3877. simg: '\u2A9E',
  3878. simgE: '\u2AA0',
  3879. siml: '\u2A9D',
  3880. simlE: '\u2A9F',
  3881. simne: '\u2246',
  3882. simplus: '\u2A24',
  3883. simrarr: '\u2972',
  3884. slarr: '\u2190',
  3885. smallsetminus: '\u2216',
  3886. smashp: '\u2A33',
  3887. smeparsl: '\u29E4',
  3888. smid: '\u2223',
  3889. smile: '\u2323',
  3890. smt: '\u2AAA',
  3891. smte: '\u2AAC',
  3892. smtes: '\u2AAC\uFE00',
  3893. softcy: '\u044C',
  3894. sol: '\u002F',
  3895. solb: '\u29C4',
  3896. solbar: '\u233F',
  3897. sopf: '\uD835\uDD64',
  3898. spades: '\u2660',
  3899. spadesuit: '\u2660',
  3900. spar: '\u2225',
  3901. sqcap: '\u2293',
  3902. sqcaps: '\u2293\uFE00',
  3903. sqcup: '\u2294',
  3904. sqcups: '\u2294\uFE00',
  3905. sqsub: '\u228F',
  3906. sqsube: '\u2291',
  3907. sqsubset: '\u228F',
  3908. sqsubseteq: '\u2291',
  3909. sqsup: '\u2290',
  3910. sqsupe: '\u2292',
  3911. sqsupset: '\u2290',
  3912. sqsupseteq: '\u2292',
  3913. squ: '\u25A1',
  3914. square: '\u25A1',
  3915. squarf: '\u25AA',
  3916. squf: '\u25AA',
  3917. srarr: '\u2192',
  3918. sscr: '\uD835\uDCC8',
  3919. ssetmn: '\u2216',
  3920. ssmile: '\u2323',
  3921. sstarf: '\u22C6',
  3922. star: '\u2606',
  3923. starf: '\u2605',
  3924. straightepsilon: '\u03F5',
  3925. straightphi: '\u03D5',
  3926. strns: '\u00AF',
  3927. sub: '\u2282',
  3928. subE: '\u2AC5',
  3929. subdot: '\u2ABD',
  3930. sube: '\u2286',
  3931. subedot: '\u2AC3',
  3932. submult: '\u2AC1',
  3933. subnE: '\u2ACB',
  3934. subne: '\u228A',
  3935. subplus: '\u2ABF',
  3936. subrarr: '\u2979',
  3937. subset: '\u2282',
  3938. subseteq: '\u2286',
  3939. subseteqq: '\u2AC5',
  3940. subsetneq: '\u228A',
  3941. subsetneqq: '\u2ACB',
  3942. subsim: '\u2AC7',
  3943. subsub: '\u2AD5',
  3944. subsup: '\u2AD3',
  3945. succ: '\u227B',
  3946. succapprox: '\u2AB8',
  3947. succcurlyeq: '\u227D',
  3948. succeq: '\u2AB0',
  3949. succnapprox: '\u2ABA',
  3950. succneqq: '\u2AB6',
  3951. succnsim: '\u22E9',
  3952. succsim: '\u227F',
  3953. sum: '\u2211',
  3954. sung: '\u266A',
  3955. sup1: '\u00B9',
  3956. sup2: '\u00B2',
  3957. sup3: '\u00B3',
  3958. sup: '\u2283',
  3959. supE: '\u2AC6',
  3960. supdot: '\u2ABE',
  3961. supdsub: '\u2AD8',
  3962. supe: '\u2287',
  3963. supedot: '\u2AC4',
  3964. suphsol: '\u27C9',
  3965. suphsub: '\u2AD7',
  3966. suplarr: '\u297B',
  3967. supmult: '\u2AC2',
  3968. supnE: '\u2ACC',
  3969. supne: '\u228B',
  3970. supplus: '\u2AC0',
  3971. supset: '\u2283',
  3972. supseteq: '\u2287',
  3973. supseteqq: '\u2AC6',
  3974. supsetneq: '\u228B',
  3975. supsetneqq: '\u2ACC',
  3976. supsim: '\u2AC8',
  3977. supsub: '\u2AD4',
  3978. supsup: '\u2AD6',
  3979. swArr: '\u21D9',
  3980. swarhk: '\u2926',
  3981. swarr: '\u2199',
  3982. swarrow: '\u2199',
  3983. swnwar: '\u292A',
  3984. szlig: '\u00DF',
  3985. target: '\u2316',
  3986. tau: '\u03C4',
  3987. tbrk: '\u23B4',
  3988. tcaron: '\u0165',
  3989. tcedil: '\u0163',
  3990. tcy: '\u0442',
  3991. tdot: '\u20DB',
  3992. telrec: '\u2315',
  3993. tfr: '\uD835\uDD31',
  3994. there4: '\u2234',
  3995. therefore: '\u2234',
  3996. theta: '\u03B8',
  3997. thetasym: '\u03D1',
  3998. thetav: '\u03D1',
  3999. thickapprox: '\u2248',
  4000. thicksim: '\u223C',
  4001. thinsp: '\u2009',
  4002. thkap: '\u2248',
  4003. thksim: '\u223C',
  4004. thorn: '\u00FE',
  4005. tilde: '\u02DC',
  4006. times: '\u00D7',
  4007. timesb: '\u22A0',
  4008. timesbar: '\u2A31',
  4009. timesd: '\u2A30',
  4010. tint: '\u222D',
  4011. toea: '\u2928',
  4012. top: '\u22A4',
  4013. topbot: '\u2336',
  4014. topcir: '\u2AF1',
  4015. topf: '\uD835\uDD65',
  4016. topfork: '\u2ADA',
  4017. tosa: '\u2929',
  4018. tprime: '\u2034',
  4019. trade: '\u2122',
  4020. triangle: '\u25B5',
  4021. triangledown: '\u25BF',
  4022. triangleleft: '\u25C3',
  4023. trianglelefteq: '\u22B4',
  4024. triangleq: '\u225C',
  4025. triangleright: '\u25B9',
  4026. trianglerighteq: '\u22B5',
  4027. tridot: '\u25EC',
  4028. trie: '\u225C',
  4029. triminus: '\u2A3A',
  4030. triplus: '\u2A39',
  4031. trisb: '\u29CD',
  4032. tritime: '\u2A3B',
  4033. trpezium: '\u23E2',
  4034. tscr: '\uD835\uDCC9',
  4035. tscy: '\u0446',
  4036. tshcy: '\u045B',
  4037. tstrok: '\u0167',
  4038. twixt: '\u226C',
  4039. twoheadleftarrow: '\u219E',
  4040. twoheadrightarrow: '\u21A0',
  4041. uArr: '\u21D1',
  4042. uHar: '\u2963',
  4043. uacute: '\u00FA',
  4044. uarr: '\u2191',
  4045. ubrcy: '\u045E',
  4046. ubreve: '\u016D',
  4047. ucirc: '\u00FB',
  4048. ucy: '\u0443',
  4049. udarr: '\u21C5',
  4050. udblac: '\u0171',
  4051. udhar: '\u296E',
  4052. ufisht: '\u297E',
  4053. ufr: '\uD835\uDD32',
  4054. ugrave: '\u00F9',
  4055. uharl: '\u21BF',
  4056. uharr: '\u21BE',
  4057. uhblk: '\u2580',
  4058. ulcorn: '\u231C',
  4059. ulcorner: '\u231C',
  4060. ulcrop: '\u230F',
  4061. ultri: '\u25F8',
  4062. umacr: '\u016B',
  4063. uml: '\u00A8',
  4064. uogon: '\u0173',
  4065. uopf: '\uD835\uDD66',
  4066. uparrow: '\u2191',
  4067. updownarrow: '\u2195',
  4068. upharpoonleft: '\u21BF',
  4069. upharpoonright: '\u21BE',
  4070. uplus: '\u228E',
  4071. upsi: '\u03C5',
  4072. upsih: '\u03D2',
  4073. upsilon: '\u03C5',
  4074. upuparrows: '\u21C8',
  4075. urcorn: '\u231D',
  4076. urcorner: '\u231D',
  4077. urcrop: '\u230E',
  4078. uring: '\u016F',
  4079. urtri: '\u25F9',
  4080. uscr: '\uD835\uDCCA',
  4081. utdot: '\u22F0',
  4082. utilde: '\u0169',
  4083. utri: '\u25B5',
  4084. utrif: '\u25B4',
  4085. uuarr: '\u21C8',
  4086. uuml: '\u00FC',
  4087. uwangle: '\u29A7',
  4088. vArr: '\u21D5',
  4089. vBar: '\u2AE8',
  4090. vBarv: '\u2AE9',
  4091. vDash: '\u22A8',
  4092. vangrt: '\u299C',
  4093. varepsilon: '\u03F5',
  4094. varkappa: '\u03F0',
  4095. varnothing: '\u2205',
  4096. varphi: '\u03D5',
  4097. varpi: '\u03D6',
  4098. varpropto: '\u221D',
  4099. varr: '\u2195',
  4100. varrho: '\u03F1',
  4101. varsigma: '\u03C2',
  4102. varsubsetneq: '\u228A\uFE00',
  4103. varsubsetneqq: '\u2ACB\uFE00',
  4104. varsupsetneq: '\u228B\uFE00',
  4105. varsupsetneqq: '\u2ACC\uFE00',
  4106. vartheta: '\u03D1',
  4107. vartriangleleft: '\u22B2',
  4108. vartriangleright: '\u22B3',
  4109. vcy: '\u0432',
  4110. vdash: '\u22A2',
  4111. vee: '\u2228',
  4112. veebar: '\u22BB',
  4113. veeeq: '\u225A',
  4114. vellip: '\u22EE',
  4115. verbar: '\u007C',
  4116. vert: '\u007C',
  4117. vfr: '\uD835\uDD33',
  4118. vltri: '\u22B2',
  4119. vnsub: '\u2282\u20D2',
  4120. vnsup: '\u2283\u20D2',
  4121. vopf: '\uD835\uDD67',
  4122. vprop: '\u221D',
  4123. vrtri: '\u22B3',
  4124. vscr: '\uD835\uDCCB',
  4125. vsubnE: '\u2ACB\uFE00',
  4126. vsubne: '\u228A\uFE00',
  4127. vsupnE: '\u2ACC\uFE00',
  4128. vsupne: '\u228B\uFE00',
  4129. vzigzag: '\u299A',
  4130. wcirc: '\u0175',
  4131. wedbar: '\u2A5F',
  4132. wedge: '\u2227',
  4133. wedgeq: '\u2259',
  4134. weierp: '\u2118',
  4135. wfr: '\uD835\uDD34',
  4136. wopf: '\uD835\uDD68',
  4137. wp: '\u2118',
  4138. wr: '\u2240',
  4139. wreath: '\u2240',
  4140. wscr: '\uD835\uDCCC',
  4141. xcap: '\u22C2',
  4142. xcirc: '\u25EF',
  4143. xcup: '\u22C3',
  4144. xdtri: '\u25BD',
  4145. xfr: '\uD835\uDD35',
  4146. xhArr: '\u27FA',
  4147. xharr: '\u27F7',
  4148. xi: '\u03BE',
  4149. xlArr: '\u27F8',
  4150. xlarr: '\u27F5',
  4151. xmap: '\u27FC',
  4152. xnis: '\u22FB',
  4153. xodot: '\u2A00',
  4154. xopf: '\uD835\uDD69',
  4155. xoplus: '\u2A01',
  4156. xotime: '\u2A02',
  4157. xrArr: '\u27F9',
  4158. xrarr: '\u27F6',
  4159. xscr: '\uD835\uDCCD',
  4160. xsqcup: '\u2A06',
  4161. xuplus: '\u2A04',
  4162. xutri: '\u25B3',
  4163. xvee: '\u22C1',
  4164. xwedge: '\u22C0',
  4165. yacute: '\u00FD',
  4166. yacy: '\u044F',
  4167. ycirc: '\u0177',
  4168. ycy: '\u044B',
  4169. yen: '\u00A5',
  4170. yfr: '\uD835\uDD36',
  4171. yicy: '\u0457',
  4172. yopf: '\uD835\uDD6A',
  4173. yscr: '\uD835\uDCCE',
  4174. yucy: '\u044E',
  4175. yuml: '\u00FF',
  4176. zacute: '\u017A',
  4177. zcaron: '\u017E',
  4178. zcy: '\u0437',
  4179. zdot: '\u017C',
  4180. zeetrf: '\u2128',
  4181. zeta: '\u03B6',
  4182. zfr: '\uD835\uDD37',
  4183. zhcy: '\u0436',
  4184. zigrarr: '\u21DD',
  4185. zopf: '\uD835\uDD6B',
  4186. zscr: '\uD835\uDCCF',
  4187. zwj: '\u200D',
  4188. zwnj: '\u200C'
  4189. };
  4190. const decodeMap = {
  4191. '0': 65533,
  4192. '128': 8364,
  4193. '130': 8218,
  4194. '131': 402,
  4195. '132': 8222,
  4196. '133': 8230,
  4197. '134': 8224,
  4198. '135': 8225,
  4199. '136': 710,
  4200. '137': 8240,
  4201. '138': 352,
  4202. '139': 8249,
  4203. '140': 338,
  4204. '142': 381,
  4205. '145': 8216,
  4206. '146': 8217,
  4207. '147': 8220,
  4208. '148': 8221,
  4209. '149': 8226,
  4210. '150': 8211,
  4211. '151': 8212,
  4212. '152': 732,
  4213. '153': 8482,
  4214. '154': 353,
  4215. '155': 8250,
  4216. '156': 339,
  4217. '158': 382,
  4218. '159': 376
  4219. };
  4220. function decodeHTMLStrict(text) {
  4221. return text.replace(/&(?:[a-zA-Z]+|#[xX][\da-fA-F]+|#\d+);/g, (key) => {
  4222. if (key.charAt(1) === '#') {
  4223. const secondChar = key.charAt(2);
  4224. const codePoint = secondChar === 'X' || secondChar === 'x'
  4225. ? parseInt(key.slice(3), 16)
  4226. : parseInt(key.slice(2), 10);
  4227. return decodeCodePoint(codePoint);
  4228. }
  4229. return entities[key.slice(1, -1)] || key;
  4230. });
  4231. }
  4232. function decodeCodePoint(codePoint) {
  4233. if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {
  4234. return '\uFFFD';
  4235. }
  4236. if (codePoint in decodeMap) {
  4237. codePoint = decodeMap[codePoint];
  4238. }
  4239. return String.fromCodePoint(codePoint);
  4240. }
  4241. function scanJSXAttributeValue(parser, context) {
  4242. parser.startPos = parser.tokenPos = parser.index;
  4243. parser.startColumn = parser.colPos = parser.column;
  4244. parser.startLine = parser.linePos = parser.line;
  4245. parser.token =
  4246. CharTypes[parser.currentChar] & 8192
  4247. ? scanJSXString(parser, context)
  4248. : scanSingleToken(parser, context, 0);
  4249. return parser.token;
  4250. }
  4251. function scanJSXString(parser, context) {
  4252. const quote = parser.currentChar;
  4253. let char = advanceChar(parser);
  4254. const start = parser.index;
  4255. while (char !== quote) {
  4256. if (parser.index >= parser.end)
  4257. report(parser, 14);
  4258. char = advanceChar(parser);
  4259. }
  4260. if (char !== quote)
  4261. report(parser, 14);
  4262. parser.tokenValue = parser.source.slice(start, parser.index);
  4263. advanceChar(parser);
  4264. if (context & 512)
  4265. parser.tokenRaw = parser.source.slice(parser.tokenPos, parser.index);
  4266. return 134283267;
  4267. }
  4268. function scanJSXToken(parser, context) {
  4269. parser.startPos = parser.tokenPos = parser.index;
  4270. parser.startColumn = parser.colPos = parser.column;
  4271. parser.startLine = parser.linePos = parser.line;
  4272. if (parser.index >= parser.end)
  4273. return (parser.token = 1048576);
  4274. const token = TokenLookup[parser.source.charCodeAt(parser.index)];
  4275. switch (token) {
  4276. case 8456258: {
  4277. advanceChar(parser);
  4278. if (parser.currentChar === 47) {
  4279. advanceChar(parser);
  4280. parser.token = 25;
  4281. }
  4282. else {
  4283. parser.token = 8456258;
  4284. }
  4285. break;
  4286. }
  4287. case 2162700: {
  4288. advanceChar(parser);
  4289. parser.token = 2162700;
  4290. break;
  4291. }
  4292. default: {
  4293. let state = 0;
  4294. while (parser.index < parser.end) {
  4295. const type = CharTypes[parser.source.charCodeAt(parser.index)];
  4296. if (type & 1024) {
  4297. state |= 1 | 4;
  4298. scanNewLine(parser);
  4299. }
  4300. else if (type & 2048) {
  4301. consumeLineFeed(parser, state);
  4302. state = (state & ~4) | 1;
  4303. }
  4304. else {
  4305. advanceChar(parser);
  4306. }
  4307. if (CharTypes[parser.currentChar] & 16384)
  4308. break;
  4309. }
  4310. const raw = parser.source.slice(parser.tokenPos, parser.index);
  4311. if (context & 512)
  4312. parser.tokenRaw = raw;
  4313. parser.tokenValue = decodeHTMLStrict(raw);
  4314. parser.token = 138;
  4315. }
  4316. }
  4317. return parser.token;
  4318. }
  4319. function scanJSXIdentifier(parser) {
  4320. if ((parser.token & 143360) === 143360) {
  4321. const { index } = parser;
  4322. let char = parser.currentChar;
  4323. while (CharTypes[char] & (32768 | 2)) {
  4324. char = advanceChar(parser);
  4325. }
  4326. parser.tokenValue += parser.source.slice(index, parser.index);
  4327. }
  4328. parser.token = 208897;
  4329. return parser.token;
  4330. }
  4331. function matchOrInsertSemicolon(parser, context, specDeviation) {
  4332. if ((parser.flags & 1) === 0 &&
  4333. (parser.token & 1048576) !== 1048576 &&
  4334. !specDeviation) {
  4335. report(parser, 28, KeywordDescTable[parser.token & 255]);
  4336. }
  4337. consumeOpt(parser, context, 1074790417);
  4338. }
  4339. function isValidStrictMode(parser, index, tokenPos, tokenValue) {
  4340. if (index - tokenPos < 13 && tokenValue === 'use strict') {
  4341. if ((parser.token & 1048576) === 1048576 || parser.flags & 1) {
  4342. return 1;
  4343. }
  4344. }
  4345. return 0;
  4346. }
  4347. function optionalBit(parser, context, t) {
  4348. if (parser.token !== t)
  4349. return 0;
  4350. nextToken(parser, context);
  4351. return 1;
  4352. }
  4353. function consumeOpt(parser, context, t) {
  4354. if (parser.token !== t)
  4355. return false;
  4356. nextToken(parser, context);
  4357. return true;
  4358. }
  4359. function consume(parser, context, t) {
  4360. if (parser.token !== t)
  4361. report(parser, 23, KeywordDescTable[t & 255]);
  4362. nextToken(parser, context);
  4363. }
  4364. function reinterpretToPattern(state, node) {
  4365. switch (node.type) {
  4366. case 'ArrayExpression':
  4367. node.type = 'ArrayPattern';
  4368. const elements = node.elements;
  4369. for (let i = 0, n = elements.length; i < n; ++i) {
  4370. const element = elements[i];
  4371. if (element)
  4372. reinterpretToPattern(state, element);
  4373. }
  4374. return;
  4375. case 'ObjectExpression':
  4376. node.type = 'ObjectPattern';
  4377. const properties = node.properties;
  4378. for (let i = 0, n = properties.length; i < n; ++i) {
  4379. reinterpretToPattern(state, properties[i]);
  4380. }
  4381. return;
  4382. case 'AssignmentExpression':
  4383. node.type = 'AssignmentPattern';
  4384. if (node.operator !== '=')
  4385. report(state, 68);
  4386. delete node.operator;
  4387. reinterpretToPattern(state, node.left);
  4388. return;
  4389. case 'Property':
  4390. reinterpretToPattern(state, node.value);
  4391. return;
  4392. case 'SpreadElement':
  4393. node.type = 'RestElement';
  4394. reinterpretToPattern(state, node.argument);
  4395. }
  4396. }
  4397. function validateBindingIdentifier(parser, context, kind, t, skipEvalArgCheck) {
  4398. if (context & 1024) {
  4399. if ((t & 36864) === 36864) {
  4400. report(parser, 114);
  4401. }
  4402. if (!skipEvalArgCheck && (t & 537079808) === 537079808) {
  4403. report(parser, 115);
  4404. }
  4405. }
  4406. if ((t & 20480) === 20480) {
  4407. report(parser, 99);
  4408. }
  4409. if (kind & (8 | 16) && t === 241739) {
  4410. report(parser, 97);
  4411. }
  4412. if (context & (4194304 | 2048) && t === 209008) {
  4413. report(parser, 95);
  4414. }
  4415. if (context & (2097152 | 1024) && t === 241773) {
  4416. report(parser, 94, 'yield');
  4417. }
  4418. }
  4419. function validateFunctionName(parser, context, t) {
  4420. if (context & 1024) {
  4421. if ((t & 36864) === 36864) {
  4422. report(parser, 114);
  4423. }
  4424. if ((t & 537079808) === 537079808) {
  4425. report(parser, 115);
  4426. }
  4427. if (t === 122) {
  4428. report(parser, 92);
  4429. }
  4430. if (t === 121) {
  4431. report(parser, 92);
  4432. }
  4433. }
  4434. if ((t & 20480) === 20480) {
  4435. report(parser, 99);
  4436. }
  4437. if (context & (4194304 | 2048) && t === 209008) {
  4438. report(parser, 95);
  4439. }
  4440. if (context & (2097152 | 1024) && t === 241773) {
  4441. report(parser, 94, 'yield');
  4442. }
  4443. }
  4444. function isStrictReservedWord(parser, context, t) {
  4445. if (t === 209008) {
  4446. if (context & (4194304 | 2048))
  4447. report(parser, 95);
  4448. parser.destructible |= 128;
  4449. }
  4450. if (t === 241773 && context & 2097152)
  4451. report(parser, 94, 'yield');
  4452. return ((t & 20480) === 20480 ||
  4453. (t & 36864) === 36864 ||
  4454. t == 122);
  4455. }
  4456. function isPropertyWithPrivateFieldKey(expr) {
  4457. return !expr.property ? false : expr.property.type === 'PrivateIdentifier';
  4458. }
  4459. function isValidLabel(parser, labels, name, isIterationStatement) {
  4460. while (labels) {
  4461. if (labels['$' + name]) {
  4462. if (isIterationStatement)
  4463. report(parser, 133);
  4464. return 1;
  4465. }
  4466. if (isIterationStatement && labels.loop)
  4467. isIterationStatement = 0;
  4468. labels = labels['$'];
  4469. }
  4470. return 0;
  4471. }
  4472. function validateAndDeclareLabel(parser, labels, name) {
  4473. let set = labels;
  4474. while (set) {
  4475. if (set['$' + name])
  4476. report(parser, 132, name);
  4477. set = set['$'];
  4478. }
  4479. labels['$' + name] = 1;
  4480. }
  4481. function finishNode(parser, context, start, line, column, node) {
  4482. if (context & 2) {
  4483. node.start = start;
  4484. node.end = parser.startPos;
  4485. node.range = [start, parser.startPos];
  4486. }
  4487. if (context & 4) {
  4488. node.loc = {
  4489. start: {
  4490. line,
  4491. column
  4492. },
  4493. end: {
  4494. line: parser.startLine,
  4495. column: parser.startColumn
  4496. }
  4497. };
  4498. if (parser.sourceFile) {
  4499. node.loc.source = parser.sourceFile;
  4500. }
  4501. }
  4502. return node;
  4503. }
  4504. function isEqualTagName(elementName) {
  4505. switch (elementName.type) {
  4506. case 'JSXIdentifier':
  4507. return elementName.name;
  4508. case 'JSXNamespacedName':
  4509. return elementName.namespace + ':' + elementName.name;
  4510. case 'JSXMemberExpression':
  4511. return isEqualTagName(elementName.object) + '.' + isEqualTagName(elementName.property);
  4512. }
  4513. }
  4514. function createArrowHeadParsingScope(parser, context, value) {
  4515. const scope = addChildScope(createScope(), 1024);
  4516. addBlockName(parser, context, scope, value, 1, 0);
  4517. return scope;
  4518. }
  4519. function recordScopeError(parser, type, ...params) {
  4520. const { index, line, column } = parser;
  4521. return {
  4522. type,
  4523. params,
  4524. index,
  4525. line,
  4526. column
  4527. };
  4528. }
  4529. function createScope() {
  4530. return {
  4531. parent: void 0,
  4532. type: 2
  4533. };
  4534. }
  4535. function addChildScope(parent, type) {
  4536. return {
  4537. parent,
  4538. type,
  4539. scopeError: void 0
  4540. };
  4541. }
  4542. function addVarOrBlock(parser, context, scope, name, kind, origin) {
  4543. if (kind & 4) {
  4544. addVarName(parser, context, scope, name, kind);
  4545. }
  4546. else {
  4547. addBlockName(parser, context, scope, name, kind, origin);
  4548. }
  4549. if (origin & 64) {
  4550. declareUnboundVariable(parser, name);
  4551. }
  4552. }
  4553. function addBlockName(parser, context, scope, name, kind, origin) {
  4554. const value = scope['#' + name];
  4555. if (value && (value & 2) === 0) {
  4556. if (kind & 1) {
  4557. scope.scopeError = recordScopeError(parser, 140, name);
  4558. }
  4559. else if (context & 256 &&
  4560. value & 64 &&
  4561. origin & 2) ;
  4562. else {
  4563. report(parser, 140, name);
  4564. }
  4565. }
  4566. if (scope.type & 128 &&
  4567. (scope.parent['#' + name] && (scope.parent['#' + name] & 2) === 0)) {
  4568. report(parser, 140, name);
  4569. }
  4570. if (scope.type & 1024 && value && (value & 2) === 0) {
  4571. if (kind & 1) {
  4572. scope.scopeError = recordScopeError(parser, 140, name);
  4573. }
  4574. }
  4575. if (scope.type & 64) {
  4576. if (scope.parent['#' + name] & 768)
  4577. report(parser, 153, name);
  4578. }
  4579. scope['#' + name] = kind;
  4580. }
  4581. function addVarName(parser, context, scope, name, kind) {
  4582. let currentScope = scope;
  4583. while (currentScope && (currentScope.type & 256) === 0) {
  4584. const value = currentScope['#' + name];
  4585. if (value & 248) {
  4586. if (context & 256 &&
  4587. (context & 1024) === 0 &&
  4588. ((kind & 128 && value & 68) ||
  4589. (value & 128 && kind & 68))) ;
  4590. else {
  4591. report(parser, 140, name);
  4592. }
  4593. }
  4594. if (currentScope === scope) {
  4595. if (value & 1 && kind & 1) {
  4596. currentScope.scopeError = recordScopeError(parser, 140, name);
  4597. }
  4598. }
  4599. if (value & (512 | 256)) {
  4600. if ((value & 512) === 0 ||
  4601. (context & 256) === 0 ||
  4602. context & 1024) {
  4603. report(parser, 140, name);
  4604. }
  4605. }
  4606. currentScope['#' + name] = kind;
  4607. currentScope = currentScope.parent;
  4608. }
  4609. }
  4610. function declareUnboundVariable(parser, name) {
  4611. if (parser.exportedNames !== void 0 && name !== '') {
  4612. if (parser.exportedNames['#' + name]) {
  4613. report(parser, 141, name);
  4614. }
  4615. parser.exportedNames['#' + name] = 1;
  4616. }
  4617. }
  4618. function addBindingToExports(parser, name) {
  4619. if (parser.exportedBindings !== void 0 && name !== '') {
  4620. parser.exportedBindings['#' + name] = 1;
  4621. }
  4622. }
  4623. function pushComment(context, array) {
  4624. return function (type, value, start, end, loc) {
  4625. const comment = {
  4626. type,
  4627. value
  4628. };
  4629. if (context & 2) {
  4630. comment.start = start;
  4631. comment.end = end;
  4632. comment.range = [start, end];
  4633. }
  4634. if (context & 4) {
  4635. comment.loc = loc;
  4636. }
  4637. array.push(comment);
  4638. };
  4639. }
  4640. function pushToken(context, array) {
  4641. return function (token, start, end, loc) {
  4642. const tokens = {
  4643. token
  4644. };
  4645. if (context & 2) {
  4646. tokens.start = start;
  4647. tokens.end = end;
  4648. tokens.range = [start, end];
  4649. }
  4650. if (context & 4) {
  4651. tokens.loc = loc;
  4652. }
  4653. array.push(tokens);
  4654. };
  4655. }
  4656. function isValidIdentifier(context, t) {
  4657. if (context & (1024 | 2097152)) {
  4658. if (context & 2048 && t === 209008)
  4659. return false;
  4660. if (context & 2097152 && t === 241773)
  4661. return false;
  4662. return (t & 143360) === 143360 || (t & 12288) === 12288;
  4663. }
  4664. return ((t & 143360) === 143360 ||
  4665. (t & 12288) === 12288 ||
  4666. (t & 36864) === 36864);
  4667. }
  4668. function classifyIdentifier(parser, context, t, isArrow) {
  4669. if ((t & 537079808) === 537079808) {
  4670. if (context & 1024)
  4671. report(parser, 115);
  4672. if (isArrow)
  4673. parser.flags |= 512;
  4674. }
  4675. if (!isValidIdentifier(context, t))
  4676. report(parser, 0);
  4677. }
  4678. function create(source, sourceFile, onComment, onToken) {
  4679. return {
  4680. source,
  4681. flags: 0,
  4682. index: 0,
  4683. line: 1,
  4684. column: 0,
  4685. startPos: 0,
  4686. end: source.length,
  4687. tokenPos: 0,
  4688. startColumn: 0,
  4689. colPos: 0,
  4690. linePos: 1,
  4691. startLine: 1,
  4692. sourceFile,
  4693. tokenValue: '',
  4694. token: 1048576,
  4695. tokenRaw: '',
  4696. tokenRegExp: void 0,
  4697. currentChar: source.charCodeAt(0),
  4698. exportedNames: [],
  4699. exportedBindings: [],
  4700. assignable: 1,
  4701. destructible: 0,
  4702. onComment,
  4703. onToken,
  4704. leadingDecorators: []
  4705. };
  4706. }
  4707. function parseSource(source, options, context) {
  4708. let sourceFile = '';
  4709. let onComment;
  4710. let onToken;
  4711. if (options != null) {
  4712. if (options.module)
  4713. context |= 2048 | 1024;
  4714. if (options.next)
  4715. context |= 1;
  4716. if (options.loc)
  4717. context |= 4;
  4718. if (options.ranges)
  4719. context |= 2;
  4720. if (options.uniqueKeyInPattern)
  4721. context |= -2147483648;
  4722. if (options.lexical)
  4723. context |= 64;
  4724. if (options.webcompat)
  4725. context |= 256;
  4726. if (options.directives)
  4727. context |= 8 | 512;
  4728. if (options.globalReturn)
  4729. context |= 32;
  4730. if (options.raw)
  4731. context |= 512;
  4732. if (options.preserveParens)
  4733. context |= 128;
  4734. if (options.impliedStrict)
  4735. context |= 1024;
  4736. if (options.jsx)
  4737. context |= 16;
  4738. if (options.identifierPattern)
  4739. context |= 268435456;
  4740. if (options.specDeviation)
  4741. context |= 536870912;
  4742. if (options.source)
  4743. sourceFile = options.source;
  4744. if (options.onComment != null) {
  4745. onComment = Array.isArray(options.onComment) ? pushComment(context, options.onComment) : options.onComment;
  4746. }
  4747. if (options.onToken != null) {
  4748. onToken = Array.isArray(options.onToken) ? pushToken(context, options.onToken) : options.onToken;
  4749. }
  4750. }
  4751. const parser = create(source, sourceFile, onComment, onToken);
  4752. if (context & 1)
  4753. skipHashBang(parser);
  4754. const scope = context & 64 ? createScope() : void 0;
  4755. let body = [];
  4756. let sourceType = 'script';
  4757. if (context & 2048) {
  4758. sourceType = 'module';
  4759. body = parseModuleItemList(parser, context | 8192, scope);
  4760. if (scope) {
  4761. for (const key in parser.exportedBindings) {
  4762. if (key[0] === '#' && !scope[key])
  4763. report(parser, 142, key.slice(1));
  4764. }
  4765. }
  4766. }
  4767. else {
  4768. body = parseStatementList(parser, context | 8192, scope);
  4769. }
  4770. const node = {
  4771. type: 'Program',
  4772. sourceType,
  4773. body
  4774. };
  4775. if (context & 2) {
  4776. node.start = 0;
  4777. node.end = source.length;
  4778. node.range = [0, source.length];
  4779. }
  4780. if (context & 4) {
  4781. node.loc = {
  4782. start: { line: 1, column: 0 },
  4783. end: { line: parser.line, column: parser.column }
  4784. };
  4785. if (parser.sourceFile)
  4786. node.loc.source = sourceFile;
  4787. }
  4788. return node;
  4789. }
  4790. function parseStatementList(parser, context, scope) {
  4791. nextToken(parser, context | 32768 | 1073741824);
  4792. const statements = [];
  4793. while (parser.token === 134283267) {
  4794. const { index, tokenPos, tokenValue, linePos, colPos, token } = parser;
  4795. const expr = parseLiteral(parser, context);
  4796. if (isValidStrictMode(parser, index, tokenPos, tokenValue))
  4797. context |= 1024;
  4798. statements.push(parseDirective(parser, context, expr, token, tokenPos, linePos, colPos));
  4799. }
  4800. while (parser.token !== 1048576) {
  4801. statements.push(parseStatementListItem(parser, context, scope, 4, {}));
  4802. }
  4803. return statements;
  4804. }
  4805. function parseModuleItemList(parser, context, scope) {
  4806. nextToken(parser, context | 32768);
  4807. const statements = [];
  4808. if (context & 8) {
  4809. while (parser.token === 134283267) {
  4810. const { tokenPos, linePos, colPos, token } = parser;
  4811. statements.push(parseDirective(parser, context, parseLiteral(parser, context), token, tokenPos, linePos, colPos));
  4812. }
  4813. }
  4814. while (parser.token !== 1048576) {
  4815. statements.push(parseModuleItem(parser, context, scope));
  4816. }
  4817. return statements;
  4818. }
  4819. function parseModuleItem(parser, context, scope) {
  4820. parser.leadingDecorators = parseDecorators(parser, context);
  4821. let moduleItem;
  4822. switch (parser.token) {
  4823. case 20566:
  4824. moduleItem = parseExportDeclaration(parser, context, scope);
  4825. break;
  4826. case 86108:
  4827. moduleItem = parseImportDeclaration(parser, context, scope);
  4828. break;
  4829. default:
  4830. moduleItem = parseStatementListItem(parser, context, scope, 4, {});
  4831. }
  4832. if (parser.leadingDecorators.length) {
  4833. report(parser, 164);
  4834. }
  4835. return moduleItem;
  4836. }
  4837. function parseStatementListItem(parser, context, scope, origin, labels) {
  4838. const start = parser.tokenPos;
  4839. const line = parser.linePos;
  4840. const column = parser.colPos;
  4841. switch (parser.token) {
  4842. case 86106:
  4843. return parseFunctionDeclaration(parser, context, scope, origin, 1, 0, 0, start, line, column);
  4844. case 133:
  4845. case 86096:
  4846. return parseClassDeclaration(parser, context, scope, 0, start, line, column);
  4847. case 86092:
  4848. return parseLexicalDeclaration(parser, context, scope, 16, 0, start, line, column);
  4849. case 241739:
  4850. return parseLetIdentOrVarDeclarationStatement(parser, context, scope, origin, start, line, column);
  4851. case 20566:
  4852. report(parser, 100, 'export');
  4853. case 86108:
  4854. nextToken(parser, context);
  4855. switch (parser.token) {
  4856. case 67174411:
  4857. return parseImportCallDeclaration(parser, context, start, line, column);
  4858. case 67108877:
  4859. return parseImportMetaDeclaration(parser, context, start, line, column);
  4860. default:
  4861. report(parser, 100, 'import');
  4862. }
  4863. case 209007:
  4864. return parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, 1, start, line, column);
  4865. default:
  4866. return parseStatement(parser, context, scope, origin, labels, 1, start, line, column);
  4867. }
  4868. }
  4869. function parseStatement(parser, context, scope, origin, labels, allowFuncDecl, start, line, column) {
  4870. switch (parser.token) {
  4871. case 86090:
  4872. return parseVariableStatement(parser, context, scope, 0, start, line, column);
  4873. case 20574:
  4874. return parseReturnStatement(parser, context, start, line, column);
  4875. case 20571:
  4876. return parseIfStatement(parser, context, scope, labels, start, line, column);
  4877. case 20569:
  4878. return parseForStatement(parser, context, scope, labels, start, line, column);
  4879. case 20564:
  4880. return parseDoWhileStatement(parser, context, scope, labels, start, line, column);
  4881. case 20580:
  4882. return parseWhileStatement(parser, context, scope, labels, start, line, column);
  4883. case 86112:
  4884. return parseSwitchStatement(parser, context, scope, labels, start, line, column);
  4885. case 1074790417:
  4886. return parseEmptyStatement(parser, context, start, line, column);
  4887. case 2162700:
  4888. return parseBlock(parser, context, scope ? addChildScope(scope, 2) : scope, labels, start, line, column);
  4889. case 86114:
  4890. return parseThrowStatement(parser, context, start, line, column);
  4891. case 20557:
  4892. return parseBreakStatement(parser, context, labels, start, line, column);
  4893. case 20561:
  4894. return parseContinueStatement(parser, context, labels, start, line, column);
  4895. case 20579:
  4896. return parseTryStatement(parser, context, scope, labels, start, line, column);
  4897. case 20581:
  4898. return parseWithStatement(parser, context, scope, labels, start, line, column);
  4899. case 20562:
  4900. return parseDebuggerStatement(parser, context, start, line, column);
  4901. case 209007:
  4902. return parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, 0, start, line, column);
  4903. case 20559:
  4904. report(parser, 156);
  4905. case 20568:
  4906. report(parser, 157);
  4907. case 86106:
  4908. report(parser, context & 1024
  4909. ? 73
  4910. : (context & 256) < 1
  4911. ? 75
  4912. : 74);
  4913. case 86096:
  4914. report(parser, 76);
  4915. default:
  4916. return parseExpressionOrLabelledStatement(parser, context, scope, origin, labels, allowFuncDecl, start, line, column);
  4917. }
  4918. }
  4919. function parseExpressionOrLabelledStatement(parser, context, scope, origin, labels, allowFuncDecl, start, line, column) {
  4920. const { tokenValue, token } = parser;
  4921. let expr;
  4922. switch (token) {
  4923. case 241739:
  4924. expr = parseIdentifier(parser, context, 0);
  4925. if (context & 1024)
  4926. report(parser, 82);
  4927. if (parser.token === 69271571)
  4928. report(parser, 81);
  4929. break;
  4930. default:
  4931. expr = parsePrimaryExpression(parser, context, 2, 0, 1, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  4932. }
  4933. if (token & 143360 && parser.token === 21) {
  4934. return parseLabelledStatement(parser, context, scope, origin, labels, tokenValue, expr, token, allowFuncDecl, start, line, column);
  4935. }
  4936. expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, start, line, column);
  4937. expr = parseAssignmentExpression(parser, context, 0, 0, start, line, column, expr);
  4938. if (parser.token === 18) {
  4939. expr = parseSequenceExpression(parser, context, 0, start, line, column, expr);
  4940. }
  4941. return parseExpressionStatement(parser, context, expr, start, line, column);
  4942. }
  4943. function parseBlock(parser, context, scope, labels, start, line, column) {
  4944. const body = [];
  4945. consume(parser, context | 32768, 2162700);
  4946. while (parser.token !== 1074790415) {
  4947. body.push(parseStatementListItem(parser, context, scope, 2, { $: labels }));
  4948. }
  4949. consume(parser, context | 32768, 1074790415);
  4950. return finishNode(parser, context, start, line, column, {
  4951. type: 'BlockStatement',
  4952. body
  4953. });
  4954. }
  4955. function parseReturnStatement(parser, context, start, line, column) {
  4956. if ((context & 32) < 1 && context & 8192)
  4957. report(parser, 89);
  4958. nextToken(parser, context | 32768);
  4959. const argument = parser.flags & 1 || parser.token & 1048576
  4960. ? null
  4961. : parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.line, parser.column);
  4962. matchOrInsertSemicolon(parser, context | 32768);
  4963. return finishNode(parser, context, start, line, column, {
  4964. type: 'ReturnStatement',
  4965. argument
  4966. });
  4967. }
  4968. function parseExpressionStatement(parser, context, expression, start, line, column) {
  4969. matchOrInsertSemicolon(parser, context | 32768);
  4970. return finishNode(parser, context, start, line, column, {
  4971. type: 'ExpressionStatement',
  4972. expression
  4973. });
  4974. }
  4975. function parseLabelledStatement(parser, context, scope, origin, labels, value, expr, token, allowFuncDecl, start, line, column) {
  4976. validateBindingIdentifier(parser, context, 0, token, 1);
  4977. validateAndDeclareLabel(parser, labels, value);
  4978. nextToken(parser, context | 32768);
  4979. const body = allowFuncDecl &&
  4980. (context & 1024) < 1 &&
  4981. context & 256 &&
  4982. parser.token === 86106
  4983. ? parseFunctionDeclaration(parser, context, addChildScope(scope, 2), origin, 0, 0, 0, parser.tokenPos, parser.linePos, parser.colPos)
  4984. : parseStatement(parser, context, scope, origin, labels, allowFuncDecl, parser.tokenPos, parser.linePos, parser.colPos);
  4985. return finishNode(parser, context, start, line, column, {
  4986. type: 'LabeledStatement',
  4987. label: expr,
  4988. body
  4989. });
  4990. }
  4991. function parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, allowFuncDecl, start, line, column) {
  4992. const { token, tokenValue } = parser;
  4993. let expr = parseIdentifier(parser, context, 0);
  4994. if (parser.token === 21) {
  4995. return parseLabelledStatement(parser, context, scope, origin, labels, tokenValue, expr, token, 1, start, line, column);
  4996. }
  4997. const asyncNewLine = parser.flags & 1;
  4998. if (!asyncNewLine) {
  4999. if (parser.token === 86106) {
  5000. if (!allowFuncDecl)
  5001. report(parser, 119);
  5002. return parseFunctionDeclaration(parser, context, scope, origin, 1, 0, 1, start, line, column);
  5003. }
  5004. if ((parser.token & 143360) === 143360) {
  5005. expr = parseAsyncArrowAfterIdent(parser, context, 1, start, line, column);
  5006. if (parser.token === 18)
  5007. expr = parseSequenceExpression(parser, context, 0, start, line, column, expr);
  5008. return parseExpressionStatement(parser, context, expr, start, line, column);
  5009. }
  5010. }
  5011. if (parser.token === 67174411) {
  5012. expr = parseAsyncArrowOrCallExpression(parser, context, expr, 1, 1, 0, asyncNewLine, start, line, column);
  5013. }
  5014. else {
  5015. if (parser.token === 10) {
  5016. classifyIdentifier(parser, context, token, 1);
  5017. expr = parseArrowFromIdentifier(parser, context, parser.tokenValue, expr, 0, 1, 0, start, line, column);
  5018. }
  5019. parser.assignable = 1;
  5020. }
  5021. expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, start, line, column);
  5022. if (parser.token === 18)
  5023. expr = parseSequenceExpression(parser, context, 0, start, line, column, expr);
  5024. expr = parseAssignmentExpression(parser, context, 0, 0, start, line, column, expr);
  5025. parser.assignable = 1;
  5026. return parseExpressionStatement(parser, context, expr, start, line, column);
  5027. }
  5028. function parseDirective(parser, context, expression, token, start, line, column) {
  5029. if (token !== 1074790417) {
  5030. parser.assignable = 2;
  5031. expression = parseMemberOrUpdateExpression(parser, context, expression, 0, 0, start, line, column);
  5032. if (parser.token !== 1074790417) {
  5033. expression = parseAssignmentExpression(parser, context, 0, 0, start, line, column, expression);
  5034. if (parser.token === 18) {
  5035. expression = parseSequenceExpression(parser, context, 0, start, line, column, expression);
  5036. }
  5037. }
  5038. matchOrInsertSemicolon(parser, context | 32768);
  5039. }
  5040. return context & 8 && expression.type === 'Literal' && typeof expression.value === 'string'
  5041. ? finishNode(parser, context, start, line, column, {
  5042. type: 'ExpressionStatement',
  5043. expression,
  5044. directive: expression.raw.slice(1, -1)
  5045. })
  5046. : finishNode(parser, context, start, line, column, {
  5047. type: 'ExpressionStatement',
  5048. expression
  5049. });
  5050. }
  5051. function parseEmptyStatement(parser, context, start, line, column) {
  5052. nextToken(parser, context | 32768);
  5053. return finishNode(parser, context, start, line, column, {
  5054. type: 'EmptyStatement'
  5055. });
  5056. }
  5057. function parseThrowStatement(parser, context, start, line, column) {
  5058. nextToken(parser, context | 32768);
  5059. if (parser.flags & 1)
  5060. report(parser, 87);
  5061. const argument = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5062. matchOrInsertSemicolon(parser, context | 32768);
  5063. return finishNode(parser, context, start, line, column, {
  5064. type: 'ThrowStatement',
  5065. argument
  5066. });
  5067. }
  5068. function parseIfStatement(parser, context, scope, labels, start, line, column) {
  5069. nextToken(parser, context);
  5070. consume(parser, context | 32768, 67174411);
  5071. parser.assignable = 1;
  5072. const test = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.line, parser.colPos);
  5073. consume(parser, context | 32768, 16);
  5074. const consequent = parseConsequentOrAlternative(parser, context, scope, labels, parser.tokenPos, parser.linePos, parser.colPos);
  5075. let alternate = null;
  5076. if (parser.token === 20565) {
  5077. nextToken(parser, context | 32768);
  5078. alternate = parseConsequentOrAlternative(parser, context, scope, labels, parser.tokenPos, parser.linePos, parser.colPos);
  5079. }
  5080. return finishNode(parser, context, start, line, column, {
  5081. type: 'IfStatement',
  5082. test,
  5083. consequent,
  5084. alternate
  5085. });
  5086. }
  5087. function parseConsequentOrAlternative(parser, context, scope, labels, start, line, column) {
  5088. return context & 1024 ||
  5089. (context & 256) < 1 ||
  5090. parser.token !== 86106
  5091. ? parseStatement(parser, context, scope, 0, { $: labels }, 0, parser.tokenPos, parser.linePos, parser.colPos)
  5092. : parseFunctionDeclaration(parser, context, addChildScope(scope, 2), 0, 0, 0, 0, start, line, column);
  5093. }
  5094. function parseSwitchStatement(parser, context, scope, labels, start, line, column) {
  5095. nextToken(parser, context);
  5096. consume(parser, context | 32768, 67174411);
  5097. const discriminant = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5098. consume(parser, context, 16);
  5099. consume(parser, context, 2162700);
  5100. const cases = [];
  5101. let seenDefault = 0;
  5102. if (scope)
  5103. scope = addChildScope(scope, 8);
  5104. while (parser.token !== 1074790415) {
  5105. const { tokenPos, linePos, colPos } = parser;
  5106. let test = null;
  5107. const consequent = [];
  5108. if (consumeOpt(parser, context | 32768, 20558)) {
  5109. test = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5110. }
  5111. else {
  5112. consume(parser, context | 32768, 20563);
  5113. if (seenDefault)
  5114. report(parser, 86);
  5115. seenDefault = 1;
  5116. }
  5117. consume(parser, context | 32768, 21);
  5118. while (parser.token !== 20558 &&
  5119. parser.token !== 1074790415 &&
  5120. parser.token !== 20563) {
  5121. consequent.push(parseStatementListItem(parser, context | 4096, scope, 2, {
  5122. $: labels
  5123. }));
  5124. }
  5125. cases.push(finishNode(parser, context, tokenPos, linePos, colPos, {
  5126. type: 'SwitchCase',
  5127. test,
  5128. consequent
  5129. }));
  5130. }
  5131. consume(parser, context | 32768, 1074790415);
  5132. return finishNode(parser, context, start, line, column, {
  5133. type: 'SwitchStatement',
  5134. discriminant,
  5135. cases
  5136. });
  5137. }
  5138. function parseWhileStatement(parser, context, scope, labels, start, line, column) {
  5139. nextToken(parser, context);
  5140. consume(parser, context | 32768, 67174411);
  5141. const test = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5142. consume(parser, context | 32768, 16);
  5143. const body = parseIterationStatementBody(parser, context, scope, labels);
  5144. return finishNode(parser, context, start, line, column, {
  5145. type: 'WhileStatement',
  5146. test,
  5147. body
  5148. });
  5149. }
  5150. function parseIterationStatementBody(parser, context, scope, labels) {
  5151. return parseStatement(parser, ((context | 134217728) ^ 134217728) | 131072, scope, 0, { loop: 1, $: labels }, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5152. }
  5153. function parseContinueStatement(parser, context, labels, start, line, column) {
  5154. if ((context & 131072) < 1)
  5155. report(parser, 65);
  5156. nextToken(parser, context);
  5157. let label = null;
  5158. if ((parser.flags & 1) < 1 && parser.token & 143360) {
  5159. const { tokenValue } = parser;
  5160. label = parseIdentifier(parser, context | 32768, 0);
  5161. if (!isValidLabel(parser, labels, tokenValue, 1))
  5162. report(parser, 134, tokenValue);
  5163. }
  5164. matchOrInsertSemicolon(parser, context | 32768);
  5165. return finishNode(parser, context, start, line, column, {
  5166. type: 'ContinueStatement',
  5167. label
  5168. });
  5169. }
  5170. function parseBreakStatement(parser, context, labels, start, line, column) {
  5171. nextToken(parser, context | 32768);
  5172. let label = null;
  5173. if ((parser.flags & 1) < 1 && parser.token & 143360) {
  5174. const { tokenValue } = parser;
  5175. label = parseIdentifier(parser, context | 32768, 0);
  5176. if (!isValidLabel(parser, labels, tokenValue, 0))
  5177. report(parser, 134, tokenValue);
  5178. }
  5179. else if ((context & (4096 | 131072)) < 1) {
  5180. report(parser, 66);
  5181. }
  5182. matchOrInsertSemicolon(parser, context | 32768);
  5183. return finishNode(parser, context, start, line, column, {
  5184. type: 'BreakStatement',
  5185. label
  5186. });
  5187. }
  5188. function parseWithStatement(parser, context, scope, labels, start, line, column) {
  5189. nextToken(parser, context);
  5190. if (context & 1024)
  5191. report(parser, 88);
  5192. consume(parser, context | 32768, 67174411);
  5193. const object = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5194. consume(parser, context | 32768, 16);
  5195. const body = parseStatement(parser, context, scope, 2, labels, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5196. return finishNode(parser, context, start, line, column, {
  5197. type: 'WithStatement',
  5198. object,
  5199. body
  5200. });
  5201. }
  5202. function parseDebuggerStatement(parser, context, start, line, column) {
  5203. nextToken(parser, context | 32768);
  5204. matchOrInsertSemicolon(parser, context | 32768);
  5205. return finishNode(parser, context, start, line, column, {
  5206. type: 'DebuggerStatement'
  5207. });
  5208. }
  5209. function parseTryStatement(parser, context, scope, labels, start, line, column) {
  5210. nextToken(parser, context | 32768);
  5211. const firstScope = scope ? addChildScope(scope, 32) : void 0;
  5212. const block = parseBlock(parser, context, firstScope, { $: labels }, parser.tokenPos, parser.linePos, parser.colPos);
  5213. const { tokenPos, linePos, colPos } = parser;
  5214. const handler = consumeOpt(parser, context | 32768, 20559)
  5215. ? parseCatchBlock(parser, context, scope, labels, tokenPos, linePos, colPos)
  5216. : null;
  5217. let finalizer = null;
  5218. if (parser.token === 20568) {
  5219. nextToken(parser, context | 32768);
  5220. const finalizerScope = firstScope ? addChildScope(scope, 4) : void 0;
  5221. finalizer = parseBlock(parser, context, finalizerScope, { $: labels }, parser.tokenPos, parser.linePos, parser.colPos);
  5222. }
  5223. if (!handler && !finalizer) {
  5224. report(parser, 85);
  5225. }
  5226. return finishNode(parser, context, start, line, column, {
  5227. type: 'TryStatement',
  5228. block,
  5229. handler,
  5230. finalizer
  5231. });
  5232. }
  5233. function parseCatchBlock(parser, context, scope, labels, start, line, column) {
  5234. let param = null;
  5235. let additionalScope = scope;
  5236. if (consumeOpt(parser, context, 67174411)) {
  5237. if (scope)
  5238. scope = addChildScope(scope, 4);
  5239. param = parseBindingPattern(parser, context, scope, (parser.token & 2097152) === 2097152
  5240. ? 256
  5241. : 512, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5242. if (parser.token === 18) {
  5243. report(parser, 83);
  5244. }
  5245. else if (parser.token === 1077936157) {
  5246. report(parser, 84);
  5247. }
  5248. consume(parser, context | 32768, 16);
  5249. if (scope)
  5250. additionalScope = addChildScope(scope, 64);
  5251. }
  5252. const body = parseBlock(parser, context, additionalScope, { $: labels }, parser.tokenPos, parser.linePos, parser.colPos);
  5253. return finishNode(parser, context, start, line, column, {
  5254. type: 'CatchClause',
  5255. param,
  5256. body
  5257. });
  5258. }
  5259. function parseDoWhileStatement(parser, context, scope, labels, start, line, column) {
  5260. nextToken(parser, context | 32768);
  5261. const body = parseIterationStatementBody(parser, context, scope, labels);
  5262. consume(parser, context, 20580);
  5263. consume(parser, context | 32768, 67174411);
  5264. const test = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5265. consume(parser, context | 32768, 16);
  5266. consumeOpt(parser, context, 1074790417);
  5267. return finishNode(parser, context, start, line, column, {
  5268. type: 'DoWhileStatement',
  5269. body,
  5270. test
  5271. });
  5272. }
  5273. function parseLetIdentOrVarDeclarationStatement(parser, context, scope, origin, start, line, column) {
  5274. const { token, tokenValue } = parser;
  5275. let expr = parseIdentifier(parser, context, 0);
  5276. if (parser.token & (143360 | 2097152)) {
  5277. const declarations = parseVariableDeclarationList(parser, context, scope, 8, 0);
  5278. matchOrInsertSemicolon(parser, context | 32768);
  5279. return finishNode(parser, context, start, line, column, {
  5280. type: 'VariableDeclaration',
  5281. kind: 'let',
  5282. declarations
  5283. });
  5284. }
  5285. parser.assignable = 1;
  5286. if (context & 1024)
  5287. report(parser, 82);
  5288. if (parser.token === 21) {
  5289. return parseLabelledStatement(parser, context, scope, origin, {}, tokenValue, expr, token, 0, start, line, column);
  5290. }
  5291. if (parser.token === 10) {
  5292. let scope = void 0;
  5293. if (context & 64)
  5294. scope = createArrowHeadParsingScope(parser, context, tokenValue);
  5295. parser.flags = (parser.flags | 128) ^ 128;
  5296. expr = parseArrowFunctionExpression(parser, context, scope, [expr], 0, start, line, column);
  5297. }
  5298. else {
  5299. expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, start, line, column);
  5300. expr = parseAssignmentExpression(parser, context, 0, 0, start, line, column, expr);
  5301. }
  5302. if (parser.token === 18) {
  5303. expr = parseSequenceExpression(parser, context, 0, start, line, column, expr);
  5304. }
  5305. return parseExpressionStatement(parser, context, expr, start, line, column);
  5306. }
  5307. function parseLexicalDeclaration(parser, context, scope, kind, origin, start, line, column) {
  5308. nextToken(parser, context);
  5309. const declarations = parseVariableDeclarationList(parser, context, scope, kind, origin);
  5310. matchOrInsertSemicolon(parser, context | 32768);
  5311. return finishNode(parser, context, start, line, column, {
  5312. type: 'VariableDeclaration',
  5313. kind: kind & 8 ? 'let' : 'const',
  5314. declarations
  5315. });
  5316. }
  5317. function parseVariableStatement(parser, context, scope, origin, start, line, column) {
  5318. nextToken(parser, context);
  5319. const declarations = parseVariableDeclarationList(parser, context, scope, 4, origin);
  5320. matchOrInsertSemicolon(parser, context | 32768);
  5321. return finishNode(parser, context, start, line, column, {
  5322. type: 'VariableDeclaration',
  5323. kind: 'var',
  5324. declarations
  5325. });
  5326. }
  5327. function parseVariableDeclarationList(parser, context, scope, kind, origin) {
  5328. let bindingCount = 1;
  5329. const list = [parseVariableDeclaration(parser, context, scope, kind, origin)];
  5330. while (consumeOpt(parser, context, 18)) {
  5331. bindingCount++;
  5332. list.push(parseVariableDeclaration(parser, context, scope, kind, origin));
  5333. }
  5334. if (bindingCount > 1 && origin & 32 && parser.token & 262144) {
  5335. report(parser, 58, KeywordDescTable[parser.token & 255]);
  5336. }
  5337. return list;
  5338. }
  5339. function parseVariableDeclaration(parser, context, scope, kind, origin) {
  5340. const { token, tokenPos, linePos, colPos } = parser;
  5341. let init = null;
  5342. const id = parseBindingPattern(parser, context, scope, kind, origin, tokenPos, linePos, colPos);
  5343. if (parser.token === 1077936157) {
  5344. nextToken(parser, context | 32768);
  5345. init = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5346. if (origin & 32 || (token & 2097152) < 1) {
  5347. if (parser.token === 274549 ||
  5348. (parser.token === 8738868 &&
  5349. (token & 2097152 || (kind & 4) < 1 || context & 1024))) {
  5350. reportMessageAt(tokenPos, parser.line, parser.index - 3, 57, parser.token === 274549 ? 'of' : 'in');
  5351. }
  5352. }
  5353. }
  5354. else if ((kind & 16 || (token & 2097152) > 0) &&
  5355. (parser.token & 262144) !== 262144) {
  5356. report(parser, 56, kind & 16 ? 'const' : 'destructuring');
  5357. }
  5358. return finishNode(parser, context, tokenPos, linePos, colPos, {
  5359. type: 'VariableDeclarator',
  5360. id,
  5361. init
  5362. });
  5363. }
  5364. function parseForStatement(parser, context, scope, labels, start, line, column) {
  5365. nextToken(parser, context);
  5366. const forAwait = (context & 4194304) > 0 && consumeOpt(parser, context, 209008);
  5367. consume(parser, context | 32768, 67174411);
  5368. if (scope)
  5369. scope = addChildScope(scope, 1);
  5370. let test = null;
  5371. let update = null;
  5372. let destructible = 0;
  5373. let init = null;
  5374. let isVarDecl = parser.token === 86090 || parser.token === 241739 || parser.token === 86092;
  5375. let right;
  5376. const { token, tokenPos, linePos, colPos } = parser;
  5377. if (isVarDecl) {
  5378. if (token === 241739) {
  5379. init = parseIdentifier(parser, context, 0);
  5380. if (parser.token & (143360 | 2097152)) {
  5381. if (parser.token === 8738868) {
  5382. if (context & 1024)
  5383. report(parser, 64);
  5384. }
  5385. else {
  5386. init = finishNode(parser, context, tokenPos, linePos, colPos, {
  5387. type: 'VariableDeclaration',
  5388. kind: 'let',
  5389. declarations: parseVariableDeclarationList(parser, context | 134217728, scope, 8, 32)
  5390. });
  5391. }
  5392. parser.assignable = 1;
  5393. }
  5394. else if (context & 1024) {
  5395. report(parser, 64);
  5396. }
  5397. else {
  5398. isVarDecl = false;
  5399. parser.assignable = 1;
  5400. init = parseMemberOrUpdateExpression(parser, context, init, 0, 0, tokenPos, linePos, colPos);
  5401. if (parser.token === 274549)
  5402. report(parser, 111);
  5403. }
  5404. }
  5405. else {
  5406. nextToken(parser, context);
  5407. init = finishNode(parser, context, tokenPos, linePos, colPos, token === 86090
  5408. ? {
  5409. type: 'VariableDeclaration',
  5410. kind: 'var',
  5411. declarations: parseVariableDeclarationList(parser, context | 134217728, scope, 4, 32)
  5412. }
  5413. : {
  5414. type: 'VariableDeclaration',
  5415. kind: 'const',
  5416. declarations: parseVariableDeclarationList(parser, context | 134217728, scope, 16, 32)
  5417. });
  5418. parser.assignable = 1;
  5419. }
  5420. }
  5421. else if (token === 1074790417) {
  5422. if (forAwait)
  5423. report(parser, 79);
  5424. }
  5425. else if ((token & 2097152) === 2097152) {
  5426. init =
  5427. token === 2162700
  5428. ? parseObjectLiteralOrPattern(parser, context, void 0, 1, 0, 0, 2, 32, tokenPos, linePos, colPos)
  5429. : parseArrayExpressionOrPattern(parser, context, void 0, 1, 0, 0, 2, 32, tokenPos, linePos, colPos);
  5430. destructible = parser.destructible;
  5431. if (context & 256 && destructible & 64) {
  5432. report(parser, 60);
  5433. }
  5434. parser.assignable =
  5435. destructible & 16 ? 2 : 1;
  5436. init = parseMemberOrUpdateExpression(parser, context | 134217728, init, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5437. }
  5438. else {
  5439. init = parseLeftHandSideExpression(parser, context | 134217728, 1, 0, 1, tokenPos, linePos, colPos);
  5440. }
  5441. if ((parser.token & 262144) === 262144) {
  5442. if (parser.token === 274549) {
  5443. if (parser.assignable & 2)
  5444. report(parser, 77, forAwait ? 'await' : 'of');
  5445. reinterpretToPattern(parser, init);
  5446. nextToken(parser, context | 32768);
  5447. right = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5448. consume(parser, context | 32768, 16);
  5449. const body = parseIterationStatementBody(parser, context, scope, labels);
  5450. return finishNode(parser, context, start, line, column, {
  5451. type: 'ForOfStatement',
  5452. left: init,
  5453. right,
  5454. body,
  5455. await: forAwait
  5456. });
  5457. }
  5458. if (parser.assignable & 2)
  5459. report(parser, 77, 'in');
  5460. reinterpretToPattern(parser, init);
  5461. nextToken(parser, context | 32768);
  5462. if (forAwait)
  5463. report(parser, 79);
  5464. right = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5465. consume(parser, context | 32768, 16);
  5466. const body = parseIterationStatementBody(parser, context, scope, labels);
  5467. return finishNode(parser, context, start, line, column, {
  5468. type: 'ForInStatement',
  5469. body,
  5470. left: init,
  5471. right
  5472. });
  5473. }
  5474. if (forAwait)
  5475. report(parser, 79);
  5476. if (!isVarDecl) {
  5477. if (destructible & 8 && parser.token !== 1077936157) {
  5478. report(parser, 77, 'loop');
  5479. }
  5480. init = parseAssignmentExpression(parser, context | 134217728, 0, 0, tokenPos, linePos, colPos, init);
  5481. }
  5482. if (parser.token === 18)
  5483. init = parseSequenceExpression(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos, init);
  5484. consume(parser, context | 32768, 1074790417);
  5485. if (parser.token !== 1074790417)
  5486. test = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5487. consume(parser, context | 32768, 1074790417);
  5488. if (parser.token !== 16)
  5489. update = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5490. consume(parser, context | 32768, 16);
  5491. const body = parseIterationStatementBody(parser, context, scope, labels);
  5492. return finishNode(parser, context, start, line, column, {
  5493. type: 'ForStatement',
  5494. init,
  5495. test,
  5496. update,
  5497. body
  5498. });
  5499. }
  5500. function parseRestrictedIdentifier(parser, context, scope) {
  5501. if (!isValidIdentifier(context, parser.token))
  5502. report(parser, 114);
  5503. if ((parser.token & 537079808) === 537079808)
  5504. report(parser, 115);
  5505. if (scope)
  5506. addBlockName(parser, context, scope, parser.tokenValue, 8, 0);
  5507. return parseIdentifier(parser, context, 0);
  5508. }
  5509. function parseImportDeclaration(parser, context, scope) {
  5510. const start = parser.tokenPos;
  5511. const line = parser.linePos;
  5512. const column = parser.colPos;
  5513. nextToken(parser, context);
  5514. let source = null;
  5515. const { tokenPos, linePos, colPos } = parser;
  5516. let specifiers = [];
  5517. if (parser.token === 134283267) {
  5518. source = parseLiteral(parser, context);
  5519. }
  5520. else {
  5521. if (parser.token & 143360) {
  5522. const local = parseRestrictedIdentifier(parser, context, scope);
  5523. specifiers = [
  5524. finishNode(parser, context, tokenPos, linePos, colPos, {
  5525. type: 'ImportDefaultSpecifier',
  5526. local
  5527. })
  5528. ];
  5529. if (consumeOpt(parser, context, 18)) {
  5530. switch (parser.token) {
  5531. case 8457014:
  5532. specifiers.push(parseImportNamespaceSpecifier(parser, context, scope));
  5533. break;
  5534. case 2162700:
  5535. parseImportSpecifierOrNamedImports(parser, context, scope, specifiers);
  5536. break;
  5537. default:
  5538. report(parser, 104);
  5539. }
  5540. }
  5541. }
  5542. else {
  5543. switch (parser.token) {
  5544. case 8457014:
  5545. specifiers = [parseImportNamespaceSpecifier(parser, context, scope)];
  5546. break;
  5547. case 2162700:
  5548. parseImportSpecifierOrNamedImports(parser, context, scope, specifiers);
  5549. break;
  5550. case 67174411:
  5551. return parseImportCallDeclaration(parser, context, start, line, column);
  5552. case 67108877:
  5553. return parseImportMetaDeclaration(parser, context, start, line, column);
  5554. default:
  5555. report(parser, 28, KeywordDescTable[parser.token & 255]);
  5556. }
  5557. }
  5558. source = parseModuleSpecifier(parser, context);
  5559. }
  5560. matchOrInsertSemicolon(parser, context | 32768);
  5561. return finishNode(parser, context, start, line, column, {
  5562. type: 'ImportDeclaration',
  5563. specifiers,
  5564. source
  5565. });
  5566. }
  5567. function parseImportNamespaceSpecifier(parser, context, scope) {
  5568. const { tokenPos, linePos, colPos } = parser;
  5569. nextToken(parser, context);
  5570. consume(parser, context, 77934);
  5571. if ((parser.token & 134217728) === 134217728) {
  5572. reportMessageAt(tokenPos, parser.line, parser.index, 28, KeywordDescTable[parser.token & 255]);
  5573. }
  5574. return finishNode(parser, context, tokenPos, linePos, colPos, {
  5575. type: 'ImportNamespaceSpecifier',
  5576. local: parseRestrictedIdentifier(parser, context, scope)
  5577. });
  5578. }
  5579. function parseModuleSpecifier(parser, context) {
  5580. consumeOpt(parser, context, 12404);
  5581. if (parser.token !== 134283267)
  5582. report(parser, 102, 'Import');
  5583. return parseLiteral(parser, context);
  5584. }
  5585. function parseImportSpecifierOrNamedImports(parser, context, scope, specifiers) {
  5586. nextToken(parser, context);
  5587. while (parser.token & 143360) {
  5588. let { token, tokenValue, tokenPos, linePos, colPos } = parser;
  5589. const imported = parseIdentifier(parser, context, 0);
  5590. let local;
  5591. if (consumeOpt(parser, context, 77934)) {
  5592. if ((parser.token & 134217728) === 134217728 || parser.token === 18) {
  5593. report(parser, 103);
  5594. }
  5595. else {
  5596. validateBindingIdentifier(parser, context, 16, parser.token, 0);
  5597. }
  5598. tokenValue = parser.tokenValue;
  5599. local = parseIdentifier(parser, context, 0);
  5600. }
  5601. else {
  5602. validateBindingIdentifier(parser, context, 16, token, 0);
  5603. local = imported;
  5604. }
  5605. if (scope)
  5606. addBlockName(parser, context, scope, tokenValue, 8, 0);
  5607. specifiers.push(finishNode(parser, context, tokenPos, linePos, colPos, {
  5608. type: 'ImportSpecifier',
  5609. local,
  5610. imported
  5611. }));
  5612. if (parser.token !== 1074790415)
  5613. consume(parser, context, 18);
  5614. }
  5615. consume(parser, context, 1074790415);
  5616. return specifiers;
  5617. }
  5618. function parseImportMetaDeclaration(parser, context, start, line, column) {
  5619. let expr = parseImportMetaExpression(parser, context, finishNode(parser, context, start, line, column, {
  5620. type: 'Identifier',
  5621. name: 'import'
  5622. }), start, line, column);
  5623. expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, start, line, column);
  5624. expr = parseAssignmentExpression(parser, context, 0, 0, start, line, column, expr);
  5625. return parseExpressionStatement(parser, context, expr, start, line, column);
  5626. }
  5627. function parseImportCallDeclaration(parser, context, start, line, column) {
  5628. let expr = parseImportExpression(parser, context, 0, start, line, column);
  5629. expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, start, line, column);
  5630. return parseExpressionStatement(parser, context, expr, start, line, column);
  5631. }
  5632. function parseExportDeclaration(parser, context, scope) {
  5633. const start = parser.tokenPos;
  5634. const line = parser.linePos;
  5635. const column = parser.colPos;
  5636. nextToken(parser, context | 32768);
  5637. const specifiers = [];
  5638. let declaration = null;
  5639. let source = null;
  5640. let key;
  5641. if (consumeOpt(parser, context | 32768, 20563)) {
  5642. switch (parser.token) {
  5643. case 86106: {
  5644. declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5645. break;
  5646. }
  5647. case 133:
  5648. case 86096:
  5649. declaration = parseClassDeclaration(parser, context, scope, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5650. break;
  5651. case 209007:
  5652. const { tokenPos, linePos, colPos } = parser;
  5653. declaration = parseIdentifier(parser, context, 0);
  5654. const { flags } = parser;
  5655. if ((flags & 1) < 1) {
  5656. if (parser.token === 86106) {
  5657. declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 1, 1, tokenPos, linePos, colPos);
  5658. }
  5659. else {
  5660. if (parser.token === 67174411) {
  5661. declaration = parseAsyncArrowOrCallExpression(parser, context, declaration, 1, 1, 0, flags, tokenPos, linePos, colPos);
  5662. declaration = parseMemberOrUpdateExpression(parser, context, declaration, 0, 0, tokenPos, linePos, colPos);
  5663. declaration = parseAssignmentExpression(parser, context, 0, 0, tokenPos, linePos, colPos, declaration);
  5664. }
  5665. else if (parser.token & 143360) {
  5666. if (scope)
  5667. scope = createArrowHeadParsingScope(parser, context, parser.tokenValue);
  5668. declaration = parseIdentifier(parser, context, 0);
  5669. declaration = parseArrowFunctionExpression(parser, context, scope, [declaration], 1, tokenPos, linePos, colPos);
  5670. }
  5671. }
  5672. }
  5673. break;
  5674. default:
  5675. declaration = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5676. matchOrInsertSemicolon(parser, context | 32768);
  5677. }
  5678. if (scope)
  5679. declareUnboundVariable(parser, 'default');
  5680. return finishNode(parser, context, start, line, column, {
  5681. type: 'ExportDefaultDeclaration',
  5682. declaration
  5683. });
  5684. }
  5685. switch (parser.token) {
  5686. case 8457014: {
  5687. nextToken(parser, context);
  5688. let exported = null;
  5689. const isNamedDeclaration = consumeOpt(parser, context, 77934);
  5690. if (isNamedDeclaration) {
  5691. if (scope)
  5692. declareUnboundVariable(parser, parser.tokenValue);
  5693. exported = parseIdentifier(parser, context, 0);
  5694. }
  5695. consume(parser, context, 12404);
  5696. if (parser.token !== 134283267)
  5697. report(parser, 102, 'Export');
  5698. source = parseLiteral(parser, context);
  5699. matchOrInsertSemicolon(parser, context | 32768);
  5700. return finishNode(parser, context, start, line, column, {
  5701. type: 'ExportAllDeclaration',
  5702. source,
  5703. exported
  5704. });
  5705. }
  5706. case 2162700: {
  5707. nextToken(parser, context);
  5708. const tmpExportedNames = [];
  5709. const tmpExportedBindings = [];
  5710. while (parser.token & 143360) {
  5711. const { tokenPos, tokenValue, linePos, colPos } = parser;
  5712. const local = parseIdentifier(parser, context, 0);
  5713. let exported;
  5714. if (parser.token === 77934) {
  5715. nextToken(parser, context);
  5716. if ((parser.token & 134217728) === 134217728) {
  5717. report(parser, 103);
  5718. }
  5719. if (scope) {
  5720. tmpExportedNames.push(parser.tokenValue);
  5721. tmpExportedBindings.push(tokenValue);
  5722. }
  5723. exported = parseIdentifier(parser, context, 0);
  5724. }
  5725. else {
  5726. if (scope) {
  5727. tmpExportedNames.push(parser.tokenValue);
  5728. tmpExportedBindings.push(parser.tokenValue);
  5729. }
  5730. exported = local;
  5731. }
  5732. specifiers.push(finishNode(parser, context, tokenPos, linePos, colPos, {
  5733. type: 'ExportSpecifier',
  5734. local,
  5735. exported
  5736. }));
  5737. if (parser.token !== 1074790415)
  5738. consume(parser, context, 18);
  5739. }
  5740. consume(parser, context, 1074790415);
  5741. if (consumeOpt(parser, context, 12404)) {
  5742. if (parser.token !== 134283267)
  5743. report(parser, 102, 'Export');
  5744. source = parseLiteral(parser, context);
  5745. }
  5746. else if (scope) {
  5747. let i = 0;
  5748. let iMax = tmpExportedNames.length;
  5749. for (; i < iMax; i++) {
  5750. declareUnboundVariable(parser, tmpExportedNames[i]);
  5751. }
  5752. i = 0;
  5753. iMax = tmpExportedBindings.length;
  5754. for (; i < iMax; i++) {
  5755. addBindingToExports(parser, tmpExportedBindings[i]);
  5756. }
  5757. }
  5758. matchOrInsertSemicolon(parser, context | 32768);
  5759. break;
  5760. }
  5761. case 86096:
  5762. declaration = parseClassDeclaration(parser, context, scope, 2, parser.tokenPos, parser.linePos, parser.colPos);
  5763. break;
  5764. case 86106:
  5765. declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 2, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5766. break;
  5767. case 241739:
  5768. declaration = parseLexicalDeclaration(parser, context, scope, 8, 64, parser.tokenPos, parser.linePos, parser.colPos);
  5769. break;
  5770. case 86092:
  5771. declaration = parseLexicalDeclaration(parser, context, scope, 16, 64, parser.tokenPos, parser.linePos, parser.colPos);
  5772. break;
  5773. case 86090:
  5774. declaration = parseVariableStatement(parser, context, scope, 64, parser.tokenPos, parser.linePos, parser.colPos);
  5775. break;
  5776. case 209007:
  5777. const { tokenPos, linePos, colPos } = parser;
  5778. nextToken(parser, context);
  5779. if ((parser.flags & 1) < 1 && parser.token === 86106) {
  5780. declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 2, 1, tokenPos, linePos, colPos);
  5781. if (scope) {
  5782. key = declaration.id ? declaration.id.name : '';
  5783. declareUnboundVariable(parser, key);
  5784. }
  5785. break;
  5786. }
  5787. default:
  5788. report(parser, 28, KeywordDescTable[parser.token & 255]);
  5789. }
  5790. return finishNode(parser, context, start, line, column, {
  5791. type: 'ExportNamedDeclaration',
  5792. declaration,
  5793. specifiers,
  5794. source
  5795. });
  5796. }
  5797. function parseExpression(parser, context, canAssign, isPattern, inGroup, start, line, column) {
  5798. let expr = parsePrimaryExpression(parser, context, 2, 0, canAssign, isPattern, inGroup, 1, start, line, column);
  5799. expr = parseMemberOrUpdateExpression(parser, context, expr, inGroup, 0, start, line, column);
  5800. return parseAssignmentExpression(parser, context, inGroup, 0, start, line, column, expr);
  5801. }
  5802. function parseSequenceExpression(parser, context, inGroup, start, line, column, expr) {
  5803. const expressions = [expr];
  5804. while (consumeOpt(parser, context | 32768, 18)) {
  5805. expressions.push(parseExpression(parser, context, 1, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
  5806. }
  5807. return finishNode(parser, context, start, line, column, {
  5808. type: 'SequenceExpression',
  5809. expressions
  5810. });
  5811. }
  5812. function parseExpressions(parser, context, inGroup, canAssign, start, line, column) {
  5813. const expr = parseExpression(parser, context, canAssign, 0, inGroup, start, line, column);
  5814. return parser.token === 18
  5815. ? parseSequenceExpression(parser, context, inGroup, start, line, column, expr)
  5816. : expr;
  5817. }
  5818. function parseAssignmentExpression(parser, context, inGroup, isPattern, start, line, column, left) {
  5819. const { token } = parser;
  5820. if ((token & 4194304) === 4194304) {
  5821. if (parser.assignable & 2)
  5822. report(parser, 24);
  5823. if ((!isPattern && token === 1077936157 && left.type === 'ArrayExpression') ||
  5824. left.type === 'ObjectExpression') {
  5825. reinterpretToPattern(parser, left);
  5826. }
  5827. nextToken(parser, context | 32768);
  5828. const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  5829. parser.assignable = 2;
  5830. return finishNode(parser, context, start, line, column, isPattern
  5831. ? {
  5832. type: 'AssignmentPattern',
  5833. left,
  5834. right
  5835. }
  5836. : {
  5837. type: 'AssignmentExpression',
  5838. left,
  5839. operator: KeywordDescTable[token & 255],
  5840. right
  5841. });
  5842. }
  5843. if ((token & 8454144) === 8454144) {
  5844. left = parseBinaryExpression(parser, context, inGroup, start, line, column, 4, token, left);
  5845. }
  5846. if (consumeOpt(parser, context | 32768, 22)) {
  5847. left = parseConditionalExpression(parser, context, left, start, line, column);
  5848. }
  5849. return left;
  5850. }
  5851. function parseAssignmentExpressionOrPattern(parser, context, inGroup, isPattern, start, line, column, left) {
  5852. const { token } = parser;
  5853. nextToken(parser, context | 32768);
  5854. const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  5855. left = finishNode(parser, context, start, line, column, isPattern
  5856. ? {
  5857. type: 'AssignmentPattern',
  5858. left,
  5859. right
  5860. }
  5861. : {
  5862. type: 'AssignmentExpression',
  5863. left,
  5864. operator: KeywordDescTable[token & 255],
  5865. right
  5866. });
  5867. parser.assignable = 2;
  5868. return left;
  5869. }
  5870. function parseConditionalExpression(parser, context, test, start, line, column) {
  5871. const consequent = parseExpression(parser, (context | 134217728) ^ 134217728, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5872. consume(parser, context | 32768, 21);
  5873. parser.assignable = 1;
  5874. const alternate = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5875. parser.assignable = 2;
  5876. return finishNode(parser, context, start, line, column, {
  5877. type: 'ConditionalExpression',
  5878. test,
  5879. consequent,
  5880. alternate
  5881. });
  5882. }
  5883. function parseBinaryExpression(parser, context, inGroup, start, line, column, minPrec, operator, left) {
  5884. const bit = -((context & 134217728) > 0) & 8738868;
  5885. let t;
  5886. let prec;
  5887. parser.assignable = 2;
  5888. while (parser.token & 8454144) {
  5889. t = parser.token;
  5890. prec = t & 3840;
  5891. if ((t & 524288 && operator & 268435456) || (operator & 524288 && t & 268435456)) {
  5892. report(parser, 159);
  5893. }
  5894. if (prec + ((t === 8457273) << 8) - ((bit === t) << 12) <= minPrec)
  5895. break;
  5896. nextToken(parser, context | 32768);
  5897. left = finishNode(parser, context, start, line, column, {
  5898. type: t & 524288 || t & 268435456 ? 'LogicalExpression' : 'BinaryExpression',
  5899. left,
  5900. right: parseBinaryExpression(parser, context, inGroup, parser.tokenPos, parser.linePos, parser.colPos, prec, t, parseLeftHandSideExpression(parser, context, 0, inGroup, 1, parser.tokenPos, parser.linePos, parser.colPos)),
  5901. operator: KeywordDescTable[t & 255]
  5902. });
  5903. }
  5904. if (parser.token === 1077936157)
  5905. report(parser, 24);
  5906. return left;
  5907. }
  5908. function parseUnaryExpression(parser, context, isLHS, start, line, column, inGroup) {
  5909. if (!isLHS)
  5910. report(parser, 0);
  5911. const unaryOperator = parser.token;
  5912. nextToken(parser, context | 32768);
  5913. const arg = parseLeftHandSideExpression(parser, context, 0, inGroup, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5914. if (parser.token === 8457273)
  5915. report(parser, 31);
  5916. if (context & 1024 && unaryOperator === 16863278) {
  5917. if (arg.type === 'Identifier') {
  5918. report(parser, 117);
  5919. }
  5920. else if (isPropertyWithPrivateFieldKey(arg)) {
  5921. report(parser, 123);
  5922. }
  5923. }
  5924. parser.assignable = 2;
  5925. return finishNode(parser, context, start, line, column, {
  5926. type: 'UnaryExpression',
  5927. operator: KeywordDescTable[unaryOperator & 255],
  5928. argument: arg,
  5929. prefix: true
  5930. });
  5931. }
  5932. function parseAsyncExpression(parser, context, inGroup, isLHS, canAssign, isPattern, inNew, start, line, column) {
  5933. const { token } = parser;
  5934. const expr = parseIdentifier(parser, context, isPattern);
  5935. const { flags } = parser;
  5936. if ((flags & 1) < 1) {
  5937. if (parser.token === 86106) {
  5938. return parseFunctionExpression(parser, context, 1, inGroup, start, line, column);
  5939. }
  5940. if ((parser.token & 143360) === 143360) {
  5941. if (!isLHS)
  5942. report(parser, 0);
  5943. return parseAsyncArrowAfterIdent(parser, context, canAssign, start, line, column);
  5944. }
  5945. }
  5946. if (!inNew && parser.token === 67174411) {
  5947. return parseAsyncArrowOrCallExpression(parser, context, expr, canAssign, 1, 0, flags, start, line, column);
  5948. }
  5949. if (parser.token === 10) {
  5950. classifyIdentifier(parser, context, token, 1);
  5951. if (inNew)
  5952. report(parser, 48);
  5953. return parseArrowFromIdentifier(parser, context, parser.tokenValue, expr, inNew, canAssign, 0, start, line, column);
  5954. }
  5955. return expr;
  5956. }
  5957. function parseYieldExpression(parser, context, inGroup, canAssign, start, line, column) {
  5958. if (inGroup)
  5959. parser.destructible |= 256;
  5960. if (context & 2097152) {
  5961. nextToken(parser, context | 32768);
  5962. if (context & 8388608)
  5963. report(parser, 30);
  5964. if (!canAssign)
  5965. report(parser, 24);
  5966. if (parser.token === 22)
  5967. report(parser, 120);
  5968. let argument = null;
  5969. let delegate = false;
  5970. if ((parser.flags & 1) < 1) {
  5971. delegate = consumeOpt(parser, context | 32768, 8457014);
  5972. if (parser.token & (12288 | 65536) || delegate) {
  5973. argument = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  5974. }
  5975. }
  5976. parser.assignable = 2;
  5977. return finishNode(parser, context, start, line, column, {
  5978. type: 'YieldExpression',
  5979. argument,
  5980. delegate
  5981. });
  5982. }
  5983. if (context & 1024)
  5984. report(parser, 94, 'yield');
  5985. return parseIdentifierOrArrow(parser, context, start, line, column);
  5986. }
  5987. function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
  5988. if (inGroup)
  5989. parser.destructible |= 128;
  5990. if (context & 4194304) {
  5991. if (inNew)
  5992. report(parser, 0);
  5993. if (context & 8388608) {
  5994. reportMessageAt(parser.index, parser.line, parser.index, 29);
  5995. }
  5996. nextToken(parser, context | 32768);
  5997. const argument = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  5998. parser.assignable = 2;
  5999. return finishNode(parser, context, start, line, column, {
  6000. type: 'AwaitExpression',
  6001. argument
  6002. });
  6003. }
  6004. if (context & 2048)
  6005. report(parser, 107, 'Await');
  6006. return parseIdentifierOrArrow(parser, context, start, line, column);
  6007. }
  6008. function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
  6009. const { tokenPos, linePos, colPos } = parser;
  6010. consume(parser, context | 32768, 2162700);
  6011. const body = [];
  6012. const prevContext = context;
  6013. if (parser.token !== 1074790415) {
  6014. while (parser.token === 134283267) {
  6015. const { index, tokenPos, tokenValue, token } = parser;
  6016. const expr = parseLiteral(parser, context);
  6017. if (isValidStrictMode(parser, index, tokenPos, tokenValue)) {
  6018. context |= 1024;
  6019. if (parser.flags & 128) {
  6020. reportMessageAt(parser.index, parser.line, parser.tokenPos, 63);
  6021. }
  6022. if (parser.flags & 64) {
  6023. reportMessageAt(parser.index, parser.line, parser.tokenPos, 8);
  6024. }
  6025. }
  6026. body.push(parseDirective(parser, context, expr, token, tokenPos, parser.linePos, parser.colPos));
  6027. }
  6028. if (context & 1024) {
  6029. if (firstRestricted) {
  6030. if ((firstRestricted & 537079808) === 537079808) {
  6031. report(parser, 115);
  6032. }
  6033. if ((firstRestricted & 36864) === 36864) {
  6034. report(parser, 38);
  6035. }
  6036. }
  6037. if (parser.flags & 512)
  6038. report(parser, 115);
  6039. if (parser.flags & 256)
  6040. report(parser, 114);
  6041. }
  6042. if (context & 64 &&
  6043. scope &&
  6044. scopeError !== void 0 &&
  6045. (prevContext & 1024) < 1 &&
  6046. (context & 8192) < 1) {
  6047. reportScopeError(scopeError);
  6048. }
  6049. }
  6050. parser.flags =
  6051. (parser.flags | 512 | 256 | 64) ^
  6052. (512 | 256 | 64);
  6053. parser.destructible = (parser.destructible | 256) ^ 256;
  6054. while (parser.token !== 1074790415) {
  6055. body.push(parseStatementListItem(parser, context, scope, 4, {}));
  6056. }
  6057. consume(parser, origin & (16 | 8) ? context | 32768 : context, 1074790415);
  6058. parser.flags &= ~(128 | 64);
  6059. if (parser.token === 1077936157)
  6060. report(parser, 24);
  6061. return finishNode(parser, context, tokenPos, linePos, colPos, {
  6062. type: 'BlockStatement',
  6063. body
  6064. });
  6065. }
  6066. function parseSuperExpression(parser, context, start, line, column) {
  6067. nextToken(parser, context);
  6068. switch (parser.token) {
  6069. case 67108991:
  6070. report(parser, 161);
  6071. case 67174411: {
  6072. if ((context & 524288) < 1)
  6073. report(parser, 26);
  6074. if (context & 16384)
  6075. report(parser, 143);
  6076. parser.assignable = 2;
  6077. break;
  6078. }
  6079. case 69271571:
  6080. case 67108877: {
  6081. if ((context & 262144) < 1)
  6082. report(parser, 27);
  6083. if (context & 16384)
  6084. report(parser, 143);
  6085. parser.assignable = 1;
  6086. break;
  6087. }
  6088. default:
  6089. report(parser, 28, 'super');
  6090. }
  6091. return finishNode(parser, context, start, line, column, { type: 'Super' });
  6092. }
  6093. function parseLeftHandSideExpression(parser, context, canAssign, inGroup, isLHS, start, line, column) {
  6094. const expression = parsePrimaryExpression(parser, context, 2, 0, canAssign, 0, inGroup, isLHS, start, line, column);
  6095. return parseMemberOrUpdateExpression(parser, context, expression, inGroup, 0, start, line, column);
  6096. }
  6097. function parseUpdateExpression(parser, context, expr, start, line, column) {
  6098. if (parser.assignable & 2)
  6099. report(parser, 52);
  6100. const { token } = parser;
  6101. nextToken(parser, context);
  6102. parser.assignable = 2;
  6103. return finishNode(parser, context, start, line, column, {
  6104. type: 'UpdateExpression',
  6105. argument: expr,
  6106. operator: KeywordDescTable[token & 255],
  6107. prefix: false
  6108. });
  6109. }
  6110. function parseMemberOrUpdateExpression(parser, context, expr, inGroup, inChain, start, line, column) {
  6111. if ((parser.token & 33619968) === 33619968 && (parser.flags & 1) < 1) {
  6112. expr = parseUpdateExpression(parser, context, expr, start, line, column);
  6113. }
  6114. else if ((parser.token & 67108864) === 67108864) {
  6115. context = (context | 134217728 | 8192) ^ (134217728 | 8192);
  6116. switch (parser.token) {
  6117. case 67108877: {
  6118. nextToken(parser, context | 1073741824);
  6119. parser.assignable = 1;
  6120. const property = parsePropertyOrPrivatePropertyName(parser, context);
  6121. expr = finishNode(parser, context, start, line, column, {
  6122. type: 'MemberExpression',
  6123. object: expr,
  6124. computed: false,
  6125. property
  6126. });
  6127. break;
  6128. }
  6129. case 69271571: {
  6130. let restoreHasOptionalChaining = false;
  6131. if ((parser.flags & 2048) === 2048) {
  6132. restoreHasOptionalChaining = true;
  6133. parser.flags = (parser.flags | 2048) ^ 2048;
  6134. }
  6135. nextToken(parser, context | 32768);
  6136. const { tokenPos, linePos, colPos } = parser;
  6137. const property = parseExpressions(parser, context, inGroup, 1, tokenPos, linePos, colPos);
  6138. consume(parser, context, 20);
  6139. parser.assignable = 1;
  6140. expr = finishNode(parser, context, start, line, column, {
  6141. type: 'MemberExpression',
  6142. object: expr,
  6143. computed: true,
  6144. property
  6145. });
  6146. if (restoreHasOptionalChaining) {
  6147. parser.flags |= 2048;
  6148. }
  6149. break;
  6150. }
  6151. case 67174411: {
  6152. if ((parser.flags & 1024) === 1024) {
  6153. parser.flags = (parser.flags | 1024) ^ 1024;
  6154. return expr;
  6155. }
  6156. let restoreHasOptionalChaining = false;
  6157. if ((parser.flags & 2048) === 2048) {
  6158. restoreHasOptionalChaining = true;
  6159. parser.flags = (parser.flags | 2048) ^ 2048;
  6160. }
  6161. const args = parseArguments(parser, context, inGroup);
  6162. parser.assignable = 2;
  6163. expr = finishNode(parser, context, start, line, column, {
  6164. type: 'CallExpression',
  6165. callee: expr,
  6166. arguments: args
  6167. });
  6168. if (restoreHasOptionalChaining) {
  6169. parser.flags |= 2048;
  6170. }
  6171. break;
  6172. }
  6173. case 67108991: {
  6174. nextToken(parser, context);
  6175. parser.flags |= 2048;
  6176. parser.assignable = 2;
  6177. expr = parseOptionalChain(parser, context, expr, start, line, column);
  6178. break;
  6179. }
  6180. default:
  6181. if ((parser.flags & 2048) === 2048) {
  6182. report(parser, 160);
  6183. }
  6184. parser.assignable = 2;
  6185. expr = finishNode(parser, context, start, line, column, {
  6186. type: 'TaggedTemplateExpression',
  6187. tag: expr,
  6188. quasi: parser.token === 67174408
  6189. ? parseTemplate(parser, context | 65536)
  6190. : parseTemplateLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos)
  6191. });
  6192. }
  6193. expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 1, start, line, column);
  6194. }
  6195. if (inChain === 0 && (parser.flags & 2048) === 2048) {
  6196. parser.flags = (parser.flags | 2048) ^ 2048;
  6197. expr = finishNode(parser, context, start, line, column, {
  6198. type: 'ChainExpression',
  6199. expression: expr
  6200. });
  6201. }
  6202. return expr;
  6203. }
  6204. function parseOptionalChain(parser, context, expr, start, line, column) {
  6205. let restoreHasOptionalChaining = false;
  6206. let node;
  6207. if (parser.token === 69271571 || parser.token === 67174411) {
  6208. if ((parser.flags & 2048) === 2048) {
  6209. restoreHasOptionalChaining = true;
  6210. parser.flags = (parser.flags | 2048) ^ 2048;
  6211. }
  6212. }
  6213. if (parser.token === 69271571) {
  6214. nextToken(parser, context | 32768);
  6215. const { tokenPos, linePos, colPos } = parser;
  6216. const property = parseExpressions(parser, context, 0, 1, tokenPos, linePos, colPos);
  6217. consume(parser, context, 20);
  6218. parser.assignable = 2;
  6219. node = finishNode(parser, context, start, line, column, {
  6220. type: 'MemberExpression',
  6221. object: expr,
  6222. computed: true,
  6223. optional: true,
  6224. property
  6225. });
  6226. }
  6227. else if (parser.token === 67174411) {
  6228. const args = parseArguments(parser, context, 0);
  6229. parser.assignable = 2;
  6230. node = finishNode(parser, context, start, line, column, {
  6231. type: 'CallExpression',
  6232. callee: expr,
  6233. arguments: args,
  6234. optional: true
  6235. });
  6236. }
  6237. else {
  6238. if ((parser.token & (143360 | 4096)) < 1)
  6239. report(parser, 154);
  6240. const property = parseIdentifier(parser, context, 0);
  6241. parser.assignable = 2;
  6242. node = finishNode(parser, context, start, line, column, {
  6243. type: 'MemberExpression',
  6244. object: expr,
  6245. computed: false,
  6246. optional: true,
  6247. property
  6248. });
  6249. }
  6250. if (restoreHasOptionalChaining) {
  6251. parser.flags |= 2048;
  6252. }
  6253. return node;
  6254. }
  6255. function parsePropertyOrPrivatePropertyName(parser, context) {
  6256. if ((parser.token & (143360 | 4096)) < 1 && parser.token !== 131) {
  6257. report(parser, 154);
  6258. }
  6259. return context & 1 && parser.token === 131
  6260. ? parsePrivateIdentifier(parser, context, parser.tokenPos, parser.linePos, parser.colPos)
  6261. : parseIdentifier(parser, context, 0);
  6262. }
  6263. function parseUpdateExpressionPrefixed(parser, context, inNew, isLHS, start, line, column) {
  6264. if (inNew)
  6265. report(parser, 53);
  6266. if (!isLHS)
  6267. report(parser, 0);
  6268. const { token } = parser;
  6269. nextToken(parser, context | 32768);
  6270. const arg = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
  6271. if (parser.assignable & 2) {
  6272. report(parser, 52);
  6273. }
  6274. parser.assignable = 2;
  6275. return finishNode(parser, context, start, line, column, {
  6276. type: 'UpdateExpression',
  6277. argument: arg,
  6278. operator: KeywordDescTable[token & 255],
  6279. prefix: true
  6280. });
  6281. }
  6282. function parsePrimaryExpression(parser, context, kind, inNew, canAssign, isPattern, inGroup, isLHS, start, line, column) {
  6283. if ((parser.token & 143360) === 143360) {
  6284. switch (parser.token) {
  6285. case 209008:
  6286. return parseAwaitExpression(parser, context, inNew, inGroup, start, line, column);
  6287. case 241773:
  6288. return parseYieldExpression(parser, context, inGroup, canAssign, start, line, column);
  6289. case 209007:
  6290. return parseAsyncExpression(parser, context, inGroup, isLHS, canAssign, isPattern, inNew, start, line, column);
  6291. }
  6292. const { token, tokenValue } = parser;
  6293. const expr = parseIdentifier(parser, context | 65536, isPattern);
  6294. if (parser.token === 10) {
  6295. if (!isLHS)
  6296. report(parser, 0);
  6297. classifyIdentifier(parser, context, token, 1);
  6298. return parseArrowFromIdentifier(parser, context, tokenValue, expr, inNew, canAssign, 0, start, line, column);
  6299. }
  6300. if (context & 16384 && token === 537079928)
  6301. report(parser, 126);
  6302. if (token === 241739) {
  6303. if (context & 1024)
  6304. report(parser, 109);
  6305. if (kind & (8 | 16))
  6306. report(parser, 97);
  6307. }
  6308. parser.assignable =
  6309. context & 1024 && (token & 537079808) === 537079808
  6310. ? 2
  6311. : 1;
  6312. return expr;
  6313. }
  6314. if ((parser.token & 134217728) === 134217728) {
  6315. return parseLiteral(parser, context);
  6316. }
  6317. switch (parser.token) {
  6318. case 33619995:
  6319. case 33619996:
  6320. return parseUpdateExpressionPrefixed(parser, context, inNew, isLHS, start, line, column);
  6321. case 16863278:
  6322. case 16842800:
  6323. case 16842801:
  6324. case 25233970:
  6325. case 25233971:
  6326. case 16863277:
  6327. case 16863279:
  6328. return parseUnaryExpression(parser, context, isLHS, start, line, column, inGroup);
  6329. case 86106:
  6330. return parseFunctionExpression(parser, context, 0, inGroup, start, line, column);
  6331. case 2162700:
  6332. return parseObjectLiteral(parser, context, canAssign ? 0 : 1, inGroup, start, line, column);
  6333. case 69271571:
  6334. return parseArrayLiteral(parser, context, canAssign ? 0 : 1, inGroup, start, line, column);
  6335. case 67174411:
  6336. return parseParenthesizedExpression(parser, context, canAssign, 1, 0, start, line, column);
  6337. case 86021:
  6338. case 86022:
  6339. case 86023:
  6340. return parseNullOrTrueOrFalseLiteral(parser, context, start, line, column);
  6341. case 86113:
  6342. return parseThisExpression(parser, context);
  6343. case 65540:
  6344. return parseRegExpLiteral(parser, context, start, line, column);
  6345. case 133:
  6346. case 86096:
  6347. return parseClassExpression(parser, context, inGroup, start, line, column);
  6348. case 86111:
  6349. return parseSuperExpression(parser, context, start, line, column);
  6350. case 67174409:
  6351. return parseTemplateLiteral(parser, context, start, line, column);
  6352. case 67174408:
  6353. return parseTemplate(parser, context);
  6354. case 86109:
  6355. return parseNewExpression(parser, context, inGroup, start, line, column);
  6356. case 134283389:
  6357. return parseBigIntLiteral(parser, context, start, line, column);
  6358. case 131:
  6359. return parsePrivateIdentifier(parser, context, start, line, column);
  6360. case 86108:
  6361. return parseImportCallOrMetaExpression(parser, context, inNew, inGroup, start, line, column);
  6362. case 8456258:
  6363. if (context & 16)
  6364. return parseJSXRootElementOrFragment(parser, context, 1, start, line, column);
  6365. default:
  6366. if (isValidIdentifier(context, parser.token))
  6367. return parseIdentifierOrArrow(parser, context, start, line, column);
  6368. report(parser, 28, KeywordDescTable[parser.token & 255]);
  6369. }
  6370. }
  6371. function parseImportCallOrMetaExpression(parser, context, inNew, inGroup, start, line, column) {
  6372. let expr = parseIdentifier(parser, context, 0);
  6373. if (parser.token === 67108877) {
  6374. return parseImportMetaExpression(parser, context, expr, start, line, column);
  6375. }
  6376. if (inNew)
  6377. report(parser, 137);
  6378. expr = parseImportExpression(parser, context, inGroup, start, line, column);
  6379. parser.assignable = 2;
  6380. return parseMemberOrUpdateExpression(parser, context, expr, inGroup, 0, start, line, column);
  6381. }
  6382. function parseImportMetaExpression(parser, context, meta, start, line, column) {
  6383. if ((context & 2048) === 0)
  6384. report(parser, 163);
  6385. nextToken(parser, context);
  6386. if (parser.token !== 143495 && parser.tokenValue !== 'meta')
  6387. report(parser, 28, KeywordDescTable[parser.token & 255]);
  6388. parser.assignable = 2;
  6389. return finishNode(parser, context, start, line, column, {
  6390. type: 'MetaProperty',
  6391. meta,
  6392. property: parseIdentifier(parser, context, 0)
  6393. });
  6394. }
  6395. function parseImportExpression(parser, context, inGroup, start, line, column) {
  6396. consume(parser, context | 32768, 67174411);
  6397. if (parser.token === 14)
  6398. report(parser, 138);
  6399. const source = parseExpression(parser, context, 1, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  6400. consume(parser, context, 16);
  6401. return finishNode(parser, context, start, line, column, {
  6402. type: 'ImportExpression',
  6403. source
  6404. });
  6405. }
  6406. function parseBigIntLiteral(parser, context, start, line, column) {
  6407. const { tokenRaw, tokenValue } = parser;
  6408. nextToken(parser, context);
  6409. parser.assignable = 2;
  6410. return finishNode(parser, context, start, line, column, context & 512
  6411. ? {
  6412. type: 'Literal',
  6413. value: tokenValue,
  6414. bigint: tokenRaw.slice(0, -1),
  6415. raw: tokenRaw
  6416. }
  6417. : {
  6418. type: 'Literal',
  6419. value: tokenValue,
  6420. bigint: tokenRaw.slice(0, -1)
  6421. });
  6422. }
  6423. function parseTemplateLiteral(parser, context, start, line, column) {
  6424. parser.assignable = 2;
  6425. const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
  6426. consume(parser, context, 67174409);
  6427. const quasis = [parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenPos, linePos, colPos, true)];
  6428. return finishNode(parser, context, start, line, column, {
  6429. type: 'TemplateLiteral',
  6430. expressions: [],
  6431. quasis
  6432. });
  6433. }
  6434. function parseTemplate(parser, context) {
  6435. context = (context | 134217728) ^ 134217728;
  6436. const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
  6437. consume(parser, context | 32768, 67174408);
  6438. const quasis = [
  6439. parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenPos, linePos, colPos, false)
  6440. ];
  6441. const expressions = [parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos)];
  6442. if (parser.token !== 1074790415)
  6443. report(parser, 80);
  6444. while ((parser.token = scanTemplateTail(parser, context)) !== 67174409) {
  6445. const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
  6446. consume(parser, context | 32768, 67174408);
  6447. quasis.push(parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenPos, linePos, colPos, false));
  6448. expressions.push(parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos));
  6449. if (parser.token !== 1074790415)
  6450. report(parser, 80);
  6451. }
  6452. {
  6453. const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
  6454. consume(parser, context, 67174409);
  6455. quasis.push(parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenPos, linePos, colPos, true));
  6456. }
  6457. return finishNode(parser, context, tokenPos, linePos, colPos, {
  6458. type: 'TemplateLiteral',
  6459. expressions,
  6460. quasis
  6461. });
  6462. }
  6463. function parseTemplateElement(parser, context, cooked, raw, start, line, col, tail) {
  6464. const node = finishNode(parser, context, start, line, col, {
  6465. type: 'TemplateElement',
  6466. value: {
  6467. cooked,
  6468. raw
  6469. },
  6470. tail
  6471. });
  6472. const tailSize = tail ? 1 : 2;
  6473. if (context & 2) {
  6474. node.start += 1;
  6475. node.range[0] += 1;
  6476. node.end -= tailSize;
  6477. node.range[1] -= tailSize;
  6478. }
  6479. if (context & 4) {
  6480. node.loc.start.column += 1;
  6481. node.loc.end.column -= tailSize;
  6482. }
  6483. return node;
  6484. }
  6485. function parseSpreadElement(parser, context, start, line, column) {
  6486. context = (context | 134217728) ^ 134217728;
  6487. consume(parser, context | 32768, 14);
  6488. const argument = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  6489. parser.assignable = 1;
  6490. return finishNode(parser, context, start, line, column, {
  6491. type: 'SpreadElement',
  6492. argument
  6493. });
  6494. }
  6495. function parseArguments(parser, context, inGroup) {
  6496. nextToken(parser, context | 32768);
  6497. const args = [];
  6498. if (parser.token === 16) {
  6499. nextToken(parser, context);
  6500. return args;
  6501. }
  6502. while (parser.token !== 16) {
  6503. if (parser.token === 14) {
  6504. args.push(parseSpreadElement(parser, context, parser.tokenPos, parser.linePos, parser.colPos));
  6505. }
  6506. else {
  6507. args.push(parseExpression(parser, context, 1, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
  6508. }
  6509. if (parser.token !== 18)
  6510. break;
  6511. nextToken(parser, context | 32768);
  6512. if (parser.token === 16)
  6513. break;
  6514. }
  6515. consume(parser, context, 16);
  6516. return args;
  6517. }
  6518. function parseIdentifier(parser, context, isPattern) {
  6519. const { tokenValue, tokenPos, linePos, colPos } = parser;
  6520. nextToken(parser, context);
  6521. return finishNode(parser, context, tokenPos, linePos, colPos, context & 268435456
  6522. ? {
  6523. type: 'Identifier',
  6524. name: tokenValue,
  6525. pattern: isPattern === 1
  6526. }
  6527. : {
  6528. type: 'Identifier',
  6529. name: tokenValue
  6530. });
  6531. }
  6532. function parseLiteral(parser, context) {
  6533. const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
  6534. if (parser.token === 134283389) {
  6535. return parseBigIntLiteral(parser, context, tokenPos, linePos, colPos);
  6536. }
  6537. nextToken(parser, context);
  6538. parser.assignable = 2;
  6539. return finishNode(parser, context, tokenPos, linePos, colPos, context & 512
  6540. ? {
  6541. type: 'Literal',
  6542. value: tokenValue,
  6543. raw: tokenRaw
  6544. }
  6545. : {
  6546. type: 'Literal',
  6547. value: tokenValue
  6548. });
  6549. }
  6550. function parseNullOrTrueOrFalseLiteral(parser, context, start, line, column) {
  6551. const raw = KeywordDescTable[parser.token & 255];
  6552. const value = parser.token === 86023 ? null : raw === 'true';
  6553. nextToken(parser, context);
  6554. parser.assignable = 2;
  6555. return finishNode(parser, context, start, line, column, context & 512
  6556. ? {
  6557. type: 'Literal',
  6558. value,
  6559. raw
  6560. }
  6561. : {
  6562. type: 'Literal',
  6563. value
  6564. });
  6565. }
  6566. function parseThisExpression(parser, context) {
  6567. const { tokenPos, linePos, colPos } = parser;
  6568. nextToken(parser, context);
  6569. parser.assignable = 2;
  6570. return finishNode(parser, context, tokenPos, linePos, colPos, {
  6571. type: 'ThisExpression'
  6572. });
  6573. }
  6574. function parseFunctionDeclaration(parser, context, scope, origin, allowGen, flags, isAsync, start, line, column) {
  6575. nextToken(parser, context | 32768);
  6576. const isGenerator = allowGen ? optionalBit(parser, context, 8457014) : 0;
  6577. let id = null;
  6578. let firstRestricted;
  6579. let functionScope = scope ? createScope() : void 0;
  6580. if (parser.token === 67174411) {
  6581. if ((flags & 1) < 1)
  6582. report(parser, 37, 'Function');
  6583. }
  6584. else {
  6585. const kind = origin & 4 && ((context & 8192) < 1 || (context & 2048) < 1)
  6586. ? 4
  6587. : 64;
  6588. validateFunctionName(parser, context | ((context & 3072) << 11), parser.token);
  6589. if (scope) {
  6590. if (kind & 4) {
  6591. addVarName(parser, context, scope, parser.tokenValue, kind);
  6592. }
  6593. else {
  6594. addBlockName(parser, context, scope, parser.tokenValue, kind, origin);
  6595. }
  6596. functionScope = addChildScope(functionScope, 256);
  6597. if (flags) {
  6598. if (flags & 2) {
  6599. declareUnboundVariable(parser, parser.tokenValue);
  6600. }
  6601. }
  6602. }
  6603. firstRestricted = parser.token;
  6604. if (parser.token & 143360) {
  6605. id = parseIdentifier(parser, context, 0);
  6606. }
  6607. else {
  6608. report(parser, 28, KeywordDescTable[parser.token & 255]);
  6609. }
  6610. }
  6611. context =
  6612. ((context | 32243712) ^ 32243712) |
  6613. 67108864 |
  6614. ((isAsync * 2 + isGenerator) << 21) |
  6615. (isGenerator ? 0 : 1073741824);
  6616. if (scope)
  6617. functionScope = addChildScope(functionScope, 512);
  6618. const params = parseFormalParametersOrFormalList(parser, context | 8388608, functionScope, 0, 1);
  6619. const body = parseFunctionBody(parser, (context | 8192 | 4096 | 131072) ^
  6620. (8192 | 4096 | 131072), scope ? addChildScope(functionScope, 128) : functionScope, 8, firstRestricted, scope ? functionScope.scopeError : void 0);
  6621. return finishNode(parser, context, start, line, column, {
  6622. type: 'FunctionDeclaration',
  6623. id,
  6624. params,
  6625. body,
  6626. async: isAsync === 1,
  6627. generator: isGenerator === 1
  6628. });
  6629. }
  6630. function parseFunctionExpression(parser, context, isAsync, inGroup, start, line, column) {
  6631. nextToken(parser, context | 32768);
  6632. const isGenerator = optionalBit(parser, context, 8457014);
  6633. const generatorAndAsyncFlags = (isAsync * 2 + isGenerator) << 21;
  6634. let id = null;
  6635. let firstRestricted;
  6636. let scope = context & 64 ? createScope() : void 0;
  6637. if ((parser.token & (143360 | 4096 | 36864)) > 0) {
  6638. validateFunctionName(parser, ((context | 0x1ec0000) ^ 0x1ec0000) | generatorAndAsyncFlags, parser.token);
  6639. if (scope)
  6640. scope = addChildScope(scope, 256);
  6641. firstRestricted = parser.token;
  6642. id = parseIdentifier(parser, context, 0);
  6643. }
  6644. context =
  6645. ((context | 32243712) ^ 32243712) |
  6646. 67108864 |
  6647. generatorAndAsyncFlags |
  6648. (isGenerator ? 0 : 1073741824);
  6649. if (scope)
  6650. scope = addChildScope(scope, 512);
  6651. const params = parseFormalParametersOrFormalList(parser, context | 8388608, scope, inGroup, 1);
  6652. const body = parseFunctionBody(parser, context & ~(0x8001000 | 8192 | 4096 | 131072 | 16384), scope ? addChildScope(scope, 128) : scope, 0, firstRestricted, void 0);
  6653. parser.assignable = 2;
  6654. return finishNode(parser, context, start, line, column, {
  6655. type: 'FunctionExpression',
  6656. id,
  6657. params,
  6658. body,
  6659. async: isAsync === 1,
  6660. generator: isGenerator === 1
  6661. });
  6662. }
  6663. function parseArrayLiteral(parser, context, skipInitializer, inGroup, start, line, column) {
  6664. const expr = parseArrayExpressionOrPattern(parser, context, void 0, skipInitializer, inGroup, 0, 2, 0, start, line, column);
  6665. if (context & 256 && parser.destructible & 64) {
  6666. report(parser, 60);
  6667. }
  6668. if (parser.destructible & 8) {
  6669. report(parser, 59);
  6670. }
  6671. return expr;
  6672. }
  6673. function parseArrayExpressionOrPattern(parser, context, scope, skipInitializer, inGroup, isPattern, kind, origin, start, line, column) {
  6674. nextToken(parser, context | 32768);
  6675. const elements = [];
  6676. let destructible = 0;
  6677. context = (context | 134217728) ^ 134217728;
  6678. while (parser.token !== 20) {
  6679. if (consumeOpt(parser, context | 32768, 18)) {
  6680. elements.push(null);
  6681. }
  6682. else {
  6683. let left;
  6684. const { token, tokenPos, linePos, colPos, tokenValue } = parser;
  6685. if (token & 143360) {
  6686. left = parsePrimaryExpression(parser, context, kind, 0, 1, 0, inGroup, 1, tokenPos, linePos, colPos);
  6687. if (parser.token === 1077936157) {
  6688. if (parser.assignable & 2)
  6689. report(parser, 24);
  6690. nextToken(parser, context | 32768);
  6691. if (scope)
  6692. addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
  6693. const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  6694. left = finishNode(parser, context, tokenPos, linePos, colPos, isPattern
  6695. ? {
  6696. type: 'AssignmentPattern',
  6697. left,
  6698. right
  6699. }
  6700. : {
  6701. type: 'AssignmentExpression',
  6702. operator: '=',
  6703. left,
  6704. right
  6705. });
  6706. destructible |=
  6707. parser.destructible & 256
  6708. ? 256
  6709. : 0 | (parser.destructible & 128)
  6710. ? 128
  6711. : 0;
  6712. }
  6713. else if (parser.token === 18 || parser.token === 20) {
  6714. if (parser.assignable & 2) {
  6715. destructible |= 16;
  6716. }
  6717. else if (scope) {
  6718. addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
  6719. }
  6720. destructible |=
  6721. parser.destructible & 256
  6722. ? 256
  6723. : 0 | (parser.destructible & 128)
  6724. ? 128
  6725. : 0;
  6726. }
  6727. else {
  6728. destructible |=
  6729. kind & 1
  6730. ? 32
  6731. : (kind & 2) < 1
  6732. ? 16
  6733. : 0;
  6734. left = parseMemberOrUpdateExpression(parser, context, left, inGroup, 0, tokenPos, linePos, colPos);
  6735. if (parser.token !== 18 && parser.token !== 20) {
  6736. if (parser.token !== 1077936157)
  6737. destructible |= 16;
  6738. left = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, left);
  6739. }
  6740. else if (parser.token !== 1077936157) {
  6741. destructible |=
  6742. parser.assignable & 2
  6743. ? 16
  6744. : 32;
  6745. }
  6746. }
  6747. }
  6748. else if (token & 2097152) {
  6749. left =
  6750. parser.token === 2162700
  6751. ? parseObjectLiteralOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos)
  6752. : parseArrayExpressionOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos);
  6753. destructible |= parser.destructible;
  6754. parser.assignable =
  6755. parser.destructible & 16
  6756. ? 2
  6757. : 1;
  6758. if (parser.token === 18 || parser.token === 20) {
  6759. if (parser.assignable & 2) {
  6760. destructible |= 16;
  6761. }
  6762. }
  6763. else if (parser.destructible & 8) {
  6764. report(parser, 68);
  6765. }
  6766. else {
  6767. left = parseMemberOrUpdateExpression(parser, context, left, inGroup, 0, tokenPos, linePos, colPos);
  6768. destructible = parser.assignable & 2 ? 16 : 0;
  6769. if (parser.token !== 18 && parser.token !== 20) {
  6770. left = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, left);
  6771. }
  6772. else if (parser.token !== 1077936157) {
  6773. destructible |=
  6774. parser.assignable & 2
  6775. ? 16
  6776. : 32;
  6777. }
  6778. }
  6779. }
  6780. else if (token === 14) {
  6781. left = parseSpreadOrRestElement(parser, context, scope, 20, kind, origin, 0, inGroup, isPattern, tokenPos, linePos, colPos);
  6782. destructible |= parser.destructible;
  6783. if (parser.token !== 18 && parser.token !== 20)
  6784. report(parser, 28, KeywordDescTable[parser.token & 255]);
  6785. }
  6786. else {
  6787. left = parseLeftHandSideExpression(parser, context, 1, 0, 1, tokenPos, linePos, colPos);
  6788. if (parser.token !== 18 && parser.token !== 20) {
  6789. left = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, left);
  6790. if ((kind & (2 | 1)) < 1 && token === 67174411)
  6791. destructible |= 16;
  6792. }
  6793. else if (parser.assignable & 2) {
  6794. destructible |= 16;
  6795. }
  6796. else if (token === 67174411) {
  6797. destructible |=
  6798. parser.assignable & 1 && kind & (2 | 1)
  6799. ? 32
  6800. : 16;
  6801. }
  6802. }
  6803. elements.push(left);
  6804. if (consumeOpt(parser, context | 32768, 18)) {
  6805. if (parser.token === 20)
  6806. break;
  6807. }
  6808. else
  6809. break;
  6810. }
  6811. }
  6812. consume(parser, context, 20);
  6813. const node = finishNode(parser, context, start, line, column, {
  6814. type: isPattern ? 'ArrayPattern' : 'ArrayExpression',
  6815. elements
  6816. });
  6817. if (!skipInitializer && parser.token & 4194304) {
  6818. return parseArrayOrObjectAssignmentPattern(parser, context, destructible, inGroup, isPattern, start, line, column, node);
  6819. }
  6820. parser.destructible = destructible;
  6821. return node;
  6822. }
  6823. function parseArrayOrObjectAssignmentPattern(parser, context, destructible, inGroup, isPattern, start, line, column, node) {
  6824. if (parser.token !== 1077936157)
  6825. report(parser, 24);
  6826. nextToken(parser, context | 32768);
  6827. if (destructible & 16)
  6828. report(parser, 24);
  6829. if (!isPattern)
  6830. reinterpretToPattern(parser, node);
  6831. const { tokenPos, linePos, colPos } = parser;
  6832. const right = parseExpression(parser, context, 1, 1, inGroup, tokenPos, linePos, colPos);
  6833. parser.destructible =
  6834. ((destructible | 64 | 8) ^
  6835. (8 | 64)) |
  6836. (parser.destructible & 128 ? 128 : 0) |
  6837. (parser.destructible & 256 ? 256 : 0);
  6838. return finishNode(parser, context, start, line, column, isPattern
  6839. ? {
  6840. type: 'AssignmentPattern',
  6841. left: node,
  6842. right
  6843. }
  6844. : {
  6845. type: 'AssignmentExpression',
  6846. left: node,
  6847. operator: '=',
  6848. right
  6849. });
  6850. }
  6851. function parseSpreadOrRestElement(parser, context, scope, closingToken, kind, origin, isAsync, inGroup, isPattern, start, line, column) {
  6852. nextToken(parser, context | 32768);
  6853. let argument = null;
  6854. let destructible = 0;
  6855. let { token, tokenValue, tokenPos, linePos, colPos } = parser;
  6856. if (token & (4096 | 143360)) {
  6857. parser.assignable = 1;
  6858. argument = parsePrimaryExpression(parser, context, kind, 0, 1, 0, inGroup, 1, tokenPos, linePos, colPos);
  6859. token = parser.token;
  6860. argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
  6861. if (parser.token !== 18 && parser.token !== closingToken) {
  6862. if (parser.assignable & 2 && parser.token === 1077936157)
  6863. report(parser, 68);
  6864. destructible |= 16;
  6865. argument = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, argument);
  6866. }
  6867. if (parser.assignable & 2) {
  6868. destructible |= 16;
  6869. }
  6870. else if (token === closingToken || token === 18) {
  6871. if (scope)
  6872. addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
  6873. }
  6874. else {
  6875. destructible |= 32;
  6876. }
  6877. destructible |= parser.destructible & 128 ? 128 : 0;
  6878. }
  6879. else if (token === closingToken) {
  6880. report(parser, 39);
  6881. }
  6882. else if (token & 2097152) {
  6883. argument =
  6884. parser.token === 2162700
  6885. ? parseObjectLiteralOrPattern(parser, context, scope, 1, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos)
  6886. : parseArrayExpressionOrPattern(parser, context, scope, 1, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos);
  6887. token = parser.token;
  6888. if (token !== 1077936157 && token !== closingToken && token !== 18) {
  6889. if (parser.destructible & 8)
  6890. report(parser, 68);
  6891. argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
  6892. destructible |= parser.assignable & 2 ? 16 : 0;
  6893. if ((parser.token & 4194304) === 4194304) {
  6894. if (parser.token !== 1077936157)
  6895. destructible |= 16;
  6896. argument = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, argument);
  6897. }
  6898. else {
  6899. if ((parser.token & 8454144) === 8454144) {
  6900. argument = parseBinaryExpression(parser, context, 1, tokenPos, linePos, colPos, 4, token, argument);
  6901. }
  6902. if (consumeOpt(parser, context | 32768, 22)) {
  6903. argument = parseConditionalExpression(parser, context, argument, tokenPos, linePos, colPos);
  6904. }
  6905. destructible |=
  6906. parser.assignable & 2
  6907. ? 16
  6908. : 32;
  6909. }
  6910. }
  6911. else {
  6912. destructible |=
  6913. closingToken === 1074790415 && token !== 1077936157
  6914. ? 16
  6915. : parser.destructible;
  6916. }
  6917. }
  6918. else {
  6919. destructible |= 32;
  6920. argument = parseLeftHandSideExpression(parser, context, 1, inGroup, 1, parser.tokenPos, parser.linePos, parser.colPos);
  6921. const { token, tokenPos, linePos, colPos } = parser;
  6922. if (token === 1077936157 && token !== closingToken && token !== 18) {
  6923. if (parser.assignable & 2)
  6924. report(parser, 24);
  6925. argument = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, argument);
  6926. destructible |= 16;
  6927. }
  6928. else {
  6929. if (token === 18) {
  6930. destructible |= 16;
  6931. }
  6932. else if (token !== closingToken) {
  6933. argument = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, argument);
  6934. }
  6935. destructible |=
  6936. parser.assignable & 1 ? 32 : 16;
  6937. }
  6938. parser.destructible = destructible;
  6939. if (parser.token !== closingToken && parser.token !== 18)
  6940. report(parser, 155);
  6941. return finishNode(parser, context, start, line, column, {
  6942. type: isPattern ? 'RestElement' : 'SpreadElement',
  6943. argument: argument
  6944. });
  6945. }
  6946. if (parser.token !== closingToken) {
  6947. if (kind & 1)
  6948. destructible |= isAsync ? 16 : 32;
  6949. if (consumeOpt(parser, context | 32768, 1077936157)) {
  6950. if (destructible & 16)
  6951. report(parser, 24);
  6952. reinterpretToPattern(parser, argument);
  6953. const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  6954. argument = finishNode(parser, context, tokenPos, linePos, colPos, isPattern
  6955. ? {
  6956. type: 'AssignmentPattern',
  6957. left: argument,
  6958. right
  6959. }
  6960. : {
  6961. type: 'AssignmentExpression',
  6962. left: argument,
  6963. operator: '=',
  6964. right
  6965. });
  6966. destructible = 16;
  6967. }
  6968. else {
  6969. destructible |= 16;
  6970. }
  6971. }
  6972. parser.destructible = destructible;
  6973. return finishNode(parser, context, start, line, column, {
  6974. type: isPattern ? 'RestElement' : 'SpreadElement',
  6975. argument: argument
  6976. });
  6977. }
  6978. function parseMethodDefinition(parser, context, kind, inGroup, start, line, column) {
  6979. const modifierFlags = (kind & 64) < 1 ? 31981568 : 14680064;
  6980. context =
  6981. ((context | modifierFlags) ^ modifierFlags) |
  6982. ((kind & 88) << 18) |
  6983. 100925440;
  6984. let scope = context & 64 ? addChildScope(createScope(), 512) : void 0;
  6985. const params = parseMethodFormals(parser, context | 8388608, scope, kind, 1, inGroup);
  6986. if (scope)
  6987. scope = addChildScope(scope, 128);
  6988. const body = parseFunctionBody(parser, context & ~(0x8001000 | 8192), scope, 0, void 0, void 0);
  6989. return finishNode(parser, context, start, line, column, {
  6990. type: 'FunctionExpression',
  6991. params,
  6992. body,
  6993. async: (kind & 16) > 0,
  6994. generator: (kind & 8) > 0,
  6995. id: null
  6996. });
  6997. }
  6998. function parseObjectLiteral(parser, context, skipInitializer, inGroup, start, line, column) {
  6999. const expr = parseObjectLiteralOrPattern(parser, context, void 0, skipInitializer, inGroup, 0, 2, 0, start, line, column);
  7000. if (context & 256 && parser.destructible & 64) {
  7001. report(parser, 60);
  7002. }
  7003. if (parser.destructible & 8) {
  7004. report(parser, 59);
  7005. }
  7006. return expr;
  7007. }
  7008. function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, inGroup, isPattern, kind, origin, start, line, column) {
  7009. nextToken(parser, context);
  7010. const properties = [];
  7011. let destructible = 0;
  7012. let prototypeCount = 0;
  7013. context = (context | 134217728) ^ 134217728;
  7014. while (parser.token !== 1074790415) {
  7015. const { token, tokenValue, linePos, colPos, tokenPos } = parser;
  7016. if (token === 14) {
  7017. properties.push(parseSpreadOrRestElement(parser, context, scope, 1074790415, kind, origin, 0, inGroup, isPattern, tokenPos, linePos, colPos));
  7018. }
  7019. else {
  7020. let state = 0;
  7021. let key = null;
  7022. let value;
  7023. const t = parser.token;
  7024. if (parser.token & (143360 | 4096) || parser.token === 121) {
  7025. key = parseIdentifier(parser, context, 0);
  7026. if (parser.token === 18 || parser.token === 1074790415 || parser.token === 1077936157) {
  7027. state |= 4;
  7028. if (context & 1024 && (token & 537079808) === 537079808) {
  7029. destructible |= 16;
  7030. }
  7031. else {
  7032. validateBindingIdentifier(parser, context, kind, token, 0);
  7033. }
  7034. if (scope)
  7035. addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
  7036. if (consumeOpt(parser, context | 32768, 1077936157)) {
  7037. destructible |= 8;
  7038. const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  7039. destructible |=
  7040. parser.destructible & 256
  7041. ? 256
  7042. : 0 | (parser.destructible & 128)
  7043. ? 128
  7044. : 0;
  7045. value = finishNode(parser, context, tokenPos, linePos, colPos, {
  7046. type: 'AssignmentPattern',
  7047. left: context & -2147483648 ? Object.assign({}, key) : key,
  7048. right
  7049. });
  7050. }
  7051. else {
  7052. destructible |=
  7053. (token === 209008 ? 128 : 0) |
  7054. (token === 121 ? 16 : 0);
  7055. value = context & -2147483648 ? Object.assign({}, key) : key;
  7056. }
  7057. }
  7058. else if (consumeOpt(parser, context | 32768, 21)) {
  7059. const { tokenPos, linePos, colPos } = parser;
  7060. if (tokenValue === '__proto__')
  7061. prototypeCount++;
  7062. if (parser.token & 143360) {
  7063. const tokenAfterColon = parser.token;
  7064. const valueAfterColon = parser.tokenValue;
  7065. destructible |= t === 121 ? 16 : 0;
  7066. value = parsePrimaryExpression(parser, context, kind, 0, 1, 0, inGroup, 1, tokenPos, linePos, colPos);
  7067. const { token } = parser;
  7068. value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
  7069. if (parser.token === 18 || parser.token === 1074790415) {
  7070. if (token === 1077936157 || token === 1074790415 || token === 18) {
  7071. destructible |= parser.destructible & 128 ? 128 : 0;
  7072. if (parser.assignable & 2) {
  7073. destructible |= 16;
  7074. }
  7075. else if (scope && (tokenAfterColon & 143360) === 143360) {
  7076. addVarOrBlock(parser, context, scope, valueAfterColon, kind, origin);
  7077. }
  7078. }
  7079. else {
  7080. destructible |=
  7081. parser.assignable & 1
  7082. ? 32
  7083. : 16;
  7084. }
  7085. }
  7086. else if ((parser.token & 4194304) === 4194304) {
  7087. if (parser.assignable & 2) {
  7088. destructible |= 16;
  7089. }
  7090. else if (token !== 1077936157) {
  7091. destructible |= 32;
  7092. }
  7093. else if (scope) {
  7094. addVarOrBlock(parser, context, scope, valueAfterColon, kind, origin);
  7095. }
  7096. value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, value);
  7097. }
  7098. else {
  7099. destructible |= 16;
  7100. if ((parser.token & 8454144) === 8454144) {
  7101. value = parseBinaryExpression(parser, context, 1, tokenPos, linePos, colPos, 4, token, value);
  7102. }
  7103. if (consumeOpt(parser, context | 32768, 22)) {
  7104. value = parseConditionalExpression(parser, context, value, tokenPos, linePos, colPos);
  7105. }
  7106. }
  7107. }
  7108. else if ((parser.token & 2097152) === 2097152) {
  7109. value =
  7110. parser.token === 69271571
  7111. ? parseArrayExpressionOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos)
  7112. : parseObjectLiteralOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos);
  7113. destructible = parser.destructible;
  7114. parser.assignable =
  7115. destructible & 16 ? 2 : 1;
  7116. if (parser.token === 18 || parser.token === 1074790415) {
  7117. if (parser.assignable & 2)
  7118. destructible |= 16;
  7119. }
  7120. else if (parser.destructible & 8) {
  7121. report(parser, 68);
  7122. }
  7123. else {
  7124. value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
  7125. destructible = parser.assignable & 2 ? 16 : 0;
  7126. if ((parser.token & 4194304) === 4194304) {
  7127. value = parseAssignmentExpressionOrPattern(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, value);
  7128. }
  7129. else {
  7130. if ((parser.token & 8454144) === 8454144) {
  7131. value = parseBinaryExpression(parser, context, 1, tokenPos, linePos, colPos, 4, token, value);
  7132. }
  7133. if (consumeOpt(parser, context | 32768, 22)) {
  7134. value = parseConditionalExpression(parser, context, value, tokenPos, linePos, colPos);
  7135. }
  7136. destructible |=
  7137. parser.assignable & 2
  7138. ? 16
  7139. : 32;
  7140. }
  7141. }
  7142. }
  7143. else {
  7144. value = parseLeftHandSideExpression(parser, context, 1, inGroup, 1, tokenPos, linePos, colPos);
  7145. destructible |=
  7146. parser.assignable & 1
  7147. ? 32
  7148. : 16;
  7149. if (parser.token === 18 || parser.token === 1074790415) {
  7150. if (parser.assignable & 2)
  7151. destructible |= 16;
  7152. }
  7153. else {
  7154. value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
  7155. destructible = parser.assignable & 2 ? 16 : 0;
  7156. if (parser.token !== 18 && token !== 1074790415) {
  7157. if (parser.token !== 1077936157)
  7158. destructible |= 16;
  7159. value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, value);
  7160. }
  7161. }
  7162. }
  7163. }
  7164. else if (parser.token === 69271571) {
  7165. destructible |= 16;
  7166. if (token === 209007)
  7167. state |= 16;
  7168. state |=
  7169. (token === 12402
  7170. ? 256
  7171. : token === 12403
  7172. ? 512
  7173. : 1) | 2;
  7174. key = parseComputedPropertyName(parser, context, inGroup);
  7175. destructible |= parser.assignable;
  7176. value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  7177. }
  7178. else if (parser.token & (143360 | 4096)) {
  7179. destructible |= 16;
  7180. if (token === 121)
  7181. report(parser, 92);
  7182. if (token === 209007) {
  7183. if (parser.flags & 1)
  7184. report(parser, 128);
  7185. state |= 16;
  7186. }
  7187. key = parseIdentifier(parser, context, 0);
  7188. state |=
  7189. token === 12402
  7190. ? 256
  7191. : token === 12403
  7192. ? 512
  7193. : 1;
  7194. value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  7195. }
  7196. else if (parser.token === 67174411) {
  7197. destructible |= 16;
  7198. state |= 1;
  7199. value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  7200. }
  7201. else if (parser.token === 8457014) {
  7202. destructible |= 16;
  7203. if (token === 12402 || token === 12403) {
  7204. report(parser, 40);
  7205. }
  7206. else if (token === 143483) {
  7207. report(parser, 92);
  7208. }
  7209. nextToken(parser, context);
  7210. state |=
  7211. 8 | 1 | (token === 209007 ? 16 : 0);
  7212. if (parser.token & 143360) {
  7213. key = parseIdentifier(parser, context, 0);
  7214. }
  7215. else if ((parser.token & 134217728) === 134217728) {
  7216. key = parseLiteral(parser, context);
  7217. }
  7218. else if (parser.token === 69271571) {
  7219. state |= 2;
  7220. key = parseComputedPropertyName(parser, context, inGroup);
  7221. destructible |= parser.assignable;
  7222. }
  7223. else {
  7224. report(parser, 28, KeywordDescTable[parser.token & 255]);
  7225. }
  7226. value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  7227. }
  7228. else if ((parser.token & 134217728) === 134217728) {
  7229. if (token === 209007)
  7230. state |= 16;
  7231. state |=
  7232. token === 12402
  7233. ? 256
  7234. : token === 12403
  7235. ? 512
  7236. : 1;
  7237. destructible |= 16;
  7238. key = parseLiteral(parser, context);
  7239. value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  7240. }
  7241. else {
  7242. report(parser, 129);
  7243. }
  7244. }
  7245. else if ((parser.token & 134217728) === 134217728) {
  7246. key = parseLiteral(parser, context);
  7247. if (parser.token === 21) {
  7248. consume(parser, context | 32768, 21);
  7249. const { tokenPos, linePos, colPos } = parser;
  7250. if (tokenValue === '__proto__')
  7251. prototypeCount++;
  7252. if (parser.token & 143360) {
  7253. value = parsePrimaryExpression(parser, context, kind, 0, 1, 0, inGroup, 1, tokenPos, linePos, colPos);
  7254. const { token, tokenValue: valueAfterColon } = parser;
  7255. value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
  7256. if (parser.token === 18 || parser.token === 1074790415) {
  7257. if (token === 1077936157 || token === 1074790415 || token === 18) {
  7258. if (parser.assignable & 2) {
  7259. destructible |= 16;
  7260. }
  7261. else if (scope) {
  7262. addVarOrBlock(parser, context, scope, valueAfterColon, kind, origin);
  7263. }
  7264. }
  7265. else {
  7266. destructible |=
  7267. parser.assignable & 1
  7268. ? 32
  7269. : 16;
  7270. }
  7271. }
  7272. else if (parser.token === 1077936157) {
  7273. if (parser.assignable & 2)
  7274. destructible |= 16;
  7275. value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, value);
  7276. }
  7277. else {
  7278. destructible |= 16;
  7279. value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, value);
  7280. }
  7281. }
  7282. else if ((parser.token & 2097152) === 2097152) {
  7283. value =
  7284. parser.token === 69271571
  7285. ? parseArrayExpressionOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos)
  7286. : parseObjectLiteralOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos);
  7287. destructible = parser.destructible;
  7288. parser.assignable =
  7289. destructible & 16 ? 2 : 1;
  7290. if (parser.token === 18 || parser.token === 1074790415) {
  7291. if (parser.assignable & 2) {
  7292. destructible |= 16;
  7293. }
  7294. }
  7295. else if ((parser.destructible & 8) !== 8) {
  7296. value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
  7297. destructible = parser.assignable & 2 ? 16 : 0;
  7298. if ((parser.token & 4194304) === 4194304) {
  7299. value = parseAssignmentExpressionOrPattern(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, value);
  7300. }
  7301. else {
  7302. if ((parser.token & 8454144) === 8454144) {
  7303. value = parseBinaryExpression(parser, context, 1, tokenPos, linePos, colPos, 4, token, value);
  7304. }
  7305. if (consumeOpt(parser, context | 32768, 22)) {
  7306. value = parseConditionalExpression(parser, context, value, tokenPos, linePos, colPos);
  7307. }
  7308. destructible |=
  7309. parser.assignable & 2
  7310. ? 16
  7311. : 32;
  7312. }
  7313. }
  7314. }
  7315. else {
  7316. value = parseLeftHandSideExpression(parser, context, 1, 0, 1, tokenPos, linePos, colPos);
  7317. destructible |=
  7318. parser.assignable & 1
  7319. ? 32
  7320. : 16;
  7321. if (parser.token === 18 || parser.token === 1074790415) {
  7322. if (parser.assignable & 2) {
  7323. destructible |= 16;
  7324. }
  7325. }
  7326. else {
  7327. value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
  7328. destructible = parser.assignable & 1 ? 0 : 16;
  7329. if (parser.token !== 18 && parser.token !== 1074790415) {
  7330. if (parser.token !== 1077936157)
  7331. destructible |= 16;
  7332. value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, value);
  7333. }
  7334. }
  7335. }
  7336. }
  7337. else if (parser.token === 67174411) {
  7338. state |= 1;
  7339. value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  7340. destructible = parser.assignable | 16;
  7341. }
  7342. else {
  7343. report(parser, 130);
  7344. }
  7345. }
  7346. else if (parser.token === 69271571) {
  7347. key = parseComputedPropertyName(parser, context, inGroup);
  7348. destructible |= parser.destructible & 256 ? 256 : 0;
  7349. state |= 2;
  7350. if (parser.token === 21) {
  7351. nextToken(parser, context | 32768);
  7352. const { tokenPos, linePos, colPos, tokenValue, token: tokenAfterColon } = parser;
  7353. if (parser.token & 143360) {
  7354. value = parsePrimaryExpression(parser, context, kind, 0, 1, 0, inGroup, 1, tokenPos, linePos, colPos);
  7355. const { token } = parser;
  7356. value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
  7357. if ((parser.token & 4194304) === 4194304) {
  7358. destructible |=
  7359. parser.assignable & 2
  7360. ? 16
  7361. : token === 1077936157
  7362. ? 0
  7363. : 32;
  7364. value = parseAssignmentExpressionOrPattern(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, value);
  7365. }
  7366. else if (parser.token === 18 || parser.token === 1074790415) {
  7367. if (token === 1077936157 || token === 1074790415 || token === 18) {
  7368. if (parser.assignable & 2) {
  7369. destructible |= 16;
  7370. }
  7371. else if (scope && (tokenAfterColon & 143360) === 143360) {
  7372. addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
  7373. }
  7374. }
  7375. else {
  7376. destructible |=
  7377. parser.assignable & 1
  7378. ? 32
  7379. : 16;
  7380. }
  7381. }
  7382. else {
  7383. destructible |= 16;
  7384. value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, value);
  7385. }
  7386. }
  7387. else if ((parser.token & 2097152) === 2097152) {
  7388. value =
  7389. parser.token === 69271571
  7390. ? parseArrayExpressionOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos)
  7391. : parseObjectLiteralOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos);
  7392. destructible = parser.destructible;
  7393. parser.assignable =
  7394. destructible & 16 ? 2 : 1;
  7395. if (parser.token === 18 || parser.token === 1074790415) {
  7396. if (parser.assignable & 2)
  7397. destructible |= 16;
  7398. }
  7399. else if (destructible & 8) {
  7400. report(parser, 59);
  7401. }
  7402. else {
  7403. value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
  7404. destructible =
  7405. parser.assignable & 2 ? destructible | 16 : 0;
  7406. if ((parser.token & 4194304) === 4194304) {
  7407. if (parser.token !== 1077936157)
  7408. destructible |= 16;
  7409. value = parseAssignmentExpressionOrPattern(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, value);
  7410. }
  7411. else {
  7412. if ((parser.token & 8454144) === 8454144) {
  7413. value = parseBinaryExpression(parser, context, 1, tokenPos, linePos, colPos, 4, token, value);
  7414. }
  7415. if (consumeOpt(parser, context | 32768, 22)) {
  7416. value = parseConditionalExpression(parser, context, value, tokenPos, linePos, colPos);
  7417. }
  7418. destructible |=
  7419. parser.assignable & 2
  7420. ? 16
  7421. : 32;
  7422. }
  7423. }
  7424. }
  7425. else {
  7426. value = parseLeftHandSideExpression(parser, context, 1, 0, 1, tokenPos, linePos, colPos);
  7427. destructible |=
  7428. parser.assignable & 1
  7429. ? 32
  7430. : 16;
  7431. if (parser.token === 18 || parser.token === 1074790415) {
  7432. if (parser.assignable & 2)
  7433. destructible |= 16;
  7434. }
  7435. else {
  7436. value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos, linePos, colPos);
  7437. destructible = parser.assignable & 1 ? 0 : 16;
  7438. if (parser.token !== 18 && parser.token !== 1074790415) {
  7439. if (parser.token !== 1077936157)
  7440. destructible |= 16;
  7441. value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, value);
  7442. }
  7443. }
  7444. }
  7445. }
  7446. else if (parser.token === 67174411) {
  7447. state |= 1;
  7448. value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, linePos, colPos);
  7449. destructible = 16;
  7450. }
  7451. else {
  7452. report(parser, 41);
  7453. }
  7454. }
  7455. else if (token === 8457014) {
  7456. consume(parser, context | 32768, 8457014);
  7457. state |= 8;
  7458. if (parser.token & 143360) {
  7459. const { token, line, index } = parser;
  7460. key = parseIdentifier(parser, context, 0);
  7461. state |= 1;
  7462. if (parser.token === 67174411) {
  7463. destructible |= 16;
  7464. value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  7465. }
  7466. else {
  7467. reportMessageAt(index, line, index, token === 209007
  7468. ? 43
  7469. : token === 12402 || parser.token === 12403
  7470. ? 42
  7471. : 44, KeywordDescTable[token & 255]);
  7472. }
  7473. }
  7474. else if ((parser.token & 134217728) === 134217728) {
  7475. destructible |= 16;
  7476. key = parseLiteral(parser, context);
  7477. state |= 1;
  7478. value = parseMethodDefinition(parser, context, state, inGroup, tokenPos, linePos, colPos);
  7479. }
  7480. else if (parser.token === 69271571) {
  7481. destructible |= 16;
  7482. state |= 2 | 1;
  7483. key = parseComputedPropertyName(parser, context, inGroup);
  7484. value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  7485. }
  7486. else {
  7487. report(parser, 122);
  7488. }
  7489. }
  7490. else {
  7491. report(parser, 28, KeywordDescTable[token & 255]);
  7492. }
  7493. destructible |= parser.destructible & 128 ? 128 : 0;
  7494. parser.destructible = destructible;
  7495. properties.push(finishNode(parser, context, tokenPos, linePos, colPos, {
  7496. type: 'Property',
  7497. key: key,
  7498. value,
  7499. kind: !(state & 768) ? 'init' : state & 512 ? 'set' : 'get',
  7500. computed: (state & 2) > 0,
  7501. method: (state & 1) > 0,
  7502. shorthand: (state & 4) > 0
  7503. }));
  7504. }
  7505. destructible |= parser.destructible;
  7506. if (parser.token !== 18)
  7507. break;
  7508. nextToken(parser, context);
  7509. }
  7510. consume(parser, context, 1074790415);
  7511. if (prototypeCount > 1)
  7512. destructible |= 64;
  7513. const node = finishNode(parser, context, start, line, column, {
  7514. type: isPattern ? 'ObjectPattern' : 'ObjectExpression',
  7515. properties
  7516. });
  7517. if (!skipInitializer && parser.token & 4194304) {
  7518. return parseArrayOrObjectAssignmentPattern(parser, context, destructible, inGroup, isPattern, start, line, column, node);
  7519. }
  7520. parser.destructible = destructible;
  7521. return node;
  7522. }
  7523. function parseMethodFormals(parser, context, scope, kind, type, inGroup) {
  7524. consume(parser, context, 67174411);
  7525. const params = [];
  7526. parser.flags = (parser.flags | 128) ^ 128;
  7527. if (parser.token === 16) {
  7528. if (kind & 512) {
  7529. report(parser, 35, 'Setter', 'one', '');
  7530. }
  7531. nextToken(parser, context);
  7532. return params;
  7533. }
  7534. if (kind & 256) {
  7535. report(parser, 35, 'Getter', 'no', 's');
  7536. }
  7537. if (kind & 512 && parser.token === 14) {
  7538. report(parser, 36);
  7539. }
  7540. context = (context | 134217728) ^ 134217728;
  7541. let setterArgs = 0;
  7542. let isSimpleParameterList = 0;
  7543. while (parser.token !== 18) {
  7544. let left = null;
  7545. const { tokenPos, linePos, colPos } = parser;
  7546. if (parser.token & 143360) {
  7547. if ((context & 1024) < 1) {
  7548. if ((parser.token & 36864) === 36864) {
  7549. parser.flags |= 256;
  7550. }
  7551. if ((parser.token & 537079808) === 537079808) {
  7552. parser.flags |= 512;
  7553. }
  7554. }
  7555. left = parseAndClassifyIdentifier(parser, context, scope, kind | 1, 0, tokenPos, linePos, colPos);
  7556. }
  7557. else {
  7558. if (parser.token === 2162700) {
  7559. left = parseObjectLiteralOrPattern(parser, context, scope, 1, inGroup, 1, type, 0, tokenPos, linePos, colPos);
  7560. }
  7561. else if (parser.token === 69271571) {
  7562. left = parseArrayExpressionOrPattern(parser, context, scope, 1, inGroup, 1, type, 0, tokenPos, linePos, colPos);
  7563. }
  7564. else if (parser.token === 14) {
  7565. left = parseSpreadOrRestElement(parser, context, scope, 16, type, 0, 0, inGroup, 1, tokenPos, linePos, colPos);
  7566. }
  7567. isSimpleParameterList = 1;
  7568. if (parser.destructible & (32 | 16))
  7569. report(parser, 47);
  7570. }
  7571. if (parser.token === 1077936157) {
  7572. nextToken(parser, context | 32768);
  7573. isSimpleParameterList = 1;
  7574. const right = parseExpression(parser, context, 1, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
  7575. left = finishNode(parser, context, tokenPos, linePos, colPos, {
  7576. type: 'AssignmentPattern',
  7577. left: left,
  7578. right
  7579. });
  7580. }
  7581. setterArgs++;
  7582. params.push(left);
  7583. if (!consumeOpt(parser, context, 18))
  7584. break;
  7585. if (parser.token === 16) {
  7586. break;
  7587. }
  7588. }
  7589. if (kind & 512 && setterArgs !== 1) {
  7590. report(parser, 35, 'Setter', 'one', '');
  7591. }
  7592. if (scope && scope.scopeError !== void 0)
  7593. reportScopeError(scope.scopeError);
  7594. if (isSimpleParameterList)
  7595. parser.flags |= 128;
  7596. consume(parser, context, 16);
  7597. return params;
  7598. }
  7599. function parseComputedPropertyName(parser, context, inGroup) {
  7600. nextToken(parser, context | 32768);
  7601. const key = parseExpression(parser, (context | 134217728) ^ 134217728, 1, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  7602. consume(parser, context, 20);
  7603. return key;
  7604. }
  7605. function parseParenthesizedExpression(parser, context, canAssign, kind, origin, start, line, column) {
  7606. parser.flags = (parser.flags | 128) ^ 128;
  7607. const { tokenPos: piStart, linePos: plStart, colPos: pcStart } = parser;
  7608. nextToken(parser, context | 32768 | 1073741824);
  7609. const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
  7610. context = (context | 134217728 | 8192) ^ (8192 | 134217728);
  7611. if (consumeOpt(parser, context, 16)) {
  7612. return parseParenthesizedArrow(parser, context, scope, [], canAssign, 0, start, line, column);
  7613. }
  7614. let destructible = 0;
  7615. parser.destructible &= ~(256 | 128);
  7616. let expr;
  7617. let expressions = [];
  7618. let isSequence = 0;
  7619. let isSimpleParameterList = 0;
  7620. const { tokenPos: iStart, linePos: lStart, colPos: cStart } = parser;
  7621. parser.assignable = 1;
  7622. while (parser.token !== 16) {
  7623. const { token, tokenPos, linePos, colPos } = parser;
  7624. if (token & (143360 | 4096)) {
  7625. if (scope)
  7626. addBlockName(parser, context, scope, parser.tokenValue, 1, 0);
  7627. expr = parsePrimaryExpression(parser, context, kind, 0, 1, 0, 1, 1, tokenPos, linePos, colPos);
  7628. if (parser.token === 16 || parser.token === 18) {
  7629. if (parser.assignable & 2) {
  7630. destructible |= 16;
  7631. isSimpleParameterList = 1;
  7632. }
  7633. else if ((token & 537079808) === 537079808 ||
  7634. (token & 36864) === 36864) {
  7635. isSimpleParameterList = 1;
  7636. }
  7637. }
  7638. else {
  7639. if (parser.token === 1077936157) {
  7640. isSimpleParameterList = 1;
  7641. }
  7642. else {
  7643. destructible |= 16;
  7644. }
  7645. expr = parseMemberOrUpdateExpression(parser, context, expr, 1, 0, tokenPos, linePos, colPos);
  7646. if (parser.token !== 16 && parser.token !== 18) {
  7647. expr = parseAssignmentExpression(parser, context, 1, 0, tokenPos, linePos, colPos, expr);
  7648. }
  7649. }
  7650. }
  7651. else if ((token & 2097152) === 2097152) {
  7652. expr =
  7653. token === 2162700
  7654. ? parseObjectLiteralOrPattern(parser, context | 1073741824, scope, 0, 1, 0, kind, origin, tokenPos, linePos, colPos)
  7655. : parseArrayExpressionOrPattern(parser, context | 1073741824, scope, 0, 1, 0, kind, origin, tokenPos, linePos, colPos);
  7656. destructible |= parser.destructible;
  7657. isSimpleParameterList = 1;
  7658. parser.assignable = 2;
  7659. if (parser.token !== 16 && parser.token !== 18) {
  7660. if (destructible & 8)
  7661. report(parser, 118);
  7662. expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, tokenPos, linePos, colPos);
  7663. destructible |= 16;
  7664. if (parser.token !== 16 && parser.token !== 18) {
  7665. expr = parseAssignmentExpression(parser, context, 0, 0, tokenPos, linePos, colPos, expr);
  7666. }
  7667. }
  7668. }
  7669. else if (token === 14) {
  7670. expr = parseSpreadOrRestElement(parser, context, scope, 16, kind, origin, 0, 1, 0, tokenPos, linePos, colPos);
  7671. if (parser.destructible & 16)
  7672. report(parser, 71);
  7673. isSimpleParameterList = 1;
  7674. if (isSequence && (parser.token === 16 || parser.token === 18)) {
  7675. expressions.push(expr);
  7676. }
  7677. destructible |= 8;
  7678. break;
  7679. }
  7680. else {
  7681. destructible |= 16;
  7682. expr = parseExpression(parser, context, 1, 0, 1, tokenPos, linePos, colPos);
  7683. if (isSequence && (parser.token === 16 || parser.token === 18)) {
  7684. expressions.push(expr);
  7685. }
  7686. if (parser.token === 18) {
  7687. if (!isSequence) {
  7688. isSequence = 1;
  7689. expressions = [expr];
  7690. }
  7691. }
  7692. if (isSequence) {
  7693. while (consumeOpt(parser, context | 32768, 18)) {
  7694. expressions.push(parseExpression(parser, context, 1, 0, 1, parser.tokenPos, parser.linePos, parser.colPos));
  7695. }
  7696. parser.assignable = 2;
  7697. expr = finishNode(parser, context, iStart, lStart, cStart, {
  7698. type: 'SequenceExpression',
  7699. expressions
  7700. });
  7701. }
  7702. consume(parser, context, 16);
  7703. parser.destructible = destructible;
  7704. return expr;
  7705. }
  7706. if (isSequence && (parser.token === 16 || parser.token === 18)) {
  7707. expressions.push(expr);
  7708. }
  7709. if (!consumeOpt(parser, context | 32768, 18))
  7710. break;
  7711. if (!isSequence) {
  7712. isSequence = 1;
  7713. expressions = [expr];
  7714. }
  7715. if (parser.token === 16) {
  7716. destructible |= 8;
  7717. break;
  7718. }
  7719. }
  7720. if (isSequence) {
  7721. parser.assignable = 2;
  7722. expr = finishNode(parser, context, iStart, lStart, cStart, {
  7723. type: 'SequenceExpression',
  7724. expressions
  7725. });
  7726. }
  7727. consume(parser, context, 16);
  7728. if (destructible & 16 && destructible & 8)
  7729. report(parser, 145);
  7730. destructible |=
  7731. parser.destructible & 256
  7732. ? 256
  7733. : 0 | (parser.destructible & 128)
  7734. ? 128
  7735. : 0;
  7736. if (parser.token === 10) {
  7737. if (destructible & (32 | 16))
  7738. report(parser, 46);
  7739. if (context & (4194304 | 2048) && destructible & 128)
  7740. report(parser, 29);
  7741. if (context & (1024 | 2097152) && destructible & 256) {
  7742. report(parser, 30);
  7743. }
  7744. if (isSimpleParameterList)
  7745. parser.flags |= 128;
  7746. return parseParenthesizedArrow(parser, context, scope, isSequence ? expressions : [expr], canAssign, 0, start, line, column);
  7747. }
  7748. else if (destructible & 8) {
  7749. report(parser, 139);
  7750. }
  7751. parser.destructible = ((parser.destructible | 256) ^ 256) | destructible;
  7752. return context & 128
  7753. ? finishNode(parser, context, piStart, plStart, pcStart, {
  7754. type: 'ParenthesizedExpression',
  7755. expression: expr
  7756. })
  7757. : expr;
  7758. }
  7759. function parseIdentifierOrArrow(parser, context, start, line, column) {
  7760. const { tokenValue } = parser;
  7761. const expr = parseIdentifier(parser, context, 0);
  7762. parser.assignable = 1;
  7763. if (parser.token === 10) {
  7764. let scope = void 0;
  7765. if (context & 64)
  7766. scope = createArrowHeadParsingScope(parser, context, tokenValue);
  7767. parser.flags = (parser.flags | 128) ^ 128;
  7768. return parseArrowFunctionExpression(parser, context, scope, [expr], 0, start, line, column);
  7769. }
  7770. return expr;
  7771. }
  7772. function parseArrowFromIdentifier(parser, context, value, expr, inNew, canAssign, isAsync, start, line, column) {
  7773. if (!canAssign)
  7774. report(parser, 54);
  7775. if (inNew)
  7776. report(parser, 48);
  7777. parser.flags &= ~128;
  7778. const scope = context & 64 ? createArrowHeadParsingScope(parser, context, value) : void 0;
  7779. return parseArrowFunctionExpression(parser, context, scope, [expr], isAsync, start, line, column);
  7780. }
  7781. function parseParenthesizedArrow(parser, context, scope, params, canAssign, isAsync, start, line, column) {
  7782. if (!canAssign)
  7783. report(parser, 54);
  7784. for (let i = 0; i < params.length; ++i)
  7785. reinterpretToPattern(parser, params[i]);
  7786. return parseArrowFunctionExpression(parser, context, scope, params, isAsync, start, line, column);
  7787. }
  7788. function parseArrowFunctionExpression(parser, context, scope, params, isAsync, start, line, column) {
  7789. if (parser.flags & 1)
  7790. report(parser, 45);
  7791. consume(parser, context | 32768, 10);
  7792. context = ((context | 15728640) ^ 15728640) | (isAsync << 22);
  7793. const expression = parser.token !== 2162700;
  7794. let body;
  7795. if (scope && scope.scopeError !== void 0) {
  7796. reportScopeError(scope.scopeError);
  7797. }
  7798. if (expression) {
  7799. body = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  7800. }
  7801. else {
  7802. if (scope)
  7803. scope = addChildScope(scope, 128);
  7804. body = parseFunctionBody(parser, (context | 134221824 | 8192 | 16384) ^
  7805. (134221824 | 8192 | 16384), scope, 16, void 0, void 0);
  7806. switch (parser.token) {
  7807. case 69271571:
  7808. if ((parser.flags & 1) < 1) {
  7809. report(parser, 112);
  7810. }
  7811. break;
  7812. case 67108877:
  7813. case 67174409:
  7814. case 22:
  7815. report(parser, 113);
  7816. case 67174411:
  7817. if ((parser.flags & 1) < 1) {
  7818. report(parser, 112);
  7819. }
  7820. parser.flags |= 1024;
  7821. break;
  7822. }
  7823. if ((parser.token & 8454144) === 8454144 && (parser.flags & 1) < 1)
  7824. report(parser, 28, KeywordDescTable[parser.token & 255]);
  7825. if ((parser.token & 33619968) === 33619968)
  7826. report(parser, 121);
  7827. }
  7828. parser.assignable = 2;
  7829. return finishNode(parser, context, start, line, column, {
  7830. type: 'ArrowFunctionExpression',
  7831. params,
  7832. body,
  7833. async: isAsync === 1,
  7834. expression
  7835. });
  7836. }
  7837. function parseFormalParametersOrFormalList(parser, context, scope, inGroup, kind) {
  7838. consume(parser, context, 67174411);
  7839. parser.flags = (parser.flags | 128) ^ 128;
  7840. const params = [];
  7841. if (consumeOpt(parser, context, 16))
  7842. return params;
  7843. context = (context | 134217728) ^ 134217728;
  7844. let isSimpleParameterList = 0;
  7845. while (parser.token !== 18) {
  7846. let left;
  7847. const { tokenPos, linePos, colPos } = parser;
  7848. if (parser.token & 143360) {
  7849. if ((context & 1024) < 1) {
  7850. if ((parser.token & 36864) === 36864) {
  7851. parser.flags |= 256;
  7852. }
  7853. if ((parser.token & 537079808) === 537079808) {
  7854. parser.flags |= 512;
  7855. }
  7856. }
  7857. left = parseAndClassifyIdentifier(parser, context, scope, kind | 1, 0, tokenPos, linePos, colPos);
  7858. }
  7859. else {
  7860. if (parser.token === 2162700) {
  7861. left = parseObjectLiteralOrPattern(parser, context, scope, 1, inGroup, 1, kind, 0, tokenPos, linePos, colPos);
  7862. }
  7863. else if (parser.token === 69271571) {
  7864. left = parseArrayExpressionOrPattern(parser, context, scope, 1, inGroup, 1, kind, 0, tokenPos, linePos, colPos);
  7865. }
  7866. else if (parser.token === 14) {
  7867. left = parseSpreadOrRestElement(parser, context, scope, 16, kind, 0, 0, inGroup, 1, tokenPos, linePos, colPos);
  7868. }
  7869. else {
  7870. report(parser, 28, KeywordDescTable[parser.token & 255]);
  7871. }
  7872. isSimpleParameterList = 1;
  7873. if (parser.destructible & (32 | 16)) {
  7874. report(parser, 47);
  7875. }
  7876. }
  7877. if (parser.token === 1077936157) {
  7878. nextToken(parser, context | 32768);
  7879. isSimpleParameterList = 1;
  7880. const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  7881. left = finishNode(parser, context, tokenPos, linePos, colPos, {
  7882. type: 'AssignmentPattern',
  7883. left,
  7884. right
  7885. });
  7886. }
  7887. params.push(left);
  7888. if (!consumeOpt(parser, context, 18))
  7889. break;
  7890. if (parser.token === 16) {
  7891. break;
  7892. }
  7893. }
  7894. if (isSimpleParameterList)
  7895. parser.flags |= 128;
  7896. if (scope && (isSimpleParameterList || context & 1024) && scope.scopeError !== void 0) {
  7897. reportScopeError(scope.scopeError);
  7898. }
  7899. consume(parser, context, 16);
  7900. return params;
  7901. }
  7902. function parseMembeExpressionNoCall(parser, context, expr, inGroup, start, line, column) {
  7903. const { token } = parser;
  7904. if (token & 67108864) {
  7905. if (token === 67108877) {
  7906. nextToken(parser, context | 1073741824);
  7907. parser.assignable = 1;
  7908. const property = parsePropertyOrPrivatePropertyName(parser, context);
  7909. return parseMembeExpressionNoCall(parser, context, finishNode(parser, context, start, line, column, {
  7910. type: 'MemberExpression',
  7911. object: expr,
  7912. computed: false,
  7913. property
  7914. }), 0, start, line, column);
  7915. }
  7916. else if (token === 69271571) {
  7917. nextToken(parser, context | 32768);
  7918. const { tokenPos, linePos, colPos } = parser;
  7919. const property = parseExpressions(parser, context, inGroup, 1, tokenPos, linePos, colPos);
  7920. consume(parser, context, 20);
  7921. parser.assignable = 1;
  7922. return parseMembeExpressionNoCall(parser, context, finishNode(parser, context, start, line, column, {
  7923. type: 'MemberExpression',
  7924. object: expr,
  7925. computed: true,
  7926. property
  7927. }), 0, start, line, column);
  7928. }
  7929. else if (token === 67174408 || token === 67174409) {
  7930. parser.assignable = 2;
  7931. return parseMembeExpressionNoCall(parser, context, finishNode(parser, context, start, line, column, {
  7932. type: 'TaggedTemplateExpression',
  7933. tag: expr,
  7934. quasi: parser.token === 67174408
  7935. ? parseTemplate(parser, context | 65536)
  7936. : parseTemplateLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos)
  7937. }), 0, start, line, column);
  7938. }
  7939. }
  7940. return expr;
  7941. }
  7942. function parseNewExpression(parser, context, inGroup, start, line, column) {
  7943. const id = parseIdentifier(parser, context | 32768, 0);
  7944. const { tokenPos, linePos, colPos } = parser;
  7945. if (consumeOpt(parser, context, 67108877)) {
  7946. if (context & 67108864 && parser.token === 143494) {
  7947. parser.assignable = 2;
  7948. return parseMetaProperty(parser, context, id, start, line, column);
  7949. }
  7950. report(parser, 91);
  7951. }
  7952. parser.assignable = 2;
  7953. if ((parser.token & 16842752) === 16842752) {
  7954. report(parser, 62, KeywordDescTable[parser.token & 255]);
  7955. }
  7956. const expr = parsePrimaryExpression(parser, context, 2, 1, 0, 0, inGroup, 1, tokenPos, linePos, colPos);
  7957. context = (context | 134217728) ^ 134217728;
  7958. if (parser.token === 67108991)
  7959. report(parser, 162);
  7960. const callee = parseMembeExpressionNoCall(parser, context, expr, inGroup, tokenPos, linePos, colPos);
  7961. parser.assignable = 2;
  7962. return finishNode(parser, context, start, line, column, {
  7963. type: 'NewExpression',
  7964. callee,
  7965. arguments: parser.token === 67174411 ? parseArguments(parser, context, inGroup) : []
  7966. });
  7967. }
  7968. function parseMetaProperty(parser, context, meta, start, line, column) {
  7969. const property = parseIdentifier(parser, context, 0);
  7970. return finishNode(parser, context, start, line, column, {
  7971. type: 'MetaProperty',
  7972. meta,
  7973. property
  7974. });
  7975. }
  7976. function parseAsyncArrowAfterIdent(parser, context, canAssign, start, line, column) {
  7977. if (parser.token === 209008)
  7978. report(parser, 29);
  7979. if (context & (1024 | 2097152) && parser.token === 241773) {
  7980. report(parser, 30);
  7981. }
  7982. if ((parser.token & 537079808) === 537079808) {
  7983. parser.flags |= 512;
  7984. }
  7985. return parseArrowFromIdentifier(parser, context, parser.tokenValue, parseIdentifier(parser, context, 0), 0, canAssign, 1, start, line, column);
  7986. }
  7987. function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kind, origin, flags, start, line, column) {
  7988. nextToken(parser, context | 32768);
  7989. const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
  7990. context = (context | 134217728) ^ 134217728;
  7991. if (consumeOpt(parser, context, 16)) {
  7992. if (parser.token === 10) {
  7993. if (flags & 1)
  7994. report(parser, 45);
  7995. return parseParenthesizedArrow(parser, context, scope, [], canAssign, 1, start, line, column);
  7996. }
  7997. return finishNode(parser, context, start, line, column, {
  7998. type: 'CallExpression',
  7999. callee,
  8000. arguments: []
  8001. });
  8002. }
  8003. let destructible = 0;
  8004. let expr = null;
  8005. let isSimpleParameterList = 0;
  8006. parser.destructible =
  8007. (parser.destructible | 256 | 128) ^
  8008. (256 | 128);
  8009. const params = [];
  8010. while (parser.token !== 16) {
  8011. const { token, tokenPos, linePos, colPos } = parser;
  8012. if (token & (143360 | 4096)) {
  8013. if (scope)
  8014. addBlockName(parser, context, scope, parser.tokenValue, kind, 0);
  8015. expr = parsePrimaryExpression(parser, context, kind, 0, 1, 0, 1, 1, tokenPos, linePos, colPos);
  8016. if (parser.token === 16 || parser.token === 18) {
  8017. if (parser.assignable & 2) {
  8018. destructible |= 16;
  8019. isSimpleParameterList = 1;
  8020. }
  8021. else if ((token & 537079808) === 537079808) {
  8022. parser.flags |= 512;
  8023. }
  8024. else if ((token & 36864) === 36864) {
  8025. parser.flags |= 256;
  8026. }
  8027. }
  8028. else {
  8029. if (parser.token === 1077936157) {
  8030. isSimpleParameterList = 1;
  8031. }
  8032. else {
  8033. destructible |= 16;
  8034. }
  8035. expr = parseMemberOrUpdateExpression(parser, context, expr, 1, 0, tokenPos, linePos, colPos);
  8036. if (parser.token !== 16 && parser.token !== 18) {
  8037. expr = parseAssignmentExpression(parser, context, 1, 0, tokenPos, linePos, colPos, expr);
  8038. }
  8039. }
  8040. }
  8041. else if (token & 2097152) {
  8042. expr =
  8043. token === 2162700
  8044. ? parseObjectLiteralOrPattern(parser, context, scope, 0, 1, 0, kind, origin, tokenPos, linePos, colPos)
  8045. : parseArrayExpressionOrPattern(parser, context, scope, 0, 1, 0, kind, origin, tokenPos, linePos, colPos);
  8046. destructible |= parser.destructible;
  8047. isSimpleParameterList = 1;
  8048. if (parser.token !== 16 && parser.token !== 18) {
  8049. if (destructible & 8)
  8050. report(parser, 118);
  8051. expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, tokenPos, linePos, colPos);
  8052. destructible |= 16;
  8053. if ((parser.token & 8454144) === 8454144) {
  8054. expr = parseBinaryExpression(parser, context, 1, start, line, column, 4, token, expr);
  8055. }
  8056. if (consumeOpt(parser, context | 32768, 22)) {
  8057. expr = parseConditionalExpression(parser, context, expr, start, line, column);
  8058. }
  8059. }
  8060. }
  8061. else if (token === 14) {
  8062. expr = parseSpreadOrRestElement(parser, context, scope, 16, kind, origin, 1, 1, 0, tokenPos, linePos, colPos);
  8063. destructible |= (parser.token === 16 ? 0 : 16) | parser.destructible;
  8064. isSimpleParameterList = 1;
  8065. }
  8066. else {
  8067. expr = parseExpression(parser, context, 1, 0, 0, tokenPos, linePos, colPos);
  8068. destructible = parser.assignable;
  8069. params.push(expr);
  8070. while (consumeOpt(parser, context | 32768, 18)) {
  8071. params.push(parseExpression(parser, context, 1, 0, 0, tokenPos, linePos, colPos));
  8072. }
  8073. destructible |= parser.assignable;
  8074. consume(parser, context, 16);
  8075. parser.destructible = destructible | 16;
  8076. parser.assignable = 2;
  8077. return finishNode(parser, context, start, line, column, {
  8078. type: 'CallExpression',
  8079. callee,
  8080. arguments: params
  8081. });
  8082. }
  8083. params.push(expr);
  8084. if (!consumeOpt(parser, context | 32768, 18))
  8085. break;
  8086. }
  8087. consume(parser, context, 16);
  8088. destructible |=
  8089. parser.destructible & 256
  8090. ? 256
  8091. : 0 | (parser.destructible & 128)
  8092. ? 128
  8093. : 0;
  8094. if (parser.token === 10) {
  8095. if (destructible & (32 | 16))
  8096. report(parser, 25);
  8097. if (parser.flags & 1 || flags & 1)
  8098. report(parser, 45);
  8099. if (destructible & 128)
  8100. report(parser, 29);
  8101. if (context & (1024 | 2097152) && destructible & 256)
  8102. report(parser, 30);
  8103. if (isSimpleParameterList)
  8104. parser.flags |= 128;
  8105. return parseParenthesizedArrow(parser, context, scope, params, canAssign, 1, start, line, column);
  8106. }
  8107. else if (destructible & 8) {
  8108. report(parser, 59);
  8109. }
  8110. parser.assignable = 2;
  8111. return finishNode(parser, context, start, line, column, {
  8112. type: 'CallExpression',
  8113. callee,
  8114. arguments: params
  8115. });
  8116. }
  8117. function parseRegExpLiteral(parser, context, start, line, column) {
  8118. const { tokenRaw, tokenRegExp, tokenValue } = parser;
  8119. nextToken(parser, context);
  8120. parser.assignable = 2;
  8121. return context & 512
  8122. ? finishNode(parser, context, start, line, column, {
  8123. type: 'Literal',
  8124. value: tokenValue,
  8125. regex: tokenRegExp,
  8126. raw: tokenRaw
  8127. })
  8128. : finishNode(parser, context, start, line, column, {
  8129. type: 'Literal',
  8130. value: tokenValue,
  8131. regex: tokenRegExp
  8132. });
  8133. }
  8134. function parseClassDeclaration(parser, context, scope, flags, start, line, column) {
  8135. context = (context | 16777216 | 1024) ^ 16777216;
  8136. let decorators = parseDecorators(parser, context);
  8137. if (decorators.length) {
  8138. start = parser.tokenPos;
  8139. line = parser.linePos;
  8140. column = parser.colPos;
  8141. }
  8142. if (parser.leadingDecorators.length) {
  8143. parser.leadingDecorators.push(...decorators);
  8144. decorators = parser.leadingDecorators;
  8145. parser.leadingDecorators = [];
  8146. }
  8147. nextToken(parser, context);
  8148. let id = null;
  8149. let superClass = null;
  8150. const { tokenValue } = parser;
  8151. if (parser.token & 4096 && parser.token !== 20567) {
  8152. if (isStrictReservedWord(parser, context, parser.token)) {
  8153. report(parser, 114);
  8154. }
  8155. if ((parser.token & 537079808) === 537079808) {
  8156. report(parser, 115);
  8157. }
  8158. if (scope) {
  8159. addBlockName(parser, context, scope, tokenValue, 32, 0);
  8160. if (flags) {
  8161. if (flags & 2) {
  8162. declareUnboundVariable(parser, tokenValue);
  8163. }
  8164. }
  8165. }
  8166. id = parseIdentifier(parser, context, 0);
  8167. }
  8168. else {
  8169. if ((flags & 1) < 1)
  8170. report(parser, 37, 'Class');
  8171. }
  8172. let inheritedContext = context;
  8173. if (consumeOpt(parser, context | 32768, 20567)) {
  8174. superClass = parseLeftHandSideExpression(parser, context, 0, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  8175. inheritedContext |= 524288;
  8176. }
  8177. else {
  8178. inheritedContext = (inheritedContext | 524288) ^ 524288;
  8179. }
  8180. const body = parseClassBody(parser, inheritedContext, context, scope, 2, 8, 0);
  8181. return finishNode(parser, context, start, line, column, context & 1
  8182. ? {
  8183. type: 'ClassDeclaration',
  8184. id,
  8185. superClass,
  8186. decorators,
  8187. body
  8188. }
  8189. : {
  8190. type: 'ClassDeclaration',
  8191. id,
  8192. superClass,
  8193. body
  8194. });
  8195. }
  8196. function parseClassExpression(parser, context, inGroup, start, line, column) {
  8197. let id = null;
  8198. let superClass = null;
  8199. context = (context | 1024 | 16777216) ^ 16777216;
  8200. const decorators = parseDecorators(parser, context);
  8201. if (decorators.length) {
  8202. start = parser.tokenPos;
  8203. line = parser.linePos;
  8204. column = parser.colPos;
  8205. }
  8206. nextToken(parser, context);
  8207. if (parser.token & 4096 && parser.token !== 20567) {
  8208. if (isStrictReservedWord(parser, context, parser.token))
  8209. report(parser, 114);
  8210. if ((parser.token & 537079808) === 537079808) {
  8211. report(parser, 115);
  8212. }
  8213. id = parseIdentifier(parser, context, 0);
  8214. }
  8215. let inheritedContext = context;
  8216. if (consumeOpt(parser, context | 32768, 20567)) {
  8217. superClass = parseLeftHandSideExpression(parser, context, 0, inGroup, 0, parser.tokenPos, parser.linePos, parser.colPos);
  8218. inheritedContext |= 524288;
  8219. }
  8220. else {
  8221. inheritedContext = (inheritedContext | 524288) ^ 524288;
  8222. }
  8223. const body = parseClassBody(parser, inheritedContext, context, void 0, 2, 0, inGroup);
  8224. parser.assignable = 2;
  8225. return finishNode(parser, context, start, line, column, context & 1
  8226. ? {
  8227. type: 'ClassExpression',
  8228. id,
  8229. superClass,
  8230. decorators,
  8231. body
  8232. }
  8233. : {
  8234. type: 'ClassExpression',
  8235. id,
  8236. superClass,
  8237. body
  8238. });
  8239. }
  8240. function parseDecorators(parser, context) {
  8241. const list = [];
  8242. if (context & 1) {
  8243. while (parser.token === 133) {
  8244. list.push(parseDecoratorList(parser, context, parser.tokenPos, parser.linePos, parser.colPos));
  8245. }
  8246. }
  8247. return list;
  8248. }
  8249. function parseDecoratorList(parser, context, start, line, column) {
  8250. nextToken(parser, context | 32768);
  8251. let expression = parsePrimaryExpression(parser, context, 2, 0, 1, 0, 0, 1, start, line, column);
  8252. expression = parseMemberOrUpdateExpression(parser, context, expression, 0, 0, start, line, column);
  8253. return finishNode(parser, context, start, line, column, {
  8254. type: 'Decorator',
  8255. expression
  8256. });
  8257. }
  8258. function parseClassBody(parser, context, inheritedContext, scope, kind, origin, inGroup) {
  8259. const { tokenPos, linePos, colPos } = parser;
  8260. consume(parser, context | 32768, 2162700);
  8261. context = (context | 134217728) ^ 134217728;
  8262. parser.flags = (parser.flags | 32) ^ 32;
  8263. const body = [];
  8264. let decorators;
  8265. while (parser.token !== 1074790415) {
  8266. let length = 0;
  8267. decorators = parseDecorators(parser, context);
  8268. length = decorators.length;
  8269. if (length > 0 && parser.tokenValue === 'constructor') {
  8270. report(parser, 106);
  8271. }
  8272. if (parser.token === 1074790415)
  8273. report(parser, 105);
  8274. if (consumeOpt(parser, context, 1074790417)) {
  8275. if (length > 0)
  8276. report(parser, 116);
  8277. continue;
  8278. }
  8279. body.push(parseClassElementList(parser, context, scope, inheritedContext, kind, decorators, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
  8280. }
  8281. consume(parser, origin & 8 ? context | 32768 : context, 1074790415);
  8282. return finishNode(parser, context, tokenPos, linePos, colPos, {
  8283. type: 'ClassBody',
  8284. body
  8285. });
  8286. }
  8287. function parseClassElementList(parser, context, scope, inheritedContext, type, decorators, isStatic, inGroup, start, line, column) {
  8288. let kind = isStatic ? 32 : 0;
  8289. let key = null;
  8290. const { token, tokenPos, linePos, colPos } = parser;
  8291. if (token & (143360 | 36864)) {
  8292. key = parseIdentifier(parser, context, 0);
  8293. switch (token) {
  8294. case 36972:
  8295. if (!isStatic && parser.token !== 67174411) {
  8296. return parseClassElementList(parser, context, scope, inheritedContext, type, decorators, 1, inGroup, start, line, column);
  8297. }
  8298. break;
  8299. case 209007:
  8300. if (parser.token !== 67174411 && (parser.flags & 1) < 1) {
  8301. if (context & 1 && (parser.token & 1073741824) === 1073741824) {
  8302. return parsePropertyDefinition(parser, context, key, kind, decorators, tokenPos, linePos, colPos);
  8303. }
  8304. kind |= 16 | (optionalBit(parser, context, 8457014) ? 8 : 0);
  8305. }
  8306. break;
  8307. case 12402:
  8308. if (parser.token !== 67174411) {
  8309. if (context & 1 && (parser.token & 1073741824) === 1073741824) {
  8310. return parsePropertyDefinition(parser, context, key, kind, decorators, tokenPos, linePos, colPos);
  8311. }
  8312. kind |= 256;
  8313. }
  8314. break;
  8315. case 12403:
  8316. if (parser.token !== 67174411) {
  8317. if (context & 1 && (parser.token & 1073741824) === 1073741824) {
  8318. return parsePropertyDefinition(parser, context, key, kind, decorators, tokenPos, linePos, colPos);
  8319. }
  8320. kind |= 512;
  8321. }
  8322. break;
  8323. }
  8324. }
  8325. else if (token === 69271571) {
  8326. kind |= 2;
  8327. key = parseComputedPropertyName(parser, inheritedContext, inGroup);
  8328. }
  8329. else if ((token & 134217728) === 134217728) {
  8330. key = parseLiteral(parser, context);
  8331. }
  8332. else if (token === 8457014) {
  8333. kind |= 8;
  8334. nextToken(parser, context);
  8335. }
  8336. else if (context & 1 && parser.token === 131) {
  8337. kind |= 4096;
  8338. key = parsePrivateIdentifier(parser, context, tokenPos, linePos, colPos);
  8339. context = context | 16384;
  8340. }
  8341. else if (context & 1 && (parser.token & 1073741824) === 1073741824) {
  8342. kind |= 128;
  8343. context = context | 16384;
  8344. }
  8345. else if (token === 122) {
  8346. key = parseIdentifier(parser, context, 0);
  8347. if (parser.token !== 67174411)
  8348. report(parser, 28, KeywordDescTable[parser.token & 255]);
  8349. }
  8350. else {
  8351. report(parser, 28, KeywordDescTable[parser.token & 255]);
  8352. }
  8353. if (kind & (8 | 16 | 768)) {
  8354. if (parser.token & 143360) {
  8355. key = parseIdentifier(parser, context, 0);
  8356. }
  8357. else if ((parser.token & 134217728) === 134217728) {
  8358. key = parseLiteral(parser, context);
  8359. }
  8360. else if (parser.token === 69271571) {
  8361. kind |= 2;
  8362. key = parseComputedPropertyName(parser, context, 0);
  8363. }
  8364. else if (parser.token === 122) {
  8365. key = parseIdentifier(parser, context, 0);
  8366. }
  8367. else if (context & 1 && parser.token === 131) {
  8368. kind |= 4096;
  8369. key = parsePrivateIdentifier(parser, context, tokenPos, linePos, colPos);
  8370. }
  8371. else
  8372. report(parser, 131);
  8373. }
  8374. if ((kind & 2) < 1) {
  8375. if (parser.tokenValue === 'constructor') {
  8376. if ((parser.token & 1073741824) === 1073741824) {
  8377. report(parser, 125);
  8378. }
  8379. else if ((kind & 32) < 1 && parser.token === 67174411) {
  8380. if (kind & (768 | 16 | 128 | 8)) {
  8381. report(parser, 50, 'accessor');
  8382. }
  8383. else if ((context & 524288) < 1) {
  8384. if (parser.flags & 32)
  8385. report(parser, 51);
  8386. else
  8387. parser.flags |= 32;
  8388. }
  8389. }
  8390. kind |= 64;
  8391. }
  8392. else if ((kind & 4096) < 1 &&
  8393. kind & (32 | 768 | 8 | 16) &&
  8394. parser.tokenValue === 'prototype') {
  8395. report(parser, 49);
  8396. }
  8397. }
  8398. if (context & 1 && parser.token !== 67174411) {
  8399. return parsePropertyDefinition(parser, context, key, kind, decorators, tokenPos, linePos, colPos);
  8400. }
  8401. const value = parseMethodDefinition(parser, context, kind, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
  8402. return finishNode(parser, context, start, line, column, context & 1
  8403. ? {
  8404. type: 'MethodDefinition',
  8405. kind: (kind & 32) < 1 && kind & 64
  8406. ? 'constructor'
  8407. : kind & 256
  8408. ? 'get'
  8409. : kind & 512
  8410. ? 'set'
  8411. : 'method',
  8412. static: (kind & 32) > 0,
  8413. computed: (kind & 2) > 0,
  8414. key,
  8415. decorators,
  8416. value
  8417. }
  8418. : {
  8419. type: 'MethodDefinition',
  8420. kind: (kind & 32) < 1 && kind & 64
  8421. ? 'constructor'
  8422. : kind & 256
  8423. ? 'get'
  8424. : kind & 512
  8425. ? 'set'
  8426. : 'method',
  8427. static: (kind & 32) > 0,
  8428. computed: (kind & 2) > 0,
  8429. key,
  8430. value
  8431. });
  8432. }
  8433. function parsePrivateIdentifier(parser, context, start, line, column) {
  8434. nextToken(parser, context);
  8435. const { tokenValue } = parser;
  8436. if (tokenValue === 'constructor')
  8437. report(parser, 124);
  8438. nextToken(parser, context);
  8439. return finishNode(parser, context, start, line, column, {
  8440. type: 'PrivateIdentifier',
  8441. name: tokenValue
  8442. });
  8443. }
  8444. function parsePropertyDefinition(parser, context, key, state, decorators, start, line, column) {
  8445. let value = null;
  8446. if (state & 8)
  8447. report(parser, 0);
  8448. if (parser.token === 1077936157) {
  8449. nextToken(parser, context | 32768);
  8450. const { tokenPos, linePos, colPos } = parser;
  8451. if (parser.token === 537079928)
  8452. report(parser, 115);
  8453. value = parsePrimaryExpression(parser, context | 16384, 2, 0, 1, 0, 0, 1, tokenPos, linePos, colPos);
  8454. if ((parser.token & 1073741824) !== 1073741824) {
  8455. value = parseMemberOrUpdateExpression(parser, context | 16384, value, 0, 0, tokenPos, linePos, colPos);
  8456. value = parseAssignmentExpression(parser, context | 16384, 0, 0, tokenPos, linePos, colPos, value);
  8457. if (parser.token === 18) {
  8458. value = parseSequenceExpression(parser, context, 0, start, line, column, value);
  8459. }
  8460. }
  8461. }
  8462. return finishNode(parser, context, start, line, column, {
  8463. type: 'PropertyDefinition',
  8464. key,
  8465. value,
  8466. static: (state & 32) > 0,
  8467. computed: (state & 2) > 0,
  8468. decorators
  8469. });
  8470. }
  8471. function parseBindingPattern(parser, context, scope, type, origin, start, line, column) {
  8472. if (parser.token & 143360)
  8473. return parseAndClassifyIdentifier(parser, context, scope, type, origin, start, line, column);
  8474. if ((parser.token & 2097152) !== 2097152)
  8475. report(parser, 28, KeywordDescTable[parser.token & 255]);
  8476. const left = parser.token === 69271571
  8477. ? parseArrayExpressionOrPattern(parser, context, scope, 1, 0, 1, type, origin, start, line, column)
  8478. : parseObjectLiteralOrPattern(parser, context, scope, 1, 0, 1, type, origin, start, line, column);
  8479. if (parser.destructible & 16)
  8480. report(parser, 47);
  8481. if (parser.destructible & 32)
  8482. report(parser, 47);
  8483. return left;
  8484. }
  8485. function parseAndClassifyIdentifier(parser, context, scope, kind, origin, start, line, column) {
  8486. const { tokenValue, token } = parser;
  8487. if (context & 1024) {
  8488. if ((token & 537079808) === 537079808) {
  8489. report(parser, 115);
  8490. }
  8491. else if ((token & 36864) === 36864) {
  8492. report(parser, 114);
  8493. }
  8494. }
  8495. if ((token & 20480) === 20480) {
  8496. report(parser, 99);
  8497. }
  8498. if (context & (2048 | 2097152) && token === 241773) {
  8499. report(parser, 30);
  8500. }
  8501. if (token === 241739) {
  8502. if (kind & (8 | 16))
  8503. report(parser, 97);
  8504. }
  8505. if (context & (4194304 | 2048) && token === 209008) {
  8506. report(parser, 95);
  8507. }
  8508. nextToken(parser, context);
  8509. if (scope)
  8510. addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
  8511. return finishNode(parser, context, start, line, column, {
  8512. type: 'Identifier',
  8513. name: tokenValue
  8514. });
  8515. }
  8516. function parseJSXRootElementOrFragment(parser, context, inJSXChild, start, line, column) {
  8517. nextToken(parser, context);
  8518. if (parser.token === 8456259) {
  8519. return finishNode(parser, context, start, line, column, {
  8520. type: 'JSXFragment',
  8521. openingFragment: parseOpeningFragment(parser, context, start, line, column),
  8522. children: parseJSXChildren(parser, context),
  8523. closingFragment: parseJSXClosingFragment(parser, context, inJSXChild, parser.tokenPos, parser.linePos, parser.colPos)
  8524. });
  8525. }
  8526. let closingElement = null;
  8527. let children = [];
  8528. const openingElement = parseJSXOpeningFragmentOrSelfCloseElement(parser, context, inJSXChild, start, line, column);
  8529. if (!openingElement.selfClosing) {
  8530. children = parseJSXChildren(parser, context);
  8531. closingElement = parseJSXClosingElement(parser, context, inJSXChild, parser.tokenPos, parser.linePos, parser.colPos);
  8532. const close = isEqualTagName(closingElement.name);
  8533. if (isEqualTagName(openingElement.name) !== close)
  8534. report(parser, 149, close);
  8535. }
  8536. return finishNode(parser, context, start, line, column, {
  8537. type: 'JSXElement',
  8538. children,
  8539. openingElement,
  8540. closingElement
  8541. });
  8542. }
  8543. function parseOpeningFragment(parser, context, start, line, column) {
  8544. scanJSXToken(parser, context);
  8545. return finishNode(parser, context, start, line, column, {
  8546. type: 'JSXOpeningFragment'
  8547. });
  8548. }
  8549. function parseJSXClosingElement(parser, context, inJSXChild, start, line, column) {
  8550. consume(parser, context, 25);
  8551. const name = parseJSXElementName(parser, context, parser.tokenPos, parser.linePos, parser.colPos);
  8552. if (inJSXChild) {
  8553. consume(parser, context, 8456259);
  8554. }
  8555. else {
  8556. parser.token = scanJSXToken(parser, context);
  8557. }
  8558. return finishNode(parser, context, start, line, column, {
  8559. type: 'JSXClosingElement',
  8560. name
  8561. });
  8562. }
  8563. function parseJSXClosingFragment(parser, context, inJSXChild, start, line, column) {
  8564. consume(parser, context, 25);
  8565. if (inJSXChild) {
  8566. consume(parser, context, 8456259);
  8567. }
  8568. else {
  8569. consume(parser, context, 8456259);
  8570. }
  8571. return finishNode(parser, context, start, line, column, {
  8572. type: 'JSXClosingFragment'
  8573. });
  8574. }
  8575. function parseJSXChildren(parser, context) {
  8576. const children = [];
  8577. while (parser.token !== 25) {
  8578. parser.index = parser.tokenPos = parser.startPos;
  8579. parser.column = parser.colPos = parser.startColumn;
  8580. parser.line = parser.linePos = parser.startLine;
  8581. scanJSXToken(parser, context);
  8582. children.push(parseJSXChild(parser, context, parser.tokenPos, parser.linePos, parser.colPos));
  8583. }
  8584. return children;
  8585. }
  8586. function parseJSXChild(parser, context, start, line, column) {
  8587. if (parser.token === 138)
  8588. return parseJSXText(parser, context, start, line, column);
  8589. if (parser.token === 2162700)
  8590. return parseJSXExpressionContainer(parser, context, 0, 0, start, line, column);
  8591. if (parser.token === 8456258)
  8592. return parseJSXRootElementOrFragment(parser, context, 0, start, line, column);
  8593. report(parser, 0);
  8594. }
  8595. function parseJSXText(parser, context, start, line, column) {
  8596. scanJSXToken(parser, context);
  8597. const node = {
  8598. type: 'JSXText',
  8599. value: parser.tokenValue
  8600. };
  8601. if (context & 512) {
  8602. node.raw = parser.tokenRaw;
  8603. }
  8604. return finishNode(parser, context, start, line, column, node);
  8605. }
  8606. function parseJSXOpeningFragmentOrSelfCloseElement(parser, context, inJSXChild, start, line, column) {
  8607. if ((parser.token & 143360) !== 143360 && (parser.token & 4096) !== 4096)
  8608. report(parser, 0);
  8609. const tagName = parseJSXElementName(parser, context, parser.tokenPos, parser.linePos, parser.colPos);
  8610. const attributes = parseJSXAttributes(parser, context);
  8611. const selfClosing = parser.token === 8457016;
  8612. if (parser.token === 8456259) {
  8613. scanJSXToken(parser, context);
  8614. }
  8615. else {
  8616. consume(parser, context, 8457016);
  8617. if (inJSXChild) {
  8618. consume(parser, context, 8456259);
  8619. }
  8620. else {
  8621. scanJSXToken(parser, context);
  8622. }
  8623. }
  8624. return finishNode(parser, context, start, line, column, {
  8625. type: 'JSXOpeningElement',
  8626. name: tagName,
  8627. attributes,
  8628. selfClosing
  8629. });
  8630. }
  8631. function parseJSXElementName(parser, context, start, line, column) {
  8632. scanJSXIdentifier(parser);
  8633. let key = parseJSXIdentifier(parser, context, start, line, column);
  8634. if (parser.token === 21)
  8635. return parseJSXNamespacedName(parser, context, key, start, line, column);
  8636. while (consumeOpt(parser, context, 67108877)) {
  8637. scanJSXIdentifier(parser);
  8638. key = parseJSXMemberExpression(parser, context, key, start, line, column);
  8639. }
  8640. return key;
  8641. }
  8642. function parseJSXMemberExpression(parser, context, object, start, line, column) {
  8643. const property = parseJSXIdentifier(parser, context, parser.tokenPos, parser.linePos, parser.colPos);
  8644. return finishNode(parser, context, start, line, column, {
  8645. type: 'JSXMemberExpression',
  8646. object,
  8647. property
  8648. });
  8649. }
  8650. function parseJSXAttributes(parser, context) {
  8651. const attributes = [];
  8652. while (parser.token !== 8457016 && parser.token !== 8456259 && parser.token !== 1048576) {
  8653. attributes.push(parseJsxAttribute(parser, context, parser.tokenPos, parser.linePos, parser.colPos));
  8654. }
  8655. return attributes;
  8656. }
  8657. function parseJSXSpreadAttribute(parser, context, start, line, column) {
  8658. nextToken(parser, context);
  8659. consume(parser, context, 14);
  8660. const expression = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  8661. consume(parser, context, 1074790415);
  8662. return finishNode(parser, context, start, line, column, {
  8663. type: 'JSXSpreadAttribute',
  8664. argument: expression
  8665. });
  8666. }
  8667. function parseJsxAttribute(parser, context, start, line, column) {
  8668. if (parser.token === 2162700)
  8669. return parseJSXSpreadAttribute(parser, context, start, line, column);
  8670. scanJSXIdentifier(parser);
  8671. let value = null;
  8672. let name = parseJSXIdentifier(parser, context, start, line, column);
  8673. if (parser.token === 21) {
  8674. name = parseJSXNamespacedName(parser, context, name, start, line, column);
  8675. }
  8676. if (parser.token === 1077936157) {
  8677. const token = scanJSXAttributeValue(parser, context);
  8678. const { tokenPos, linePos, colPos } = parser;
  8679. switch (token) {
  8680. case 134283267:
  8681. value = parseLiteral(parser, context);
  8682. break;
  8683. case 8456258:
  8684. value = parseJSXRootElementOrFragment(parser, context, 1, tokenPos, linePos, colPos);
  8685. break;
  8686. case 2162700:
  8687. value = parseJSXExpressionContainer(parser, context, 1, 1, tokenPos, linePos, colPos);
  8688. break;
  8689. default:
  8690. report(parser, 148);
  8691. }
  8692. }
  8693. return finishNode(parser, context, start, line, column, {
  8694. type: 'JSXAttribute',
  8695. value,
  8696. name
  8697. });
  8698. }
  8699. function parseJSXNamespacedName(parser, context, namespace, start, line, column) {
  8700. consume(parser, context, 21);
  8701. const name = parseJSXIdentifier(parser, context, parser.tokenPos, parser.linePos, parser.colPos);
  8702. return finishNode(parser, context, start, line, column, {
  8703. type: 'JSXNamespacedName',
  8704. namespace,
  8705. name
  8706. });
  8707. }
  8708. function parseJSXExpressionContainer(parser, context, inJSXChild, isAttr, start, line, column) {
  8709. nextToken(parser, context);
  8710. const { tokenPos, linePos, colPos } = parser;
  8711. if (parser.token === 14)
  8712. return parseJSXSpreadChild(parser, context, tokenPos, linePos, colPos);
  8713. let expression = null;
  8714. if (parser.token === 1074790415) {
  8715. if (isAttr)
  8716. report(parser, 151);
  8717. expression = parseJSXEmptyExpression(parser, context, parser.startPos, parser.startLine, parser.startColumn);
  8718. }
  8719. else {
  8720. expression = parseExpression(parser, context, 1, 0, 0, tokenPos, linePos, colPos);
  8721. }
  8722. if (inJSXChild) {
  8723. consume(parser, context, 1074790415);
  8724. }
  8725. else {
  8726. scanJSXToken(parser, context);
  8727. }
  8728. return finishNode(parser, context, start, line, column, {
  8729. type: 'JSXExpressionContainer',
  8730. expression
  8731. });
  8732. }
  8733. function parseJSXSpreadChild(parser, context, start, line, column) {
  8734. consume(parser, context, 14);
  8735. const expression = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
  8736. consume(parser, context, 1074790415);
  8737. return finishNode(parser, context, start, line, column, {
  8738. type: 'JSXSpreadChild',
  8739. expression
  8740. });
  8741. }
  8742. function parseJSXEmptyExpression(parser, context, start, line, column) {
  8743. parser.startPos = parser.tokenPos;
  8744. parser.startLine = parser.linePos;
  8745. parser.startColumn = parser.colPos;
  8746. return finishNode(parser, context, start, line, column, {
  8747. type: 'JSXEmptyExpression'
  8748. });
  8749. }
  8750. function parseJSXIdentifier(parser, context, start, line, column) {
  8751. const { tokenValue } = parser;
  8752. nextToken(parser, context);
  8753. return finishNode(parser, context, start, line, column, {
  8754. type: 'JSXIdentifier',
  8755. name: tokenValue
  8756. });
  8757. }
  8758. var estree = /*#__PURE__*/Object.freeze({
  8759. __proto__: null
  8760. });
  8761. exports('ESTree', estree);
  8762. var version$1 = "4.1.5";
  8763. const version = exports('version', version$1);
  8764. function parseScript(source, options) {
  8765. return parseSource(source, options, 0);
  8766. }
  8767. function parseModule(source, options) {
  8768. return parseSource(source, options, 1024 | 2048);
  8769. }
  8770. function parse(source, options) {
  8771. return parseSource(source, options, 0);
  8772. }
  8773. }
  8774. };
  8775. });