meriyah.cjs.js 320 KB

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