meriyah.esm.js 320 KB

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