meriyah.umd.js 337 KB

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