meriyah.amd.js 337 KB

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