UI for Zipcoin Blue

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519
  1. /*
  2. Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
  3. Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
  4. Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
  5. Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
  6. Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
  7. Copyright (C) 2011 Yusuke Suzuki <utatane.tea@gmail.com>
  8. Copyright (C) 2011 Arpad Borsos <arpad.borsos@googlemail.com>
  9. Redistribution and use in source and binary forms, with or without
  10. modification, are permitted provided that the following conditions are met:
  11. * Redistributions of source code must retain the above copyright
  12. notice, this list of conditions and the following disclaimer.
  13. * Redistributions in binary form must reproduce the above copyright
  14. notice, this list of conditions and the following disclaimer in the
  15. documentation and/or other materials provided with the distribution.
  16. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  17. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  18. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  19. ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  20. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  25. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. var testFixture;
  28. var harmonyTestFixture = {
  29. 'ES6 Unicode Code Point Escape Sequence': {
  30. '"\\u{714E}\\u{8336}"': {
  31. type: 'ExpressionStatement',
  32. expression: {
  33. type: 'Literal',
  34. value: '煎茶',
  35. raw: '"\\u{714E}\\u{8336}"',
  36. range: [0, 18],
  37. loc: {
  38. start: { line: 1, column: 0 },
  39. end: { line: 1, column: 18 }
  40. }
  41. },
  42. range: [0, 18],
  43. loc: {
  44. start: { line: 1, column: 0 },
  45. end: { line: 1, column: 18 }
  46. }
  47. },
  48. '"\\u{20BB7}\\u{91CE}\\u{5BB6}"': {
  49. type: 'ExpressionStatement',
  50. expression: {
  51. type: 'Literal',
  52. value: '\ud842\udfb7\u91ce\u5bb6',
  53. raw: '"\\u{20BB7}\\u{91CE}\\u{5BB6}"',
  54. range: [0, 27],
  55. loc: {
  56. start: { line: 1, column: 0 },
  57. end: { line: 1, column: 27 }
  58. }
  59. },
  60. range: [0, 27],
  61. loc: {
  62. start: { line: 1, column: 0 },
  63. end: { line: 1, column: 27 }
  64. }
  65. }
  66. },
  67. // ECMAScript 6th Syntax, 7.8.3 Numeric Literals
  68. 'ES6: Numeric Literal': {
  69. '00': {
  70. type: 'ExpressionStatement',
  71. expression: {
  72. type: 'Literal',
  73. value: 0,
  74. raw: '00',
  75. range: [0, 2],
  76. loc: {
  77. start: { line: 1, column: 0 },
  78. end: { line: 1, column: 2 }
  79. }
  80. },
  81. range: [0, 2],
  82. loc: {
  83. start: { line: 1, column: 0 },
  84. end: { line: 1, column: 2 }
  85. }
  86. },
  87. '0o0': {
  88. type: 'ExpressionStatement',
  89. expression: {
  90. type: 'Literal',
  91. value: 0,
  92. raw: '0o0',
  93. range: [0, 3],
  94. loc: {
  95. start: { line: 1, column: 0 },
  96. end: { line: 1, column: 3 }
  97. }
  98. },
  99. range: [0, 3],
  100. loc: {
  101. start: { line: 1, column: 0 },
  102. end: { line: 1, column: 3 }
  103. }
  104. },
  105. 'function test() {\'use strict\'; 0o0; }': {
  106. type: 'FunctionDeclaration',
  107. id: {
  108. type: 'Identifier',
  109. name: 'test',
  110. range: [9, 13],
  111. loc: {
  112. start: { line: 1, column: 9 },
  113. end: { line: 1, column: 13 }
  114. }
  115. },
  116. params: [],
  117. defaults: [],
  118. body: {
  119. type: 'BlockStatement',
  120. body: [{
  121. type: 'ExpressionStatement',
  122. expression: {
  123. type: 'Literal',
  124. value: 'use strict',
  125. raw: '\'use strict\'',
  126. range: [17, 29],
  127. loc: {
  128. start: { line: 1, column: 17 },
  129. end: { line: 1, column: 29 }
  130. }
  131. },
  132. range: [17, 30],
  133. loc: {
  134. start: { line: 1, column: 17 },
  135. end: { line: 1, column: 30 }
  136. }
  137. }, {
  138. type: 'ExpressionStatement',
  139. expression: {
  140. type: 'Literal',
  141. value: 0,
  142. raw: '0o0',
  143. range: [31, 34],
  144. loc: {
  145. start: { line: 1, column: 31 },
  146. end: { line: 1, column: 34 }
  147. }
  148. },
  149. range: [31, 35],
  150. loc: {
  151. start: { line: 1, column: 31 },
  152. end: { line: 1, column: 35 }
  153. }
  154. }],
  155. range: [16, 37],
  156. loc: {
  157. start: { line: 1, column: 16 },
  158. end: { line: 1, column: 37 }
  159. }
  160. },
  161. rest: null,
  162. generator: false,
  163. expression: false,
  164. range: [0, 37],
  165. loc: {
  166. start: { line: 1, column: 0 },
  167. end: { line: 1, column: 37 }
  168. }
  169. },
  170. '0o2': {
  171. type: 'ExpressionStatement',
  172. expression: {
  173. type: 'Literal',
  174. value: 2,
  175. raw: '0o2',
  176. range: [0, 3],
  177. loc: {
  178. start: { line: 1, column: 0 },
  179. end: { line: 1, column: 3 }
  180. }
  181. },
  182. range: [0, 3],
  183. loc: {
  184. start: { line: 1, column: 0 },
  185. end: { line: 1, column: 3 }
  186. }
  187. },
  188. '0o12': {
  189. type: 'ExpressionStatement',
  190. expression: {
  191. type: 'Literal',
  192. value: 10,
  193. raw: '0o12',
  194. range: [0, 4],
  195. loc: {
  196. start: { line: 1, column: 0 },
  197. end: { line: 1, column: 4 }
  198. }
  199. },
  200. range: [0, 4],
  201. loc: {
  202. start: { line: 1, column: 0 },
  203. end: { line: 1, column: 4 }
  204. }
  205. },
  206. '0O0': {
  207. type: 'ExpressionStatement',
  208. expression: {
  209. type: 'Literal',
  210. value: 0,
  211. raw: '0O0',
  212. range: [0, 3],
  213. loc: {
  214. start: { line: 1, column: 0 },
  215. end: { line: 1, column: 3 }
  216. }
  217. },
  218. range: [0, 3],
  219. loc: {
  220. start: { line: 1, column: 0 },
  221. end: { line: 1, column: 3 }
  222. }
  223. },
  224. 'function test() {\'use strict\'; 0O0; }': {
  225. type: 'FunctionDeclaration',
  226. id: {
  227. type: 'Identifier',
  228. name: 'test',
  229. range: [9, 13],
  230. loc: {
  231. start: { line: 1, column: 9 },
  232. end: { line: 1, column: 13 }
  233. }
  234. },
  235. params: [],
  236. defaults: [],
  237. body: {
  238. type: 'BlockStatement',
  239. body: [{
  240. type: 'ExpressionStatement',
  241. expression: {
  242. type: 'Literal',
  243. value: 'use strict',
  244. raw: '\'use strict\'',
  245. range: [17, 29],
  246. loc: {
  247. start: { line: 1, column: 17 },
  248. end: { line: 1, column: 29 }
  249. }
  250. },
  251. range: [17, 30],
  252. loc: {
  253. start: { line: 1, column: 17 },
  254. end: { line: 1, column: 30 }
  255. }
  256. }, {
  257. type: 'ExpressionStatement',
  258. expression: {
  259. type: 'Literal',
  260. value: 0,
  261. raw: '0O0',
  262. range: [31, 34],
  263. loc: {
  264. start: { line: 1, column: 31 },
  265. end: { line: 1, column: 34 }
  266. }
  267. },
  268. range: [31, 35],
  269. loc: {
  270. start: { line: 1, column: 31 },
  271. end: { line: 1, column: 35 }
  272. }
  273. }],
  274. range: [16, 37],
  275. loc: {
  276. start: { line: 1, column: 16 },
  277. end: { line: 1, column: 37 }
  278. }
  279. },
  280. rest: null,
  281. generator: false,
  282. expression: false,
  283. range: [0, 37],
  284. loc: {
  285. start: { line: 1, column: 0 },
  286. end: { line: 1, column: 37 }
  287. }
  288. },
  289. '0O2': {
  290. type: 'ExpressionStatement',
  291. expression: {
  292. type: 'Literal',
  293. value: 2,
  294. raw: '0O2',
  295. range: [0, 3],
  296. loc: {
  297. start: { line: 1, column: 0 },
  298. end: { line: 1, column: 3 }
  299. }
  300. },
  301. range: [0, 3],
  302. loc: {
  303. start: { line: 1, column: 0 },
  304. end: { line: 1, column: 3 }
  305. }
  306. },
  307. '0O12': {
  308. type: 'ExpressionStatement',
  309. expression: {
  310. type: 'Literal',
  311. value: 10,
  312. raw: '0O12',
  313. range: [0, 4],
  314. loc: {
  315. start: { line: 1, column: 0 },
  316. end: { line: 1, column: 4 }
  317. }
  318. },
  319. range: [0, 4],
  320. loc: {
  321. start: { line: 1, column: 0 },
  322. end: { line: 1, column: 4 }
  323. }
  324. },
  325. '0b0': {
  326. type: 'ExpressionStatement',
  327. expression: {
  328. type: 'Literal',
  329. value: 0,
  330. raw: '0b0',
  331. range: [0, 3],
  332. loc: {
  333. start: { line: 1, column: 0 },
  334. end: { line: 1, column: 3 }
  335. }
  336. },
  337. range: [0, 3],
  338. loc: {
  339. start: { line: 1, column: 0 },
  340. end: { line: 1, column: 3 }
  341. }
  342. },
  343. '0b1': {
  344. type: 'ExpressionStatement',
  345. expression: {
  346. type: 'Literal',
  347. value: 1,
  348. raw: '0b1',
  349. range: [0, 3],
  350. loc: {
  351. start: { line: 1, column: 0 },
  352. end: { line: 1, column: 3 }
  353. }
  354. },
  355. range: [0, 3],
  356. loc: {
  357. start: { line: 1, column: 0 },
  358. end: { line: 1, column: 3 }
  359. }
  360. },
  361. '0b10': {
  362. type: 'ExpressionStatement',
  363. expression: {
  364. type: 'Literal',
  365. value: 2,
  366. raw: '0b10',
  367. range: [0, 4],
  368. loc: {
  369. start: { line: 1, column: 0 },
  370. end: { line: 1, column: 4 }
  371. }
  372. },
  373. range: [0, 4],
  374. loc: {
  375. start: { line: 1, column: 0 },
  376. end: { line: 1, column: 4 }
  377. }
  378. },
  379. '0B0': {
  380. type: 'ExpressionStatement',
  381. expression: {
  382. type: 'Literal',
  383. value: 0,
  384. raw: '0B0',
  385. range: [0, 3],
  386. loc: {
  387. start: { line: 1, column: 0 },
  388. end: { line: 1, column: 3 }
  389. }
  390. },
  391. range: [0, 3],
  392. loc: {
  393. start: { line: 1, column: 0 },
  394. end: { line: 1, column: 3 }
  395. }
  396. },
  397. '0B1': {
  398. type: 'ExpressionStatement',
  399. expression: {
  400. type: 'Literal',
  401. value: 1,
  402. raw: '0B1',
  403. range: [0, 3],
  404. loc: {
  405. start: { line: 1, column: 0 },
  406. end: { line: 1, column: 3 }
  407. }
  408. },
  409. range: [0, 3],
  410. loc: {
  411. start: { line: 1, column: 0 },
  412. end: { line: 1, column: 3 }
  413. }
  414. },
  415. '0B10': {
  416. type: 'ExpressionStatement',
  417. expression: {
  418. type: 'Literal',
  419. value: 2,
  420. raw: '0B10',
  421. range: [0, 4],
  422. loc: {
  423. start: { line: 1, column: 0 },
  424. end: { line: 1, column: 4 }
  425. }
  426. },
  427. range: [0, 4],
  428. loc: {
  429. start: { line: 1, column: 0 },
  430. end: { line: 1, column: 4 }
  431. }
  432. }
  433. },
  434. // ECMAScript 6th Syntax, 11.1. 9 Template Literals
  435. 'ES6 Template Strings': {
  436. '`42`': {
  437. type: 'ExpressionStatement',
  438. expression: {
  439. type: 'TemplateLiteral',
  440. quasis: [{
  441. type: 'TemplateElement',
  442. value: {
  443. raw: '42',
  444. cooked: '42'
  445. },
  446. tail: true,
  447. range: [0, 4],
  448. loc: {
  449. start: { line: 1, column: 0 },
  450. end: { line: 1, column: 4 }
  451. }
  452. }],
  453. expressions: [],
  454. range: [0, 4],
  455. loc: {
  456. start: { line: 1, column: 0 },
  457. end: { line: 1, column: 4 }
  458. }
  459. },
  460. range: [0, 4],
  461. loc: {
  462. start: { line: 1, column: 0 },
  463. end: { line: 1, column: 4 }
  464. }
  465. },
  466. 'raw`42`': {
  467. type: 'ExpressionStatement',
  468. expression: {
  469. type: 'TaggedTemplateExpression',
  470. tag: {
  471. type: 'Identifier',
  472. name: 'raw',
  473. range: [0, 3],
  474. loc: {
  475. start: { line: 1, column: 0 },
  476. end: { line: 1, column: 3 }
  477. }
  478. },
  479. quasi: {
  480. type: 'TemplateLiteral',
  481. quasis: [{
  482. type: 'TemplateElement',
  483. value: {
  484. raw: '42',
  485. cooked: '42'
  486. },
  487. tail: true,
  488. range: [3, 7],
  489. loc: {
  490. start: { line: 1, column: 3 },
  491. end: { line: 1, column: 7 }
  492. }
  493. }],
  494. expressions: [],
  495. range: [3, 7],
  496. loc: {
  497. start: { line: 1, column: 3 },
  498. end: { line: 1, column: 7 }
  499. }
  500. },
  501. range: [0, 7],
  502. loc: {
  503. start: { line: 1, column: 0 },
  504. end: { line: 1, column: 7 }
  505. }
  506. },
  507. range: [0, 7],
  508. loc: {
  509. start: { line: 1, column: 0 },
  510. end: { line: 1, column: 7 }
  511. }
  512. },
  513. 'raw`hello ${name}`': {
  514. type: 'ExpressionStatement',
  515. expression: {
  516. type: 'TaggedTemplateExpression',
  517. tag: {
  518. type: 'Identifier',
  519. name: 'raw',
  520. range: [0, 3],
  521. loc: {
  522. start: { line: 1, column: 0 },
  523. end: { line: 1, column: 3 }
  524. }
  525. },
  526. quasi: {
  527. type: 'TemplateLiteral',
  528. quasis: [{
  529. type: 'TemplateElement',
  530. value: {
  531. raw: 'hello ',
  532. cooked: 'hello '
  533. },
  534. tail: false,
  535. range: [3, 12],
  536. loc: {
  537. start: { line: 1, column: 3 },
  538. end: { line: 1, column: 12 }
  539. }
  540. }, {
  541. type: 'TemplateElement',
  542. value: {
  543. raw: '',
  544. cooked: ''
  545. },
  546. tail: true,
  547. range: [16, 18],
  548. loc: {
  549. start: { line: 1, column: 16 },
  550. end: { line: 1, column: 18 }
  551. }
  552. }],
  553. expressions: [{
  554. type: 'Identifier',
  555. name: 'name',
  556. range: [12, 16],
  557. loc: {
  558. start: { line: 1, column: 12 },
  559. end: { line: 1, column: 16 }
  560. }
  561. }],
  562. range: [3, 18],
  563. loc: {
  564. start: { line: 1, column: 3 },
  565. end: { line: 1, column: 18 }
  566. }
  567. },
  568. range: [0, 18],
  569. loc: {
  570. start: { line: 1, column: 0 },
  571. end: { line: 1, column: 18 }
  572. }
  573. },
  574. range: [0, 18],
  575. loc: {
  576. start: { line: 1, column: 0 },
  577. end: { line: 1, column: 18 }
  578. }
  579. },
  580. '`$`': {
  581. type: 'ExpressionStatement',
  582. expression: {
  583. type: 'TemplateLiteral',
  584. quasis: [{
  585. type: 'TemplateElement',
  586. value: {
  587. raw: '$',
  588. cooked: '$'
  589. },
  590. tail: true,
  591. range: [0, 3],
  592. loc: {
  593. start: { line: 1, column: 0 },
  594. end: { line: 1, column: 3 }
  595. }
  596. }],
  597. expressions: [],
  598. range: [0, 3],
  599. loc: {
  600. start: { line: 1, column: 0 },
  601. end: { line: 1, column: 3 }
  602. }
  603. },
  604. range: [0, 3],
  605. loc: {
  606. start: { line: 1, column: 0 },
  607. end: { line: 1, column: 3 }
  608. }
  609. },
  610. '`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`': {
  611. type: 'ExpressionStatement',
  612. expression: {
  613. type: 'TemplateLiteral',
  614. quasis: [{
  615. type: 'TemplateElement',
  616. value: {
  617. raw: '\\n\\r\\b\\v\\t\\f\\\n\\\r\n',
  618. cooked: '\n\r\b\v\t\f'
  619. },
  620. tail: true,
  621. range: [0, 19],
  622. loc: {
  623. start: { line: 1, column: 0 },
  624. end: { line: 3, column: 19 }
  625. }
  626. }],
  627. expressions: [],
  628. range: [0, 19],
  629. loc: {
  630. start: { line: 1, column: 0 },
  631. end: { line: 3, column: 19 }
  632. }
  633. },
  634. range: [0, 19],
  635. loc: {
  636. start: { line: 1, column: 0 },
  637. end: { line: 3, column: 19 }
  638. }
  639. },
  640. '`\n\r\n`': {
  641. type: 'ExpressionStatement',
  642. expression: {
  643. type: 'TemplateLiteral',
  644. quasis: [{
  645. type: 'TemplateElement',
  646. value: {
  647. raw: '\n\r\n',
  648. cooked: '\n\n'
  649. },
  650. tail: true,
  651. range: [0, 5],
  652. loc: {
  653. start: { line: 1, column: 0 },
  654. end: { line: 3, column: 5 }
  655. }
  656. }],
  657. expressions: [],
  658. range: [0, 5],
  659. loc: {
  660. start: { line: 1, column: 0 },
  661. end: { line: 3, column: 5 }
  662. }
  663. },
  664. range: [0, 5],
  665. loc: {
  666. start: { line: 1, column: 0 },
  667. end: { line: 3, column: 5 }
  668. }
  669. },
  670. '`\\u{000042}\\u0042\\x42\\u0\\102\\A`': {
  671. type: 'ExpressionStatement',
  672. expression: {
  673. type: 'TemplateLiteral',
  674. quasis: [{
  675. type: 'TemplateElement',
  676. value: {
  677. raw: '\\u{000042}\\u0042\\x42\\u0\\102\\A',
  678. cooked: 'BBBu0BA'
  679. },
  680. tail: true,
  681. range: [0, 31],
  682. loc: {
  683. start: { line: 1, column: 0 },
  684. end: { line: 1, column: 31 }
  685. }
  686. }],
  687. expressions: [],
  688. range: [0, 31],
  689. loc: {
  690. start: { line: 1, column: 0 },
  691. end: { line: 1, column: 31 }
  692. }
  693. },
  694. range: [0, 31],
  695. loc: {
  696. start: { line: 1, column: 0 },
  697. end: { line: 1, column: 31 }
  698. }
  699. },
  700. 'new raw`42`': {
  701. type: 'ExpressionStatement',
  702. expression: {
  703. type: 'NewExpression',
  704. callee: {
  705. type: 'TaggedTemplateExpression',
  706. tag: {
  707. type: 'Identifier',
  708. name: 'raw',
  709. range: [4, 7],
  710. loc: {
  711. start: { line: 1, column: 4 },
  712. end: { line: 1, column: 7 }
  713. }
  714. },
  715. quasi: {
  716. type: 'TemplateLiteral',
  717. quasis: [{
  718. type: 'TemplateElement',
  719. value: {
  720. raw: '42',
  721. cooked: '42'
  722. },
  723. tail: true,
  724. range: [7, 11],
  725. loc: {
  726. start: { line: 1, column: 7 },
  727. end: { line: 1, column: 11 }
  728. }
  729. }],
  730. expressions: [],
  731. range: [7, 11],
  732. loc: {
  733. start: { line: 1, column: 7 },
  734. end: { line: 1, column: 11 }
  735. }
  736. },
  737. range: [4, 11],
  738. loc: {
  739. start: { line: 1, column: 4 },
  740. end: { line: 1, column: 11 }
  741. }
  742. },
  743. 'arguments': [],
  744. range: [0, 11],
  745. loc: {
  746. start: { line: 1, column: 0 },
  747. end: { line: 1, column: 11 }
  748. }
  749. },
  750. range: [0, 11],
  751. loc: {
  752. start: { line: 1, column: 0 },
  753. end: { line: 1, column: 11 }
  754. }
  755. }
  756. },
  757. // ECMAScript 6th Syntax, 12.11 The switch statement
  758. 'ES6: Switch Case Declaration': {
  759. 'switch (answer) { case 42: let t = 42; break; }': {
  760. type: 'SwitchStatement',
  761. discriminant: {
  762. type: 'Identifier',
  763. name: 'answer',
  764. range: [8, 14],
  765. loc: {
  766. start: { line: 1, column: 8 },
  767. end: { line: 1, column: 14 }
  768. }
  769. },
  770. cases: [{
  771. type: 'SwitchCase',
  772. test: {
  773. type: 'Literal',
  774. value: 42,
  775. raw: '42',
  776. range: [23, 25],
  777. loc: {
  778. start: { line: 1, column: 23 },
  779. end: { line: 1, column: 25 }
  780. }
  781. },
  782. consequent: [{
  783. type: 'VariableDeclaration',
  784. declarations: [{
  785. type: 'VariableDeclarator',
  786. id: {
  787. type: 'Identifier',
  788. name: 't',
  789. range: [31, 32],
  790. loc: {
  791. start: { line: 1, column: 31 },
  792. end: { line: 1, column: 32 }
  793. }
  794. },
  795. init: {
  796. type: 'Literal',
  797. value: 42,
  798. raw: '42',
  799. range: [35, 37],
  800. loc: {
  801. start: { line: 1, column: 35 },
  802. end: { line: 1, column: 37 }
  803. }
  804. },
  805. range: [31, 37],
  806. loc: {
  807. start: { line: 1, column: 31 },
  808. end: { line: 1, column: 37 }
  809. }
  810. }],
  811. kind: 'let',
  812. range: [27, 38],
  813. loc: {
  814. start: { line: 1, column: 27 },
  815. end: { line: 1, column: 38 }
  816. }
  817. }, {
  818. type: 'BreakStatement',
  819. label: null,
  820. range: [39, 45],
  821. loc: {
  822. start: { line: 1, column: 39 },
  823. end: { line: 1, column: 45 }
  824. }
  825. }],
  826. range: [18, 45],
  827. loc: {
  828. start: { line: 1, column: 18 },
  829. end: { line: 1, column: 45 }
  830. }
  831. }],
  832. range: [0, 47],
  833. loc: {
  834. start: { line: 1, column: 0 },
  835. end: { line: 1, column: 47 }
  836. }
  837. }
  838. },
  839. // ECMAScript 6th Syntax, 13.2 Arrow Function Definitions
  840. 'ES6: Arrow Function': {
  841. '() => "test"': {
  842. type: 'ExpressionStatement',
  843. expression: {
  844. type: 'ArrowFunctionExpression',
  845. id: null,
  846. params: [],
  847. defaults: [],
  848. body: {
  849. type: 'Literal',
  850. value: 'test',
  851. raw: '"test"',
  852. range: [6, 12],
  853. loc: {
  854. start: { line: 1, column: 6 },
  855. end: { line: 1, column: 12 }
  856. }
  857. },
  858. rest: null,
  859. generator: false,
  860. expression: true,
  861. range: [0, 12],
  862. loc: {
  863. start: { line: 1, column: 0 },
  864. end: { line: 1, column: 12 }
  865. }
  866. },
  867. range: [0, 12],
  868. loc: {
  869. start: { line: 1, column: 0 },
  870. end: { line: 1, column: 12 }
  871. }
  872. },
  873. 'e => "test"': {
  874. type: 'ExpressionStatement',
  875. expression: {
  876. type: 'ArrowFunctionExpression',
  877. id: null,
  878. params: [{
  879. type: 'Identifier',
  880. name: 'e',
  881. range: [0, 1],
  882. loc: {
  883. start: { line: 1, column: 0 },
  884. end: { line: 1, column: 1 }
  885. }
  886. }],
  887. defaults: [],
  888. body: {
  889. type: 'Literal',
  890. value: 'test',
  891. raw: '"test"',
  892. range: [5, 11],
  893. loc: {
  894. start: { line: 1, column: 5 },
  895. end: { line: 1, column: 11 }
  896. }
  897. },
  898. rest: null,
  899. generator: false,
  900. expression: true,
  901. range: [0, 11],
  902. loc: {
  903. start: { line: 1, column: 0 },
  904. end: { line: 1, column: 11 }
  905. }
  906. },
  907. range: [0, 11],
  908. loc: {
  909. start: { line: 1, column: 0 },
  910. end: { line: 1, column: 11 }
  911. }
  912. },
  913. '(e) => "test"': {
  914. type: 'ExpressionStatement',
  915. expression: {
  916. type: 'ArrowFunctionExpression',
  917. id: null,
  918. params: [{
  919. type: 'Identifier',
  920. name: 'e',
  921. range: [1, 2],
  922. loc: {
  923. start: { line: 1, column: 1 },
  924. end: { line: 1, column: 2 }
  925. }
  926. }],
  927. defaults: [],
  928. body: {
  929. type: 'Literal',
  930. value: 'test',
  931. raw: '"test"',
  932. range: [7, 13],
  933. loc: {
  934. start: { line: 1, column: 7 },
  935. end: { line: 1, column: 13 }
  936. }
  937. },
  938. rest: null,
  939. generator: false,
  940. expression: true,
  941. range: [0, 13],
  942. loc: {
  943. start: { line: 1, column: 0 },
  944. end: { line: 1, column: 13 }
  945. }
  946. },
  947. range: [0, 13],
  948. loc: {
  949. start: { line: 1, column: 0 },
  950. end: { line: 1, column: 13 }
  951. }
  952. },
  953. '(a, b) => "test"': {
  954. type: 'ExpressionStatement',
  955. expression: {
  956. type: 'ArrowFunctionExpression',
  957. id: null,
  958. params: [{
  959. type: 'Identifier',
  960. name: 'a',
  961. range: [1, 2],
  962. loc: {
  963. start: { line: 1, column: 1 },
  964. end: { line: 1, column: 2 }
  965. }
  966. }, {
  967. type: 'Identifier',
  968. name: 'b',
  969. range: [4, 5],
  970. loc: {
  971. start: { line: 1, column: 4 },
  972. end: { line: 1, column: 5 }
  973. }
  974. }],
  975. defaults: [],
  976. body: {
  977. type: 'Literal',
  978. value: 'test',
  979. raw: '"test"',
  980. range: [10, 16],
  981. loc: {
  982. start: { line: 1, column: 10 },
  983. end: { line: 1, column: 16 }
  984. }
  985. },
  986. rest: null,
  987. generator: false,
  988. expression: true,
  989. range: [0, 16],
  990. loc: {
  991. start: { line: 1, column: 0 },
  992. end: { line: 1, column: 16 }
  993. }
  994. },
  995. range: [0, 16],
  996. loc: {
  997. start: { line: 1, column: 0 },
  998. end: { line: 1, column: 16 }
  999. }
  1000. },
  1001. 'e => { 42; }': {
  1002. type: 'ExpressionStatement',
  1003. expression: {
  1004. type: 'ArrowFunctionExpression',
  1005. id: null,
  1006. params: [{
  1007. type: 'Identifier',
  1008. name: 'e',
  1009. range: [0, 1],
  1010. loc: {
  1011. start: { line: 1, column: 0 },
  1012. end: { line: 1, column: 1 }
  1013. }
  1014. }],
  1015. defaults: [],
  1016. body: {
  1017. type: 'BlockStatement',
  1018. body: [{
  1019. type: 'ExpressionStatement',
  1020. expression: {
  1021. type: 'Literal',
  1022. value: 42,
  1023. raw: '42',
  1024. range: [7, 9],
  1025. loc: {
  1026. start: { line: 1, column: 7 },
  1027. end: { line: 1, column: 9 }
  1028. }
  1029. },
  1030. range: [7, 10],
  1031. loc: {
  1032. start: { line: 1, column: 7 },
  1033. end: { line: 1, column: 10 }
  1034. }
  1035. }],
  1036. range: [5, 12],
  1037. loc: {
  1038. start: { line: 1, column: 5 },
  1039. end: { line: 1, column: 12 }
  1040. }
  1041. },
  1042. rest: null,
  1043. generator: false,
  1044. expression: false,
  1045. range: [0, 12],
  1046. loc: {
  1047. start: { line: 1, column: 0 },
  1048. end: { line: 1, column: 12 }
  1049. }
  1050. },
  1051. range: [0, 12],
  1052. loc: {
  1053. start: { line: 1, column: 0 },
  1054. end: { line: 1, column: 12 }
  1055. }
  1056. },
  1057. 'e => ({ property: 42 })': {
  1058. type: 'ExpressionStatement',
  1059. expression: {
  1060. type: 'ArrowFunctionExpression',
  1061. id: null,
  1062. params: [{
  1063. type: 'Identifier',
  1064. name: 'e',
  1065. range: [0, 1],
  1066. loc: {
  1067. start: { line: 1, column: 0 },
  1068. end: { line: 1, column: 1 }
  1069. }
  1070. }],
  1071. defaults: [],
  1072. body: {
  1073. type: 'ObjectExpression',
  1074. properties: [{
  1075. type: 'Property',
  1076. key: {
  1077. type: 'Identifier',
  1078. name: 'property',
  1079. range: [8, 16],
  1080. loc: {
  1081. start: { line: 1, column: 8 },
  1082. end: { line: 1, column: 16 }
  1083. }
  1084. },
  1085. value: {
  1086. type: 'Literal',
  1087. value: 42,
  1088. raw: '42',
  1089. range: [18, 20],
  1090. loc: {
  1091. start: { line: 1, column: 18 },
  1092. end: { line: 1, column: 20 }
  1093. }
  1094. },
  1095. kind: 'init',
  1096. method: false,
  1097. shorthand: false,
  1098. range: [8, 20],
  1099. loc: {
  1100. start: { line: 1, column: 8 },
  1101. end: { line: 1, column: 20 }
  1102. }
  1103. }],
  1104. range: [6, 22],
  1105. loc: {
  1106. start: { line: 1, column: 6 },
  1107. end: { line: 1, column: 22 }
  1108. }
  1109. },
  1110. rest: null,
  1111. generator: false,
  1112. expression: true,
  1113. range: [0, 23],
  1114. loc: {
  1115. start: { line: 1, column: 0 },
  1116. end: { line: 1, column: 23 }
  1117. }
  1118. },
  1119. range: [0, 23],
  1120. loc: {
  1121. start: { line: 1, column: 0 },
  1122. end: { line: 1, column: 23 }
  1123. }
  1124. },
  1125. // Not an object!
  1126. 'e => { label: 42 }': {
  1127. type: 'ExpressionStatement',
  1128. expression: {
  1129. type: 'ArrowFunctionExpression',
  1130. id: null,
  1131. params: [{
  1132. type: 'Identifier',
  1133. name: 'e',
  1134. range: [0, 1],
  1135. loc: {
  1136. start: { line: 1, column: 0 },
  1137. end: { line: 1, column: 1 }
  1138. }
  1139. }],
  1140. defaults: [],
  1141. body: {
  1142. type: 'BlockStatement',
  1143. body: [{
  1144. type: 'LabeledStatement',
  1145. label: {
  1146. type: 'Identifier',
  1147. name: 'label',
  1148. range: [7, 12],
  1149. loc: {
  1150. start: { line: 1, column: 7 },
  1151. end: { line: 1, column: 12 }
  1152. }
  1153. },
  1154. body: {
  1155. type: 'ExpressionStatement',
  1156. expression: {
  1157. type: 'Literal',
  1158. value: 42,
  1159. raw: '42',
  1160. range: [14, 16],
  1161. loc: {
  1162. start: { line: 1, column: 14 },
  1163. end: { line: 1, column: 16 }
  1164. }
  1165. },
  1166. range: [14, 17],
  1167. loc: {
  1168. start: { line: 1, column: 14 },
  1169. end: { line: 1, column: 17 }
  1170. }
  1171. },
  1172. range: [7, 17],
  1173. loc: {
  1174. start: { line: 1, column: 7 },
  1175. end: { line: 1, column: 17 }
  1176. }
  1177. }],
  1178. range: [5, 18],
  1179. loc: {
  1180. start: { line: 1, column: 5 },
  1181. end: { line: 1, column: 18 }
  1182. }
  1183. },
  1184. rest: null,
  1185. generator: false,
  1186. expression: false,
  1187. range: [0, 18],
  1188. loc: {
  1189. start: { line: 1, column: 0 },
  1190. end: { line: 1, column: 18 }
  1191. }
  1192. },
  1193. range: [0, 18],
  1194. loc: {
  1195. start: { line: 1, column: 0 },
  1196. end: { line: 1, column: 18 }
  1197. }
  1198. },
  1199. '(a, b) => { 42; }': {
  1200. type: 'ExpressionStatement',
  1201. expression: {
  1202. type: 'ArrowFunctionExpression',
  1203. id: null,
  1204. params: [{
  1205. type: 'Identifier',
  1206. name: 'a',
  1207. range: [1, 2],
  1208. loc: {
  1209. start: { line: 1, column: 1 },
  1210. end: { line: 1, column: 2 }
  1211. }
  1212. }, {
  1213. type: 'Identifier',
  1214. name: 'b',
  1215. range: [4, 5],
  1216. loc: {
  1217. start: { line: 1, column: 4 },
  1218. end: { line: 1, column: 5 }
  1219. }
  1220. }],
  1221. defaults: [],
  1222. body: {
  1223. type: 'BlockStatement',
  1224. body: [{
  1225. type: 'ExpressionStatement',
  1226. expression: {
  1227. type: 'Literal',
  1228. value: 42,
  1229. raw: '42',
  1230. range: [12, 14],
  1231. loc: {
  1232. start: { line: 1, column: 12 },
  1233. end: { line: 1, column: 14 }
  1234. }
  1235. },
  1236. range: [12, 15],
  1237. loc: {
  1238. start: { line: 1, column: 12 },
  1239. end: { line: 1, column: 15 }
  1240. }
  1241. }],
  1242. range: [10, 17],
  1243. loc: {
  1244. start: { line: 1, column: 10 },
  1245. end: { line: 1, column: 17 }
  1246. }
  1247. },
  1248. rest: null,
  1249. generator: false,
  1250. expression: false,
  1251. range: [0, 17],
  1252. loc: {
  1253. start: { line: 1, column: 0 },
  1254. end: { line: 1, column: 17 }
  1255. }
  1256. },
  1257. range: [0, 17],
  1258. loc: {
  1259. start: { line: 1, column: 0 },
  1260. end: { line: 1, column: 17 }
  1261. }
  1262. },
  1263. '([a, , b]) => 42': {
  1264. type: 'ExpressionStatement',
  1265. expression: {
  1266. type: 'ArrowFunctionExpression',
  1267. id: null,
  1268. params: [{
  1269. type: 'ArrayPattern',
  1270. elements: [{
  1271. type: 'Identifier',
  1272. name: 'a',
  1273. range: [2, 3],
  1274. loc: {
  1275. start: { line: 1, column: 2 },
  1276. end: { line: 1, column: 3 }
  1277. }
  1278. }, null, {
  1279. type: 'Identifier',
  1280. name: 'b',
  1281. range: [7, 8],
  1282. loc: {
  1283. start: { line: 1, column: 7 },
  1284. end: { line: 1, column: 8 }
  1285. }
  1286. }],
  1287. range: [1, 9],
  1288. loc: {
  1289. start: { line: 1, column: 1 },
  1290. end: { line: 1, column: 9 }
  1291. }
  1292. }],
  1293. defaults: [],
  1294. body: {
  1295. type: 'Literal',
  1296. value: 42,
  1297. raw: '42',
  1298. range: [14, 16],
  1299. loc: {
  1300. start: { line: 1, column: 14 },
  1301. end: { line: 1, column: 16 }
  1302. }
  1303. },
  1304. rest: null,
  1305. generator: false,
  1306. expression: true,
  1307. range: [0, 16],
  1308. loc: {
  1309. start: { line: 1, column: 0 },
  1310. end: { line: 1, column: 16 }
  1311. }
  1312. },
  1313. range: [0, 16],
  1314. loc: {
  1315. start: { line: 1, column: 0 },
  1316. end: { line: 1, column: 16 }
  1317. }
  1318. },
  1319. '([a.a]) => 42': {
  1320. type: 'ExpressionStatement',
  1321. expression: {
  1322. type: 'ArrowFunctionExpression',
  1323. id: null,
  1324. params: [{
  1325. type: 'ArrayPattern',
  1326. elements: [{
  1327. type: 'MemberExpression',
  1328. computed: false,
  1329. object: {
  1330. type: 'Identifier',
  1331. name: 'a',
  1332. range: [2, 3],
  1333. loc: {
  1334. start: { line: 1, column: 2 },
  1335. end: { line: 1, column: 3 }
  1336. }
  1337. },
  1338. property: {
  1339. type: 'Identifier',
  1340. name: 'a',
  1341. range: [4, 5],
  1342. loc: {
  1343. start: { line: 1, column: 4 },
  1344. end: { line: 1, column: 5 }
  1345. }
  1346. },
  1347. range: [2, 5],
  1348. loc: {
  1349. start: { line: 1, column: 2 },
  1350. end: { line: 1, column: 5 }
  1351. }
  1352. }],
  1353. range: [1, 6],
  1354. loc: {
  1355. start: { line: 1, column: 1 },
  1356. end: { line: 1, column: 6 }
  1357. }
  1358. }],
  1359. defaults: [],
  1360. body: {
  1361. type: 'Literal',
  1362. value: 42,
  1363. raw: '42',
  1364. range: [11, 13],
  1365. loc: {
  1366. start: { line: 1, column: 11 },
  1367. end: { line: 1, column: 13 }
  1368. }
  1369. },
  1370. rest: null,
  1371. generator: false,
  1372. expression: true,
  1373. range: [0, 13],
  1374. loc: {
  1375. start: { line: 1, column: 0 },
  1376. end: { line: 1, column: 13 }
  1377. }
  1378. },
  1379. range: [0, 13],
  1380. loc: {
  1381. start: { line: 1, column: 0 },
  1382. end: { line: 1, column: 13 }
  1383. }
  1384. },
  1385. '(x=1) => x * x': {
  1386. type: 'ExpressionStatement',
  1387. expression: {
  1388. type: 'ArrowFunctionExpression',
  1389. id: null,
  1390. params: [{
  1391. type: 'Identifier',
  1392. name: 'x',
  1393. range: [1, 2],
  1394. loc: {
  1395. start: { line: 1, column: 1 },
  1396. end: { line: 1, column: 2 }
  1397. }
  1398. }],
  1399. defaults: [{
  1400. type: 'Literal',
  1401. value: 1,
  1402. raw: '1',
  1403. range: [3, 4],
  1404. loc: {
  1405. start: { line: 1, column: 3 },
  1406. end: { line: 1, column: 4 }
  1407. }
  1408. }],
  1409. body: {
  1410. type: 'BinaryExpression',
  1411. operator: '*',
  1412. left: {
  1413. type: 'Identifier',
  1414. name: 'x',
  1415. range: [9, 10],
  1416. loc: {
  1417. start: { line: 1, column: 9 },
  1418. end: { line: 1, column: 10 }
  1419. }
  1420. },
  1421. right: {
  1422. type: 'Identifier',
  1423. name: 'x',
  1424. range: [13, 14],
  1425. loc: {
  1426. start: { line: 1, column: 13 },
  1427. end: { line: 1, column: 14 }
  1428. }
  1429. },
  1430. range: [9, 14],
  1431. loc: {
  1432. start: { line: 1, column: 9 },
  1433. end: { line: 1, column: 14 }
  1434. }
  1435. },
  1436. rest: null,
  1437. generator: false,
  1438. expression: true,
  1439. range: [0, 14],
  1440. loc: {
  1441. start: { line: 1, column: 0 },
  1442. end: { line: 1, column: 14 }
  1443. }
  1444. },
  1445. range: [0, 14],
  1446. loc: {
  1447. start: { line: 1, column: 0 },
  1448. end: { line: 1, column: 14 }
  1449. }
  1450. },
  1451. // not strict mode, using eval
  1452. 'eval => 42': {
  1453. type: 'ExpressionStatement',
  1454. expression: {
  1455. type: 'ArrowFunctionExpression',
  1456. id: null,
  1457. params: [{
  1458. type: 'Identifier',
  1459. name: 'eval',
  1460. range: [0, 4],
  1461. loc: {
  1462. start: { line: 1, column: 0 },
  1463. end: { line: 1, column: 4 }
  1464. }
  1465. }],
  1466. defaults: [],
  1467. body: {
  1468. type: 'Literal',
  1469. value: 42,
  1470. raw: '42',
  1471. range: [8, 10],
  1472. loc: {
  1473. start: { line: 1, column: 8 },
  1474. end: { line: 1, column: 10 }
  1475. }
  1476. },
  1477. rest: null,
  1478. generator: false,
  1479. expression: true,
  1480. range: [0, 10],
  1481. loc: {
  1482. start: { line: 1, column: 0 },
  1483. end: { line: 1, column: 10 }
  1484. }
  1485. },
  1486. range: [0, 10],
  1487. loc: {
  1488. start: { line: 1, column: 0 },
  1489. end: { line: 1, column: 10 }
  1490. }
  1491. },
  1492. // not strict mode, using arguments
  1493. 'arguments => 42': {
  1494. type: 'ExpressionStatement',
  1495. expression: {
  1496. type: 'ArrowFunctionExpression',
  1497. id: null,
  1498. params: [{
  1499. type: 'Identifier',
  1500. name: 'arguments',
  1501. range: [0, 9],
  1502. loc: {
  1503. start: { line: 1, column: 0 },
  1504. end: { line: 1, column: 9 }
  1505. }
  1506. }],
  1507. defaults: [],
  1508. body: {
  1509. type: 'Literal',
  1510. value: 42,
  1511. raw: '42',
  1512. range: [13, 15],
  1513. loc: {
  1514. start: { line: 1, column: 13 },
  1515. end: { line: 1, column: 15 }
  1516. }
  1517. },
  1518. rest: null,
  1519. generator: false,
  1520. expression: true,
  1521. range: [0, 15],
  1522. loc: {
  1523. start: { line: 1, column: 0 },
  1524. end: { line: 1, column: 15 }
  1525. }
  1526. },
  1527. range: [0, 15],
  1528. loc: {
  1529. start: { line: 1, column: 0 },
  1530. end: { line: 1, column: 15 }
  1531. }
  1532. },
  1533. // not strict mode, using octals
  1534. '(a) => 00': {
  1535. type: 'ExpressionStatement',
  1536. expression: {
  1537. type: 'ArrowFunctionExpression',
  1538. id: null,
  1539. params: [{
  1540. type: 'Identifier',
  1541. name: 'a',
  1542. range: [1, 2],
  1543. loc: {
  1544. start: { line: 1, column: 1 },
  1545. end: { line: 1, column: 2 }
  1546. }
  1547. }],
  1548. defaults: [],
  1549. body: {
  1550. type: 'Literal',
  1551. value: 0,
  1552. raw: '00',
  1553. range: [7, 9],
  1554. loc: {
  1555. start: { line: 1, column: 7 },
  1556. end: { line: 1, column: 9 }
  1557. }
  1558. },
  1559. rest: null,
  1560. generator: false,
  1561. expression: true,
  1562. range: [0, 9],
  1563. loc: {
  1564. start: { line: 1, column: 0 },
  1565. end: { line: 1, column: 9 }
  1566. }
  1567. },
  1568. range: [0, 9],
  1569. loc: {
  1570. start: { line: 1, column: 0 },
  1571. end: { line: 1, column: 9 }
  1572. }
  1573. },
  1574. // not strict mode, using eval, IsSimpleParameterList is true
  1575. '(eval, a) => 42': {
  1576. type: 'ExpressionStatement',
  1577. expression: {
  1578. type: 'ArrowFunctionExpression',
  1579. id: null,
  1580. params: [{
  1581. type: 'Identifier',
  1582. name: 'eval',
  1583. range: [1, 5],
  1584. loc: {
  1585. start: { line: 1, column: 1 },
  1586. end: { line: 1, column: 5 }
  1587. }
  1588. }, {
  1589. type: 'Identifier',
  1590. name: 'a',
  1591. range: [7, 8],
  1592. loc: {
  1593. start: { line: 1, column: 7 },
  1594. end: { line: 1, column: 8 }
  1595. }
  1596. }],
  1597. defaults: [],
  1598. body: {
  1599. type: 'Literal',
  1600. value: 42,
  1601. raw: '42',
  1602. range: [13, 15],
  1603. loc: {
  1604. start: { line: 1, column: 13 },
  1605. end: { line: 1, column: 15 }
  1606. }
  1607. },
  1608. rest: null,
  1609. generator: false,
  1610. expression: true,
  1611. range: [0, 15],
  1612. loc: {
  1613. start: { line: 1, column: 0 },
  1614. end: { line: 1, column: 15 }
  1615. }
  1616. },
  1617. range: [0, 15],
  1618. loc: {
  1619. start: { line: 1, column: 0 },
  1620. end: { line: 1, column: 15 }
  1621. }
  1622. },
  1623. // not strict mode, assigning to eval
  1624. '(eval = 10) => 42': {
  1625. type: 'ExpressionStatement',
  1626. expression: {
  1627. type: 'ArrowFunctionExpression',
  1628. id: null,
  1629. params: [{
  1630. type: 'Identifier',
  1631. name: 'eval',
  1632. range: [1, 5],
  1633. loc: {
  1634. start: { line: 1, column: 1 },
  1635. end: { line: 1, column: 5 }
  1636. }
  1637. }],
  1638. defaults: [{
  1639. type: 'Literal',
  1640. value: 10,
  1641. raw: '10',
  1642. range: [8, 10],
  1643. loc: {
  1644. start: { line: 1, column: 8 },
  1645. end: { line: 1, column: 10 }
  1646. }
  1647. }],
  1648. body: {
  1649. type: 'Literal',
  1650. value: 42,
  1651. raw: '42',
  1652. range: [15, 17],
  1653. loc: {
  1654. start: { line: 1, column: 15 },
  1655. end: { line: 1, column: 17 }
  1656. }
  1657. },
  1658. rest: null,
  1659. generator: false,
  1660. expression: true,
  1661. range: [0, 17],
  1662. loc: {
  1663. start: { line: 1, column: 0 },
  1664. end: { line: 1, column: 17 }
  1665. }
  1666. },
  1667. range: [0, 17],
  1668. loc: {
  1669. start: { line: 1, column: 0 },
  1670. end: { line: 1, column: 17 }
  1671. }
  1672. },
  1673. // not strict mode, using eval, IsSimpleParameterList is false
  1674. '(eval, a = 10) => 42': {
  1675. type: 'ExpressionStatement',
  1676. expression: {
  1677. type: 'ArrowFunctionExpression',
  1678. id: null,
  1679. params: [{
  1680. type: 'Identifier',
  1681. name: 'eval',
  1682. range: [1, 5],
  1683. loc: {
  1684. start: { line: 1, column: 1 },
  1685. end: { line: 1, column: 5 }
  1686. }
  1687. }, {
  1688. type: 'Identifier',
  1689. name: 'a',
  1690. range: [7, 8],
  1691. loc: {
  1692. start: { line: 1, column: 7 },
  1693. end: { line: 1, column: 8 }
  1694. }
  1695. }],
  1696. defaults: [null, {
  1697. type: 'Literal',
  1698. value: 10,
  1699. raw: '10',
  1700. range: [11, 13],
  1701. loc: {
  1702. start: { line: 1, column: 11 },
  1703. end: { line: 1, column: 13 }
  1704. }
  1705. }],
  1706. body: {
  1707. type: 'Literal',
  1708. value: 42,
  1709. raw: '42',
  1710. range: [18, 20],
  1711. loc: {
  1712. start: { line: 1, column: 18 },
  1713. end: { line: 1, column: 20 }
  1714. }
  1715. },
  1716. rest: null,
  1717. generator: false,
  1718. expression: true,
  1719. range: [0, 20],
  1720. loc: {
  1721. start: { line: 1, column: 0 },
  1722. end: { line: 1, column: 20 }
  1723. }
  1724. },
  1725. range: [0, 20],
  1726. loc: {
  1727. start: { line: 1, column: 0 },
  1728. end: { line: 1, column: 20 }
  1729. }
  1730. },
  1731. '(x => x)': {
  1732. type: 'ExpressionStatement',
  1733. expression: {
  1734. type: 'ArrowFunctionExpression',
  1735. id: null,
  1736. params: [{
  1737. type: 'Identifier',
  1738. name: 'x',
  1739. range: [1, 2],
  1740. loc: {
  1741. start: { line: 1, column: 1 },
  1742. end: { line: 1, column: 2 }
  1743. }
  1744. }],
  1745. defaults: [],
  1746. body: {
  1747. type: 'Identifier',
  1748. name: 'x',
  1749. range: [6, 7],
  1750. loc: {
  1751. start: { line: 1, column: 6 },
  1752. end: { line: 1, column: 7 }
  1753. }
  1754. },
  1755. rest: null,
  1756. generator: false,
  1757. expression: true,
  1758. range: [1, 7],
  1759. loc: {
  1760. start: { line: 1, column: 1 },
  1761. end: { line: 1, column: 7 }
  1762. }
  1763. },
  1764. range: [0, 8],
  1765. loc: {
  1766. start: { line: 1, column: 0 },
  1767. end: { line: 1, column: 8 }
  1768. }
  1769. },
  1770. 'x => y => 42': {
  1771. type: 'ExpressionStatement',
  1772. expression: {
  1773. type: 'ArrowFunctionExpression',
  1774. id: null,
  1775. params: [{
  1776. type: 'Identifier',
  1777. name: 'x',
  1778. range: [0, 1],
  1779. loc: {
  1780. start: { line: 1, column: 0 },
  1781. end: { line: 1, column: 1 }
  1782. }
  1783. }],
  1784. defaults: [],
  1785. body: {
  1786. type: 'ArrowFunctionExpression',
  1787. id: null,
  1788. params: [{
  1789. type: 'Identifier',
  1790. name: 'y',
  1791. range: [5, 6],
  1792. loc: {
  1793. start: { line: 1, column: 5 },
  1794. end: { line: 1, column: 6 }
  1795. }
  1796. }],
  1797. defaults: [],
  1798. body: {
  1799. type: 'Literal',
  1800. value: 42,
  1801. raw: '42',
  1802. range: [10, 12],
  1803. loc: {
  1804. start: { line: 1, column: 10 },
  1805. end: { line: 1, column: 12 }
  1806. }
  1807. },
  1808. rest: null,
  1809. generator: false,
  1810. expression: true,
  1811. range: [5, 12],
  1812. loc: {
  1813. start: { line: 1, column: 5 },
  1814. end: { line: 1, column: 12 }
  1815. }
  1816. },
  1817. rest: null,
  1818. generator: false,
  1819. expression: true,
  1820. range: [0, 12],
  1821. loc: {
  1822. start: { line: 1, column: 0 },
  1823. end: { line: 1, column: 12 }
  1824. }
  1825. },
  1826. range: [0, 12],
  1827. loc: {
  1828. start: { line: 1, column: 0 },
  1829. end: { line: 1, column: 12 }
  1830. }
  1831. },
  1832. '(x) => ((y, z) => (x, y, z))': {
  1833. type: 'ExpressionStatement',
  1834. expression: {
  1835. type: 'ArrowFunctionExpression',
  1836. id: null,
  1837. params: [{
  1838. type: 'Identifier',
  1839. name: 'x',
  1840. range: [1, 2],
  1841. loc: {
  1842. start: { line: 1, column: 1 },
  1843. end: { line: 1, column: 2 }
  1844. }
  1845. }],
  1846. defaults: [],
  1847. body: {
  1848. type: 'ArrowFunctionExpression',
  1849. id: null,
  1850. params: [{
  1851. type: 'Identifier',
  1852. name: 'y',
  1853. range: [9, 10],
  1854. loc: {
  1855. start: { line: 1, column: 9 },
  1856. end: { line: 1, column: 10 }
  1857. }
  1858. }, {
  1859. type: 'Identifier',
  1860. name: 'z',
  1861. range: [12, 13],
  1862. loc: {
  1863. start: { line: 1, column: 12 },
  1864. end: { line: 1, column: 13 }
  1865. }
  1866. }],
  1867. defaults: [],
  1868. body: {
  1869. type: 'SequenceExpression',
  1870. expressions: [{
  1871. type: 'Identifier',
  1872. name: 'x',
  1873. range: [19, 20],
  1874. loc: {
  1875. start: { line: 1, column: 19 },
  1876. end: { line: 1, column: 20 }
  1877. }
  1878. }, {
  1879. type: 'Identifier',
  1880. name: 'y',
  1881. range: [22, 23],
  1882. loc: {
  1883. start: { line: 1, column: 22 },
  1884. end: { line: 1, column: 23 }
  1885. }
  1886. }, {
  1887. type: 'Identifier',
  1888. name: 'z',
  1889. range: [25, 26],
  1890. loc: {
  1891. start: { line: 1, column: 25 },
  1892. end: { line: 1, column: 26 }
  1893. }
  1894. }],
  1895. range: [19, 26],
  1896. loc: {
  1897. start: { line: 1, column: 19 },
  1898. end: { line: 1, column: 26 }
  1899. }
  1900. },
  1901. rest: null,
  1902. generator: false,
  1903. expression: true,
  1904. range: [8, 27],
  1905. loc: {
  1906. start: { line: 1, column: 8 },
  1907. end: { line: 1, column: 27 }
  1908. }
  1909. },
  1910. rest: null,
  1911. generator: false,
  1912. expression: true,
  1913. range: [0, 28],
  1914. loc: {
  1915. start: { line: 1, column: 0 },
  1916. end: { line: 1, column: 28 }
  1917. }
  1918. },
  1919. range: [0, 28],
  1920. loc: {
  1921. start: { line: 1, column: 0 },
  1922. end: { line: 1, column: 28 }
  1923. }
  1924. },
  1925. 'foo(() => {})': {
  1926. type: 'ExpressionStatement',
  1927. expression: {
  1928. type: 'CallExpression',
  1929. callee: {
  1930. type: 'Identifier',
  1931. name: 'foo',
  1932. range: [0, 3],
  1933. loc: {
  1934. start: { line: 1, column: 0 },
  1935. end: { line: 1, column: 3 }
  1936. }
  1937. },
  1938. 'arguments': [{
  1939. type: 'ArrowFunctionExpression',
  1940. id: null,
  1941. params: [],
  1942. defaults: [],
  1943. body: {
  1944. type: 'BlockStatement',
  1945. body: [],
  1946. range: [10, 12],
  1947. loc: {
  1948. start: { line: 1, column: 10 },
  1949. end: { line: 1, column: 12 }
  1950. }
  1951. },
  1952. rest: null,
  1953. generator: false,
  1954. expression: false,
  1955. range: [4, 12],
  1956. loc: {
  1957. start: { line: 1, column: 4 },
  1958. end: { line: 1, column: 12 }
  1959. }
  1960. }],
  1961. range: [0, 13],
  1962. loc: {
  1963. start: { line: 1, column: 0 },
  1964. end: { line: 1, column: 13 }
  1965. }
  1966. },
  1967. range: [0, 13],
  1968. loc: {
  1969. start: { line: 1, column: 0 },
  1970. end: { line: 1, column: 13 }
  1971. }
  1972. },
  1973. 'foo((x, y) => {})': {
  1974. type: 'ExpressionStatement',
  1975. expression: {
  1976. type: 'CallExpression',
  1977. callee: {
  1978. type: 'Identifier',
  1979. name: 'foo',
  1980. range: [0, 3],
  1981. loc: {
  1982. start: { line: 1, column: 0 },
  1983. end: { line: 1, column: 3 }
  1984. }
  1985. },
  1986. 'arguments': [{
  1987. type: 'ArrowFunctionExpression',
  1988. id: null,
  1989. params: [{
  1990. type: 'Identifier',
  1991. name: 'x',
  1992. range: [5, 6],
  1993. loc: {
  1994. start: { line: 1, column: 5 },
  1995. end: { line: 1, column: 6 }
  1996. }
  1997. }, {
  1998. type: 'Identifier',
  1999. name: 'y',
  2000. range: [8, 9],
  2001. loc: {
  2002. start: { line: 1, column: 8 },
  2003. end: { line: 1, column: 9 }
  2004. }
  2005. }],
  2006. defaults: [],
  2007. body: {
  2008. type: 'BlockStatement',
  2009. body: [],
  2010. range: [14, 16],
  2011. loc: {
  2012. start: { line: 1, column: 14 },
  2013. end: { line: 1, column: 16 }
  2014. }
  2015. },
  2016. rest: null,
  2017. generator: false,
  2018. expression: false,
  2019. range: [4, 16],
  2020. loc: {
  2021. start: { line: 1, column: 4 },
  2022. end: { line: 1, column: 16 }
  2023. }
  2024. }],
  2025. range: [0, 17],
  2026. loc: {
  2027. start: { line: 1, column: 0 },
  2028. end: { line: 1, column: 17 }
  2029. }
  2030. },
  2031. range: [0, 17],
  2032. loc: {
  2033. start: { line: 1, column: 0 },
  2034. end: { line: 1, column: 17 }
  2035. }
  2036. }
  2037. },
  2038. // ECMAScript 6th Syntax, 13.13 Method Definitions
  2039. 'ES6: Method Definition': {
  2040. 'x = { method() { } }': {
  2041. type: 'ExpressionStatement',
  2042. expression: {
  2043. type: 'AssignmentExpression',
  2044. operator: '=',
  2045. left: {
  2046. type: 'Identifier',
  2047. name: 'x',
  2048. range: [0, 1],
  2049. loc: {
  2050. start: { line: 1, column: 0 },
  2051. end: { line: 1, column: 1 }
  2052. }
  2053. },
  2054. right: {
  2055. type: 'ObjectExpression',
  2056. properties: [{
  2057. type: 'Property',
  2058. key: {
  2059. type: 'Identifier',
  2060. name: 'method',
  2061. range: [6, 12],
  2062. loc: {
  2063. start: { line: 1, column: 6 },
  2064. end: { line: 1, column: 12 }
  2065. }
  2066. },
  2067. value: {
  2068. type: 'FunctionExpression',
  2069. id: null,
  2070. params: [],
  2071. defaults: [],
  2072. body: {
  2073. type: 'BlockStatement',
  2074. body: [],
  2075. range: [15, 18],
  2076. loc: {
  2077. start: { line: 1, column: 15 },
  2078. end: { line: 1, column: 18 }
  2079. }
  2080. },
  2081. rest: null,
  2082. generator: false,
  2083. expression: false,
  2084. range: [15, 18],
  2085. loc: {
  2086. start: { line: 1, column: 15 },
  2087. end: { line: 1, column: 18 }
  2088. }
  2089. },
  2090. kind: 'init',
  2091. method: true,
  2092. shorthand: false,
  2093. range: [6, 18],
  2094. loc: {
  2095. start: { line: 1, column: 6 },
  2096. end: { line: 1, column: 18 }
  2097. }
  2098. }],
  2099. range: [4, 20],
  2100. loc: {
  2101. start: { line: 1, column: 4 },
  2102. end: { line: 1, column: 20 }
  2103. }
  2104. },
  2105. range: [0, 20],
  2106. loc: {
  2107. start: { line: 1, column: 0 },
  2108. end: { line: 1, column: 20 }
  2109. }
  2110. },
  2111. range: [0, 20],
  2112. loc: {
  2113. start: { line: 1, column: 0 },
  2114. end: { line: 1, column: 20 }
  2115. }
  2116. },
  2117. 'x = { method(test) { } }': {
  2118. type: 'ExpressionStatement',
  2119. expression: {
  2120. type: 'AssignmentExpression',
  2121. operator: '=',
  2122. left: {
  2123. type: 'Identifier',
  2124. name: 'x',
  2125. range: [0, 1],
  2126. loc: {
  2127. start: { line: 1, column: 0 },
  2128. end: { line: 1, column: 1 }
  2129. }
  2130. },
  2131. right: {
  2132. type: 'ObjectExpression',
  2133. properties: [{
  2134. type: 'Property',
  2135. key: {
  2136. type: 'Identifier',
  2137. name: 'method',
  2138. range: [6, 12],
  2139. loc: {
  2140. start: { line: 1, column: 6 },
  2141. end: { line: 1, column: 12 }
  2142. }
  2143. },
  2144. value: {
  2145. type: 'FunctionExpression',
  2146. id: null,
  2147. params: [{
  2148. type: 'Identifier',
  2149. name: 'test',
  2150. range: [13, 17],
  2151. loc: {
  2152. start: { line: 1, column: 13 },
  2153. end: { line: 1, column: 17 }
  2154. }
  2155. }],
  2156. defaults: [],
  2157. body: {
  2158. type: 'BlockStatement',
  2159. body: [],
  2160. range: [19, 22],
  2161. loc: {
  2162. start: { line: 1, column: 19 },
  2163. end: { line: 1, column: 22 }
  2164. }
  2165. },
  2166. rest: null,
  2167. generator: false,
  2168. expression: false,
  2169. range: [19, 22],
  2170. loc: {
  2171. start: { line: 1, column: 19 },
  2172. end: { line: 1, column: 22 }
  2173. }
  2174. },
  2175. kind: 'init',
  2176. method: true,
  2177. shorthand: false,
  2178. range: [6, 22],
  2179. loc: {
  2180. start: { line: 1, column: 6 },
  2181. end: { line: 1, column: 22 }
  2182. }
  2183. }],
  2184. range: [4, 24],
  2185. loc: {
  2186. start: { line: 1, column: 4 },
  2187. end: { line: 1, column: 24 }
  2188. }
  2189. },
  2190. range: [0, 24],
  2191. loc: {
  2192. start: { line: 1, column: 0 },
  2193. end: { line: 1, column: 24 }
  2194. }
  2195. },
  2196. range: [0, 24],
  2197. loc: {
  2198. start: { line: 1, column: 0 },
  2199. end: { line: 1, column: 24 }
  2200. }
  2201. },
  2202. 'x = { \'method\'() { } }': {
  2203. type: 'ExpressionStatement',
  2204. expression: {
  2205. type: 'AssignmentExpression',
  2206. operator: '=',
  2207. left: {
  2208. type: 'Identifier',
  2209. name: 'x',
  2210. range: [0, 1],
  2211. loc: {
  2212. start: { line: 1, column: 0 },
  2213. end: { line: 1, column: 1 }
  2214. }
  2215. },
  2216. right: {
  2217. type: 'ObjectExpression',
  2218. properties: [{
  2219. type: 'Property',
  2220. key: {
  2221. type: 'Literal',
  2222. value: 'method',
  2223. raw: '\'method\'',
  2224. range: [6, 14],
  2225. loc: {
  2226. start: { line: 1, column: 6 },
  2227. end: { line: 1, column: 14 }
  2228. }
  2229. },
  2230. value: {
  2231. type: 'FunctionExpression',
  2232. id: null,
  2233. params: [],
  2234. defaults: [],
  2235. body: {
  2236. type: 'BlockStatement',
  2237. body: [],
  2238. range: [17, 20],
  2239. loc: {
  2240. start: { line: 1, column: 17 },
  2241. end: { line: 1, column: 20 }
  2242. }
  2243. },
  2244. rest: null,
  2245. generator: false,
  2246. expression: false,
  2247. range: [17, 20],
  2248. loc: {
  2249. start: { line: 1, column: 17 },
  2250. end: { line: 1, column: 20 }
  2251. }
  2252. },
  2253. kind: 'init',
  2254. method: true,
  2255. shorthand: false,
  2256. range: [6, 20],
  2257. loc: {
  2258. start: { line: 1, column: 6 },
  2259. end: { line: 1, column: 20 }
  2260. }
  2261. }],
  2262. range: [4, 22],
  2263. loc: {
  2264. start: { line: 1, column: 4 },
  2265. end: { line: 1, column: 22 }
  2266. }
  2267. },
  2268. range: [0, 22],
  2269. loc: {
  2270. start: { line: 1, column: 0 },
  2271. end: { line: 1, column: 22 }
  2272. }
  2273. },
  2274. range: [0, 22],
  2275. loc: {
  2276. start: { line: 1, column: 0 },
  2277. end: { line: 1, column: 22 }
  2278. }
  2279. },
  2280. 'x = { get() { } }': {
  2281. type: 'ExpressionStatement',
  2282. expression: {
  2283. type: 'AssignmentExpression',
  2284. operator: '=',
  2285. left: {
  2286. type: 'Identifier',
  2287. name: 'x',
  2288. range: [0, 1],
  2289. loc: {
  2290. start: { line: 1, column: 0 },
  2291. end: { line: 1, column: 1 }
  2292. }
  2293. },
  2294. right: {
  2295. type: 'ObjectExpression',
  2296. properties: [{
  2297. type: 'Property',
  2298. key: {
  2299. type: 'Identifier',
  2300. name: 'get',
  2301. range: [6, 9],
  2302. loc: {
  2303. start: { line: 1, column: 6 },
  2304. end: { line: 1, column: 9 }
  2305. }
  2306. },
  2307. value: {
  2308. type: 'FunctionExpression',
  2309. id: null,
  2310. params: [],
  2311. defaults: [],
  2312. body: {
  2313. type: 'BlockStatement',
  2314. body: [],
  2315. range: [12, 15],
  2316. loc: {
  2317. start: { line: 1, column: 12 },
  2318. end: { line: 1, column: 15 }
  2319. }
  2320. },
  2321. rest: null,
  2322. generator: false,
  2323. expression: false,
  2324. range: [12, 15],
  2325. loc: {
  2326. start: { line: 1, column: 12 },
  2327. end: { line: 1, column: 15 }
  2328. }
  2329. },
  2330. kind: 'init',
  2331. method: true,
  2332. shorthand: false,
  2333. range: [6, 15],
  2334. loc: {
  2335. start: { line: 1, column: 6 },
  2336. end: { line: 1, column: 15 }
  2337. }
  2338. }],
  2339. range: [4, 17],
  2340. loc: {
  2341. start: { line: 1, column: 4 },
  2342. end: { line: 1, column: 17 }
  2343. }
  2344. },
  2345. range: [0, 17],
  2346. loc: {
  2347. start: { line: 1, column: 0 },
  2348. end: { line: 1, column: 17 }
  2349. }
  2350. },
  2351. range: [0, 17],
  2352. loc: {
  2353. start: { line: 1, column: 0 },
  2354. end: { line: 1, column: 17 }
  2355. }
  2356. },
  2357. 'x = { set() { } }': {
  2358. type: 'ExpressionStatement',
  2359. expression: {
  2360. type: 'AssignmentExpression',
  2361. operator: '=',
  2362. left: {
  2363. type: 'Identifier',
  2364. name: 'x',
  2365. range: [0, 1],
  2366. loc: {
  2367. start: { line: 1, column: 0 },
  2368. end: { line: 1, column: 1 }
  2369. }
  2370. },
  2371. right: {
  2372. type: 'ObjectExpression',
  2373. properties: [{
  2374. type: 'Property',
  2375. key: {
  2376. type: 'Identifier',
  2377. name: 'set',
  2378. range: [6, 9],
  2379. loc: {
  2380. start: { line: 1, column: 6 },
  2381. end: { line: 1, column: 9 }
  2382. }
  2383. },
  2384. value: {
  2385. type: 'FunctionExpression',
  2386. id: null,
  2387. params: [],
  2388. defaults: [],
  2389. body: {
  2390. type: 'BlockStatement',
  2391. body: [],
  2392. range: [12, 15],
  2393. loc: {
  2394. start: { line: 1, column: 12 },
  2395. end: { line: 1, column: 15 }
  2396. }
  2397. },
  2398. rest: null,
  2399. generator: false,
  2400. expression: false,
  2401. range: [12, 15],
  2402. loc: {
  2403. start: { line: 1, column: 12 },
  2404. end: { line: 1, column: 15 }
  2405. }
  2406. },
  2407. kind: 'init',
  2408. method: true,
  2409. shorthand: false,
  2410. range: [6, 15],
  2411. loc: {
  2412. start: { line: 1, column: 6 },
  2413. end: { line: 1, column: 15 }
  2414. }
  2415. }],
  2416. range: [4, 17],
  2417. loc: {
  2418. start: { line: 1, column: 4 },
  2419. end: { line: 1, column: 17 }
  2420. }
  2421. },
  2422. range: [0, 17],
  2423. loc: {
  2424. start: { line: 1, column: 0 },
  2425. end: { line: 1, column: 17 }
  2426. }
  2427. },
  2428. range: [0, 17],
  2429. loc: {
  2430. start: { line: 1, column: 0 },
  2431. end: { line: 1, column: 17 }
  2432. }
  2433. },
  2434. 'x = { method() 42 }': {
  2435. type: 'ExpressionStatement',
  2436. expression: {
  2437. type: 'AssignmentExpression',
  2438. operator: '=',
  2439. left: {
  2440. type: 'Identifier',
  2441. name: 'x',
  2442. range: [0, 1],
  2443. loc: {
  2444. start: { line: 1, column: 0 },
  2445. end: { line: 1, column: 1 }
  2446. }
  2447. },
  2448. right: {
  2449. type: 'ObjectExpression',
  2450. properties: [{
  2451. type: 'Property',
  2452. key: {
  2453. type: 'Identifier',
  2454. name: 'method',
  2455. range: [6, 12],
  2456. loc: {
  2457. start: { line: 1, column: 6 },
  2458. end: { line: 1, column: 12 }
  2459. }
  2460. },
  2461. value: {
  2462. type: 'FunctionExpression',
  2463. id: null,
  2464. params: [],
  2465. defaults: [],
  2466. body: {
  2467. type: 'Literal',
  2468. value: 42,
  2469. raw: '42',
  2470. range: [15, 17],
  2471. loc: {
  2472. start: { line: 1, column: 15 },
  2473. end: { line: 1, column: 17 }
  2474. }
  2475. },
  2476. rest: null,
  2477. generator: false,
  2478. expression: true,
  2479. range: [15, 17],
  2480. loc: {
  2481. start: { line: 1, column: 15 },
  2482. end: { line: 1, column: 17 }
  2483. }
  2484. },
  2485. kind: 'init',
  2486. method: true,
  2487. shorthand: false,
  2488. range: [6, 17],
  2489. loc: {
  2490. start: { line: 1, column: 6 },
  2491. end: { line: 1, column: 17 }
  2492. }
  2493. }],
  2494. range: [4, 19],
  2495. loc: {
  2496. start: { line: 1, column: 4 },
  2497. end: { line: 1, column: 19 }
  2498. }
  2499. },
  2500. range: [0, 19],
  2501. loc: {
  2502. start: { line: 1, column: 0 },
  2503. end: { line: 1, column: 19 }
  2504. }
  2505. },
  2506. range: [0, 19],
  2507. loc: {
  2508. start: { line: 1, column: 0 },
  2509. end: { line: 1, column: 19 }
  2510. }
  2511. },
  2512. 'x = { get method() 42 }': {
  2513. type: 'ExpressionStatement',
  2514. expression: {
  2515. type: 'AssignmentExpression',
  2516. operator: '=',
  2517. left: {
  2518. type: 'Identifier',
  2519. name: 'x',
  2520. range: [0, 1],
  2521. loc: {
  2522. start: { line: 1, column: 0 },
  2523. end: { line: 1, column: 1 }
  2524. }
  2525. },
  2526. right: {
  2527. type: 'ObjectExpression',
  2528. properties: [{
  2529. type: 'Property',
  2530. key: {
  2531. type: 'Identifier',
  2532. name: 'method',
  2533. range: [10, 16],
  2534. loc: {
  2535. start: { line: 1, column: 10 },
  2536. end: { line: 1, column: 16 }
  2537. }
  2538. },
  2539. value: {
  2540. type: 'FunctionExpression',
  2541. id: null,
  2542. params: [],
  2543. defaults: [],
  2544. body: {
  2545. type: 'Literal',
  2546. value: 42,
  2547. raw: '42',
  2548. range: [19, 21],
  2549. loc: {
  2550. start: { line: 1, column: 19 },
  2551. end: { line: 1, column: 21 }
  2552. }
  2553. },
  2554. rest: null,
  2555. generator: false,
  2556. expression: true,
  2557. range: [19, 21],
  2558. loc: {
  2559. start: { line: 1, column: 19 },
  2560. end: { line: 1, column: 21 }
  2561. }
  2562. },
  2563. kind: 'get',
  2564. method: false,
  2565. shorthand: false,
  2566. range: [6, 21],
  2567. loc: {
  2568. start: { line: 1, column: 6 },
  2569. end: { line: 1, column: 21 }
  2570. }
  2571. }],
  2572. range: [4, 23],
  2573. loc: {
  2574. start: { line: 1, column: 4 },
  2575. end: { line: 1, column: 23 }
  2576. }
  2577. },
  2578. range: [0, 23],
  2579. loc: {
  2580. start: { line: 1, column: 0 },
  2581. end: { line: 1, column: 23 }
  2582. }
  2583. },
  2584. range: [0, 23],
  2585. loc: {
  2586. start: { line: 1, column: 0 },
  2587. end: { line: 1, column: 23 }
  2588. }
  2589. },
  2590. 'x = { set method(val) v = val }': {
  2591. type: 'ExpressionStatement',
  2592. expression: {
  2593. type: 'AssignmentExpression',
  2594. operator: '=',
  2595. left: {
  2596. type: 'Identifier',
  2597. name: 'x',
  2598. range: [0, 1],
  2599. loc: {
  2600. start: { line: 1, column: 0 },
  2601. end: { line: 1, column: 1 }
  2602. }
  2603. },
  2604. right: {
  2605. type: 'ObjectExpression',
  2606. properties: [{
  2607. type: 'Property',
  2608. key: {
  2609. type: 'Identifier',
  2610. name: 'method',
  2611. range: [10, 16],
  2612. loc: {
  2613. start: { line: 1, column: 10 },
  2614. end: { line: 1, column: 16 }
  2615. }
  2616. },
  2617. value: {
  2618. type: 'FunctionExpression',
  2619. id: null,
  2620. params: [{
  2621. type: 'Identifier',
  2622. name: 'val',
  2623. range: [17, 20],
  2624. loc: {
  2625. start: { line: 1, column: 17 },
  2626. end: { line: 1, column: 20 }
  2627. }
  2628. }],
  2629. defaults: [],
  2630. body: {
  2631. type: 'AssignmentExpression',
  2632. operator: '=',
  2633. left: {
  2634. type: 'Identifier',
  2635. name: 'v',
  2636. range: [22, 23],
  2637. loc: {
  2638. start: { line: 1, column: 22 },
  2639. end: { line: 1, column: 23 }
  2640. }
  2641. },
  2642. right: {
  2643. type: 'Identifier',
  2644. name: 'val',
  2645. range: [26, 29],
  2646. loc: {
  2647. start: { line: 1, column: 26 },
  2648. end: { line: 1, column: 29 }
  2649. }
  2650. },
  2651. range: [22, 29],
  2652. loc: {
  2653. start: { line: 1, column: 22 },
  2654. end: { line: 1, column: 29 }
  2655. }
  2656. },
  2657. rest: null,
  2658. generator: false,
  2659. expression: true,
  2660. range: [22, 29],
  2661. loc: {
  2662. start: { line: 1, column: 22 },
  2663. end: { line: 1, column: 29 }
  2664. }
  2665. },
  2666. kind: 'set',
  2667. method: false,
  2668. shorthand: false,
  2669. range: [6, 29],
  2670. loc: {
  2671. start: { line: 1, column: 6 },
  2672. end: { line: 1, column: 29 }
  2673. }
  2674. }],
  2675. range: [4, 31],
  2676. loc: {
  2677. start: { line: 1, column: 4 },
  2678. end: { line: 1, column: 31 }
  2679. }
  2680. },
  2681. range: [0, 31],
  2682. loc: {
  2683. start: { line: 1, column: 0 },
  2684. end: { line: 1, column: 31 }
  2685. }
  2686. },
  2687. range: [0, 31],
  2688. loc: {
  2689. start: { line: 1, column: 0 },
  2690. end: { line: 1, column: 31 }
  2691. }
  2692. }
  2693. },
  2694. 'Array Comprehension': {
  2695. '[[x,b,c] for (x in []) for (b in []) if (b && c)]' : {
  2696. type: 'ExpressionStatement',
  2697. expression: {
  2698. type: 'ComprehensionExpression',
  2699. filter: {
  2700. type: 'LogicalExpression',
  2701. operator: '&&',
  2702. left: {
  2703. type: 'Identifier',
  2704. name: 'b',
  2705. range: [41, 42],
  2706. loc: {
  2707. start: { line: 1, column: 41 },
  2708. end: { line: 1, column: 42 }
  2709. }
  2710. },
  2711. right: {
  2712. type: 'Identifier',
  2713. name: 'c',
  2714. range: [46, 47],
  2715. loc: {
  2716. start: { line: 1, column: 46 },
  2717. end: { line: 1, column: 47 }
  2718. }
  2719. },
  2720. range: [41, 47],
  2721. loc: {
  2722. start: { line: 1, column: 41 },
  2723. end: { line: 1, column: 47 }
  2724. }
  2725. },
  2726. blocks: [{
  2727. type: 'ComprehensionBlock',
  2728. left: {
  2729. type: 'Identifier',
  2730. name: 'x',
  2731. range: [14, 15],
  2732. loc: {
  2733. start: { line: 1, column: 14 },
  2734. end: { line: 1, column: 15 }
  2735. }
  2736. },
  2737. right: {
  2738. type: 'ArrayExpression',
  2739. elements: [],
  2740. range: [19, 21],
  2741. loc: {
  2742. start: { line: 1, column: 19 },
  2743. end: { line: 1, column: 21 }
  2744. }
  2745. },
  2746. each: false,
  2747. of: false
  2748. }, {
  2749. type: 'ComprehensionBlock',
  2750. left: {
  2751. type: 'Identifier',
  2752. name: 'b',
  2753. range: [28, 29],
  2754. loc: {
  2755. start: { line: 1, column: 28 },
  2756. end: { line: 1, column: 29 }
  2757. }
  2758. },
  2759. right: {
  2760. type: 'ArrayExpression',
  2761. elements: [],
  2762. range: [33, 35],
  2763. loc: {
  2764. start: { line: 1, column: 33 },
  2765. end: { line: 1, column: 35 }
  2766. }
  2767. },
  2768. each: false,
  2769. of: false
  2770. }],
  2771. body: {
  2772. type: 'ArrayExpression',
  2773. elements: [{
  2774. type: 'Identifier',
  2775. name: 'x',
  2776. range: [2, 3],
  2777. loc: {
  2778. start: { line: 1, column: 2 },
  2779. end: { line: 1, column: 3 }
  2780. }
  2781. }, {
  2782. type: 'Identifier',
  2783. name: 'b',
  2784. range: [4, 5],
  2785. loc: {
  2786. start: { line: 1, column: 4 },
  2787. end: { line: 1, column: 5 }
  2788. }
  2789. }, {
  2790. type: 'Identifier',
  2791. name: 'c',
  2792. range: [6, 7],
  2793. loc: {
  2794. start: { line: 1, column: 6 },
  2795. end: { line: 1, column: 7 }
  2796. }
  2797. }],
  2798. range: [1, 8],
  2799. loc: {
  2800. start: { line: 1, column: 1 },
  2801. end: { line: 1, column: 8 }
  2802. }
  2803. },
  2804. range: [0, 49],
  2805. loc: {
  2806. start: { line: 1, column: 0 },
  2807. end: { line: 1, column: 49 }
  2808. }
  2809. },
  2810. range: [0, 49],
  2811. loc: {
  2812. start: { line: 1, column: 0 },
  2813. end: { line: 1, column: 49 }
  2814. }
  2815. },
  2816. '[x for (a in [])]' : {
  2817. type: 'ExpressionStatement',
  2818. expression: {
  2819. type: 'ComprehensionExpression',
  2820. filter: null,
  2821. blocks: [{
  2822. type: 'ComprehensionBlock',
  2823. left: {
  2824. type: 'Identifier',
  2825. name: 'a',
  2826. range: [8, 9],
  2827. loc: {
  2828. start: { line: 1, column: 8 },
  2829. end: { line: 1, column: 9 }
  2830. }
  2831. },
  2832. right: {
  2833. type: 'ArrayExpression',
  2834. elements: [],
  2835. range: [13, 15],
  2836. loc: {
  2837. start: { line: 1, column: 13 },
  2838. end: { line: 1, column: 15 }
  2839. }
  2840. },
  2841. each: false,
  2842. of: false
  2843. }],
  2844. body: {
  2845. type: 'Identifier',
  2846. name: 'x',
  2847. range: [1, 2],
  2848. loc: {
  2849. start: { line: 1, column: 1 },
  2850. end: { line: 1, column: 2 }
  2851. }
  2852. },
  2853. range: [0, 17],
  2854. loc: {
  2855. start: { line: 1, column: 0 },
  2856. end: { line: 1, column: 17 }
  2857. }
  2858. },
  2859. range: [0, 17],
  2860. loc: {
  2861. start: { line: 1, column: 0 },
  2862. end: { line: 1, column: 17 }
  2863. }
  2864. },
  2865. '[1 for (x in [])]' : {
  2866. type: 'ExpressionStatement',
  2867. expression: {
  2868. type: 'ComprehensionExpression',
  2869. filter: null,
  2870. blocks: [{
  2871. type: 'ComprehensionBlock',
  2872. left: {
  2873. type: 'Identifier',
  2874. name: 'x',
  2875. range: [8, 9],
  2876. loc: {
  2877. start: { line: 1, column: 8 },
  2878. end: { line: 1, column: 9 }
  2879. }
  2880. },
  2881. right: {
  2882. type: 'ArrayExpression',
  2883. elements: [],
  2884. range: [13, 15],
  2885. loc: {
  2886. start: { line: 1, column: 13 },
  2887. end: { line: 1, column: 15 }
  2888. }
  2889. },
  2890. each: false,
  2891. of: false
  2892. }],
  2893. body: {
  2894. type: 'Literal',
  2895. value: 1,
  2896. raw: '1',
  2897. range: [1, 2],
  2898. loc: {
  2899. start: { line: 1, column: 1 },
  2900. end: { line: 1, column: 2 }
  2901. }
  2902. },
  2903. range: [0, 17],
  2904. loc: {
  2905. start: { line: 1, column: 0 },
  2906. end: { line: 1, column: 17 }
  2907. }
  2908. },
  2909. range: [0, 17],
  2910. loc: {
  2911. start: { line: 1, column: 0 },
  2912. end: { line: 1, column: 17 }
  2913. }
  2914. },
  2915. '[(x,1) for (x in [])]' : {
  2916. type: 'ExpressionStatement',
  2917. expression: {
  2918. type: 'ComprehensionExpression',
  2919. filter: null,
  2920. blocks: [{
  2921. type: 'ComprehensionBlock',
  2922. left: {
  2923. type: 'Identifier',
  2924. name: 'x',
  2925. range: [12, 13],
  2926. loc: {
  2927. start: { line: 1, column: 12 },
  2928. end: { line: 1, column: 13 }
  2929. }
  2930. },
  2931. right: {
  2932. type: 'ArrayExpression',
  2933. elements: [],
  2934. range: [17, 19],
  2935. loc: {
  2936. start: { line: 1, column: 17 },
  2937. end: { line: 1, column: 19 }
  2938. }
  2939. },
  2940. each: false,
  2941. of: false
  2942. }],
  2943. body: {
  2944. type: 'SequenceExpression',
  2945. expressions: [{
  2946. type: 'Identifier',
  2947. name: 'x',
  2948. range: [2, 3],
  2949. loc: {
  2950. start: { line: 1, column: 2 },
  2951. end: { line: 1, column: 3 }
  2952. }
  2953. }, {
  2954. type: 'Literal',
  2955. value: 1,
  2956. raw: '1',
  2957. range: [4, 5],
  2958. loc: {
  2959. start: { line: 1, column: 4 },
  2960. end: { line: 1, column: 5 }
  2961. }
  2962. }],
  2963. range: [2, 5],
  2964. loc: {
  2965. start: { line: 1, column: 2 },
  2966. end: { line: 1, column: 5 }
  2967. }
  2968. },
  2969. range: [0, 21],
  2970. loc: {
  2971. start: { line: 1, column: 0 },
  2972. end: { line: 1, column: 21 }
  2973. }
  2974. },
  2975. range: [0, 21],
  2976. loc: {
  2977. start: { line: 1, column: 0 },
  2978. end: { line: 1, column: 21 }
  2979. }
  2980. },
  2981. '[x for (x of array)]': {
  2982. type: 'ExpressionStatement',
  2983. expression: {
  2984. type: 'ComprehensionExpression',
  2985. filter: null,
  2986. blocks: [{
  2987. type: 'ComprehensionBlock',
  2988. left: {
  2989. type: 'Identifier',
  2990. name: 'x',
  2991. range: [8, 9],
  2992. loc: {
  2993. start: { line: 1, column: 8 },
  2994. end: { line: 1, column: 9 }
  2995. }
  2996. },
  2997. right: {
  2998. type: 'Identifier',
  2999. name: 'array',
  3000. range: [13, 18],
  3001. loc: {
  3002. start: { line: 1, column: 13 },
  3003. end: { line: 1, column: 18 }
  3004. }
  3005. },
  3006. of: true
  3007. }],
  3008. body: {
  3009. type: 'Identifier',
  3010. name: 'x',
  3011. range: [1, 2],
  3012. loc: {
  3013. start: { line: 1, column: 1 },
  3014. end: { line: 1, column: 2 }
  3015. }
  3016. },
  3017. range: [0, 20],
  3018. loc: {
  3019. start: { line: 1, column: 0 },
  3020. end: { line: 1, column: 20 }
  3021. }
  3022. },
  3023. range: [0, 20],
  3024. loc: {
  3025. start: { line: 1, column: 0 },
  3026. end: { line: 1, column: 20 }
  3027. }
  3028. },
  3029. '[x for (x of array) for (y of array2) if (x === test)]': {
  3030. type: 'ExpressionStatement',
  3031. expression: {
  3032. type: 'ComprehensionExpression',
  3033. filter: {
  3034. type: 'BinaryExpression',
  3035. operator: '===',
  3036. left: {
  3037. type: 'Identifier',
  3038. name: 'x',
  3039. range: [42, 43],
  3040. loc: {
  3041. start: { line: 1, column: 42 },
  3042. end: { line: 1, column: 43 }
  3043. }
  3044. },
  3045. right: {
  3046. type: 'Identifier',
  3047. name: 'test',
  3048. range: [48, 52],
  3049. loc: {
  3050. start: { line: 1, column: 48 },
  3051. end: { line: 1, column: 52 }
  3052. }
  3053. },
  3054. range: [42, 52],
  3055. loc: {
  3056. start: { line: 1, column: 42 },
  3057. end: { line: 1, column: 52 }
  3058. }
  3059. },
  3060. blocks: [{
  3061. type: 'ComprehensionBlock',
  3062. left: {
  3063. type: 'Identifier',
  3064. name: 'x',
  3065. range: [8, 9],
  3066. loc: {
  3067. start: { line: 1, column: 8 },
  3068. end: { line: 1, column: 9 }
  3069. }
  3070. },
  3071. right: {
  3072. type: 'Identifier',
  3073. name: 'array',
  3074. range: [13, 18],
  3075. loc: {
  3076. start: { line: 1, column: 13 },
  3077. end: { line: 1, column: 18 }
  3078. }
  3079. },
  3080. of: true
  3081. }, {
  3082. type: 'ComprehensionBlock',
  3083. left: {
  3084. type: 'Identifier',
  3085. name: 'y',
  3086. range: [25, 26],
  3087. loc: {
  3088. start: { line: 1, column: 25 },
  3089. end: { line: 1, column: 26 }
  3090. }
  3091. },
  3092. right: {
  3093. type: 'Identifier',
  3094. name: 'array2',
  3095. range: [30, 36],
  3096. loc: {
  3097. start: { line: 1, column: 30 },
  3098. end: { line: 1, column: 36 }
  3099. }
  3100. },
  3101. of: true
  3102. }],
  3103. body: {
  3104. type: 'Identifier',
  3105. name: 'x',
  3106. range: [1, 2],
  3107. loc: {
  3108. start: { line: 1, column: 1 },
  3109. end: { line: 1, column: 2 }
  3110. }
  3111. },
  3112. range: [0, 54],
  3113. loc: {
  3114. start: { line: 1, column: 0 },
  3115. end: { line: 1, column: 54 }
  3116. }
  3117. },
  3118. range: [0, 54],
  3119. loc: {
  3120. start: { line: 1, column: 0 },
  3121. end: { line: 1, column: 54 }
  3122. }
  3123. }
  3124. },
  3125. // http://wiki.ecmascript.org/doku.php?id=harmony:object_literals#object_literal_property_value_shorthand
  3126. 'Harmony: Object Literal Property Value Shorthand': {
  3127. 'x = { y, z }': {
  3128. type: 'ExpressionStatement',
  3129. expression: {
  3130. type: 'AssignmentExpression',
  3131. operator: '=',
  3132. left: {
  3133. type: 'Identifier',
  3134. name: 'x',
  3135. range: [0, 1],
  3136. loc: {
  3137. start: { line: 1, column: 0 },
  3138. end: { line: 1, column: 1 }
  3139. }
  3140. },
  3141. right: {
  3142. type: 'ObjectExpression',
  3143. properties: [{
  3144. type: 'Property',
  3145. key: {
  3146. type: 'Identifier',
  3147. name: 'y',
  3148. range: [6, 7],
  3149. loc: {
  3150. start: { line: 1, column: 6 },
  3151. end: { line: 1, column: 7 }
  3152. }
  3153. },
  3154. value: {
  3155. type: 'Identifier',
  3156. name: 'y',
  3157. range: [6, 7],
  3158. loc: {
  3159. start: { line: 1, column: 6 },
  3160. end: { line: 1, column: 7 }
  3161. }
  3162. },
  3163. kind: 'init',
  3164. method: false,
  3165. shorthand: true,
  3166. range: [6, 7],
  3167. loc: {
  3168. start: { line: 1, column: 6 },
  3169. end: { line: 1, column: 7 }
  3170. }
  3171. }, {
  3172. type: 'Property',
  3173. key: {
  3174. type: 'Identifier',
  3175. name: 'z',
  3176. range: [9, 10],
  3177. loc: {
  3178. start: { line: 1, column: 9 },
  3179. end: { line: 1, column: 10 }
  3180. }
  3181. },
  3182. value: {
  3183. type: 'Identifier',
  3184. name: 'z',
  3185. range: [9, 10],
  3186. loc: {
  3187. start: { line: 1, column: 9 },
  3188. end: { line: 1, column: 10 }
  3189. }
  3190. },
  3191. kind: 'init',
  3192. method: false,
  3193. shorthand: true,
  3194. range: [9, 10],
  3195. loc: {
  3196. start: { line: 1, column: 9 },
  3197. end: { line: 1, column: 10 }
  3198. }
  3199. }],
  3200. range: [4, 12],
  3201. loc: {
  3202. start: { line: 1, column: 4 },
  3203. end: { line: 1, column: 12 }
  3204. }
  3205. },
  3206. range: [0, 12],
  3207. loc: {
  3208. start: { line: 1, column: 0 },
  3209. end: { line: 1, column: 12 }
  3210. }
  3211. },
  3212. range: [0, 12],
  3213. loc: {
  3214. start: { line: 1, column: 0 },
  3215. end: { line: 1, column: 12 }
  3216. }
  3217. }
  3218. },
  3219. // http://wiki.ecmascript.org/doku.php?id=harmony:destructuring
  3220. 'Harmony: Destructuring': {
  3221. '[a, b] = [b, a]': {
  3222. type: 'ExpressionStatement',
  3223. expression: {
  3224. type: 'AssignmentExpression',
  3225. operator: '=',
  3226. left: {
  3227. type: 'ArrayPattern',
  3228. elements: [{
  3229. type: 'Identifier',
  3230. name: 'a',
  3231. range: [1, 2],
  3232. loc: {
  3233. start: { line: 1, column: 1 },
  3234. end: { line: 1, column: 2 }
  3235. }
  3236. }, {
  3237. type: 'Identifier',
  3238. name: 'b',
  3239. range: [4, 5],
  3240. loc: {
  3241. start: { line: 1, column: 4 },
  3242. end: { line: 1, column: 5 }
  3243. }
  3244. }],
  3245. range: [0, 6],
  3246. loc: {
  3247. start: { line: 1, column: 0 },
  3248. end: { line: 1, column: 6 }
  3249. }
  3250. },
  3251. right: {
  3252. type: 'ArrayExpression',
  3253. elements: [{
  3254. type: 'Identifier',
  3255. name: 'b',
  3256. range: [10, 11],
  3257. loc: {
  3258. start: { line: 1, column: 10 },
  3259. end: { line: 1, column: 11 }
  3260. }
  3261. }, {
  3262. type: 'Identifier',
  3263. name: 'a',
  3264. range: [13, 14],
  3265. loc: {
  3266. start: { line: 1, column: 13 },
  3267. end: { line: 1, column: 14 }
  3268. }
  3269. }],
  3270. range: [9, 15],
  3271. loc: {
  3272. start: { line: 1, column: 9 },
  3273. end: { line: 1, column: 15 }
  3274. }
  3275. },
  3276. range: [0, 15],
  3277. loc: {
  3278. start: { line: 1, column: 0 },
  3279. end: { line: 1, column: 15 }
  3280. }
  3281. },
  3282. range: [0, 15],
  3283. loc: {
  3284. start: { line: 1, column: 0 },
  3285. end: { line: 1, column: 15 }
  3286. }
  3287. },
  3288. '({ responseText: text }) = res': {
  3289. type: 'ExpressionStatement',
  3290. expression: {
  3291. type: 'AssignmentExpression',
  3292. operator: '=',
  3293. left: {
  3294. type: 'ObjectPattern',
  3295. properties: [{
  3296. type: 'Property',
  3297. key: {
  3298. type: 'Identifier',
  3299. name: 'responseText',
  3300. range: [3, 15],
  3301. loc: {
  3302. start: { line: 1, column: 3 },
  3303. end: { line: 1, column: 15 }
  3304. }
  3305. },
  3306. value: {
  3307. type: 'Identifier',
  3308. name: 'text',
  3309. range: [17, 21],
  3310. loc: {
  3311. start: { line: 1, column: 17 },
  3312. end: { line: 1, column: 21 }
  3313. }
  3314. },
  3315. kind: 'init',
  3316. method: false,
  3317. shorthand: false,
  3318. range: [3, 21],
  3319. loc: {
  3320. start: { line: 1, column: 3 },
  3321. end: { line: 1, column: 21 }
  3322. }
  3323. }],
  3324. range: [1, 23],
  3325. loc: {
  3326. start: { line: 1, column: 1 },
  3327. end: { line: 1, column: 23 }
  3328. }
  3329. },
  3330. right: {
  3331. type: 'Identifier',
  3332. name: 'res',
  3333. range: [27, 30],
  3334. loc: {
  3335. start: { line: 1, column: 27 },
  3336. end: { line: 1, column: 30 }
  3337. }
  3338. },
  3339. range: [0, 30],
  3340. loc: {
  3341. start: { line: 1, column: 0 },
  3342. end: { line: 1, column: 30 }
  3343. }
  3344. },
  3345. range: [0, 30],
  3346. loc: {
  3347. start: { line: 1, column: 0 },
  3348. end: { line: 1, column: 30 }
  3349. }
  3350. },
  3351. 'const {a} = {}': {
  3352. type: 'VariableDeclaration',
  3353. declarations: [{
  3354. type: 'VariableDeclarator',
  3355. id: {
  3356. type: 'ObjectPattern',
  3357. properties: [{
  3358. type: 'Property',
  3359. key: {
  3360. type: 'Identifier',
  3361. name: 'a',
  3362. range: [7, 8],
  3363. loc: {
  3364. start: { line: 1, column: 7 },
  3365. end: { line: 1, column: 8 }
  3366. }
  3367. },
  3368. value: {
  3369. type: 'Identifier',
  3370. name: 'a',
  3371. range: [7, 8],
  3372. loc: {
  3373. start: { line: 1, column: 7 },
  3374. end: { line: 1, column: 8 }
  3375. }
  3376. },
  3377. kind: 'init',
  3378. method: false,
  3379. shorthand: true,
  3380. range: [7, 8],
  3381. loc: {
  3382. start: { line: 1, column: 7 },
  3383. end: { line: 1, column: 8 }
  3384. }
  3385. }],
  3386. range: [6, 9],
  3387. loc: {
  3388. start: { line: 1, column: 6 },
  3389. end: { line: 1, column: 9 }
  3390. }
  3391. },
  3392. init: {
  3393. type: 'ObjectExpression',
  3394. properties: [],
  3395. range: [12, 14],
  3396. loc: {
  3397. start: { line: 1, column: 12 },
  3398. end: { line: 1, column: 14 }
  3399. }
  3400. },
  3401. range: [6, 14],
  3402. loc: {
  3403. start: { line: 1, column: 6 },
  3404. end: { line: 1, column: 14 }
  3405. }
  3406. }],
  3407. kind: 'const',
  3408. range: [0, 14],
  3409. loc: {
  3410. start: { line: 1, column: 0 },
  3411. end: { line: 1, column: 14 }
  3412. }
  3413. },
  3414. 'const [a] = []': {
  3415. type: 'VariableDeclaration',
  3416. declarations: [{
  3417. type: 'VariableDeclarator',
  3418. id: {
  3419. type: 'ArrayPattern',
  3420. elements: [{
  3421. type: 'Identifier',
  3422. name: 'a',
  3423. range: [7, 8],
  3424. loc: {
  3425. start: { line: 1, column: 7 },
  3426. end: { line: 1, column: 8 }
  3427. }
  3428. }],
  3429. range: [6, 9],
  3430. loc: {
  3431. start: { line: 1, column: 6 },
  3432. end: { line: 1, column: 9 }
  3433. }
  3434. },
  3435. init: {
  3436. type: 'ArrayExpression',
  3437. elements: [],
  3438. range: [12, 14],
  3439. loc: {
  3440. start: { line: 1, column: 12 },
  3441. end: { line: 1, column: 14 }
  3442. }
  3443. },
  3444. range: [6, 14],
  3445. loc: {
  3446. start: { line: 1, column: 6 },
  3447. end: { line: 1, column: 14 }
  3448. }
  3449. }],
  3450. kind: 'const',
  3451. range: [0, 14],
  3452. loc: {
  3453. start: { line: 1, column: 0 },
  3454. end: { line: 1, column: 14 }
  3455. }
  3456. },
  3457. 'let {a} = {}': {
  3458. type: 'VariableDeclaration',
  3459. declarations: [{
  3460. type: 'VariableDeclarator',
  3461. id: {
  3462. type: 'ObjectPattern',
  3463. properties: [{
  3464. type: 'Property',
  3465. key: {
  3466. type: 'Identifier',
  3467. name: 'a',
  3468. range: [5, 6],
  3469. loc: {
  3470. start: { line: 1, column: 5 },
  3471. end: { line: 1, column: 6 }
  3472. }
  3473. },
  3474. value: {
  3475. type: 'Identifier',
  3476. name: 'a',
  3477. range: [5, 6],
  3478. loc: {
  3479. start: { line: 1, column: 5 },
  3480. end: { line: 1, column: 6 }
  3481. }
  3482. },
  3483. kind: 'init',
  3484. method: false,
  3485. shorthand: true,
  3486. range: [5, 6],
  3487. loc: {
  3488. start: { line: 1, column: 5 },
  3489. end: { line: 1, column: 6 }
  3490. }
  3491. }],
  3492. range: [4, 7],
  3493. loc: {
  3494. start: { line: 1, column: 4 },
  3495. end: { line: 1, column: 7 }
  3496. }
  3497. },
  3498. init: {
  3499. type: 'ObjectExpression',
  3500. properties: [],
  3501. range: [10, 12],
  3502. loc: {
  3503. start: { line: 1, column: 10 },
  3504. end: { line: 1, column: 12 }
  3505. }
  3506. },
  3507. range: [4, 12],
  3508. loc: {
  3509. start: { line: 1, column: 4 },
  3510. end: { line: 1, column: 12 }
  3511. }
  3512. }],
  3513. kind: 'let',
  3514. range: [0, 12],
  3515. loc: {
  3516. start: { line: 1, column: 0 },
  3517. end: { line: 1, column: 12 }
  3518. }
  3519. },
  3520. 'let [a] = []': {
  3521. type: 'VariableDeclaration',
  3522. declarations: [{
  3523. type: 'VariableDeclarator',
  3524. id: {
  3525. type: 'ArrayPattern',
  3526. elements: [{
  3527. type: 'Identifier',
  3528. name: 'a',
  3529. range: [5, 6],
  3530. loc: {
  3531. start: { line: 1, column: 5 },
  3532. end: { line: 1, column: 6 }
  3533. }
  3534. }],
  3535. range: [4, 7],
  3536. loc: {
  3537. start: { line: 1, column: 4 },
  3538. end: { line: 1, column: 7 }
  3539. }
  3540. },
  3541. init: {
  3542. type: 'ArrayExpression',
  3543. elements: [],
  3544. range: [10, 12],
  3545. loc: {
  3546. start: { line: 1, column: 10 },
  3547. end: { line: 1, column: 12 }
  3548. }
  3549. },
  3550. range: [4, 12],
  3551. loc: {
  3552. start: { line: 1, column: 4 },
  3553. end: { line: 1, column: 12 }
  3554. }
  3555. }],
  3556. kind: 'let',
  3557. range: [0, 12],
  3558. loc: {
  3559. start: { line: 1, column: 0 },
  3560. end: { line: 1, column: 12 }
  3561. }
  3562. },
  3563. 'var {a} = {}': {
  3564. type: 'VariableDeclaration',
  3565. declarations: [{
  3566. type: 'VariableDeclarator',
  3567. id: {
  3568. type: 'ObjectPattern',
  3569. properties: [{
  3570. type: 'Property',
  3571. key: {
  3572. type: 'Identifier',
  3573. name: 'a',
  3574. range: [5, 6],
  3575. loc: {
  3576. start: { line: 1, column: 5 },
  3577. end: { line: 1, column: 6 }
  3578. }
  3579. },
  3580. value: {
  3581. type: 'Identifier',
  3582. name: 'a',
  3583. range: [5, 6],
  3584. loc: {
  3585. start: { line: 1, column: 5 },
  3586. end: { line: 1, column: 6 }
  3587. }
  3588. },
  3589. kind: 'init',
  3590. method: false,
  3591. shorthand: true,
  3592. range: [5, 6],
  3593. loc: {
  3594. start: { line: 1, column: 5 },
  3595. end: { line: 1, column: 6 }
  3596. }
  3597. }],
  3598. range: [4, 7],
  3599. loc: {
  3600. start: { line: 1, column: 4 },
  3601. end: { line: 1, column: 7 }
  3602. }
  3603. },
  3604. init: {
  3605. type: 'ObjectExpression',
  3606. properties: [],
  3607. range: [10, 12],
  3608. loc: {
  3609. start: { line: 1, column: 10 },
  3610. end: { line: 1, column: 12 }
  3611. }
  3612. },
  3613. range: [4, 12],
  3614. loc: {
  3615. start: { line: 1, column: 4 },
  3616. end: { line: 1, column: 12 }
  3617. }
  3618. }],
  3619. kind: 'var',
  3620. range: [0, 12],
  3621. loc: {
  3622. start: { line: 1, column: 0 },
  3623. end: { line: 1, column: 12 }
  3624. }
  3625. },
  3626. 'var [a] = []': {
  3627. type: 'VariableDeclaration',
  3628. declarations: [{
  3629. type: 'VariableDeclarator',
  3630. id: {
  3631. type: 'ArrayPattern',
  3632. elements: [{
  3633. type: 'Identifier',
  3634. name: 'a',
  3635. range: [5, 6],
  3636. loc: {
  3637. start: { line: 1, column: 5 },
  3638. end: { line: 1, column: 6 }
  3639. }
  3640. }],
  3641. range: [4, 7],
  3642. loc: {
  3643. start: { line: 1, column: 4 },
  3644. end: { line: 1, column: 7 }
  3645. }
  3646. },
  3647. init: {
  3648. type: 'ArrayExpression',
  3649. elements: [],
  3650. range: [10, 12],
  3651. loc: {
  3652. start: { line: 1, column: 10 },
  3653. end: { line: 1, column: 12 }
  3654. }
  3655. },
  3656. range: [4, 12],
  3657. loc: {
  3658. start: { line: 1, column: 4 },
  3659. end: { line: 1, column: 12 }
  3660. }
  3661. }],
  3662. kind: 'var',
  3663. range: [0, 12],
  3664. loc: {
  3665. start: { line: 1, column: 0 },
  3666. end: { line: 1, column: 12 }
  3667. }
  3668. },
  3669. 'const {a:b} = {}': {
  3670. type: 'VariableDeclaration',
  3671. declarations: [{
  3672. type: 'VariableDeclarator',
  3673. id: {
  3674. type: 'ObjectPattern',
  3675. properties: [{
  3676. type: 'Property',
  3677. key: {
  3678. type: 'Identifier',
  3679. name: 'a',
  3680. range: [7, 8],
  3681. loc: {
  3682. start: { line: 1, column: 7 },
  3683. end: { line: 1, column: 8 }
  3684. }
  3685. },
  3686. value: {
  3687. type: 'Identifier',
  3688. name: 'b',
  3689. range: [9, 10],
  3690. loc: {
  3691. start: { line: 1, column: 9 },
  3692. end: { line: 1, column: 10 }
  3693. }
  3694. },
  3695. kind: 'init',
  3696. method: false,
  3697. shorthand: false,
  3698. range: [7, 10],
  3699. loc: {
  3700. start: { line: 1, column: 7 },
  3701. end: { line: 1, column: 10 }
  3702. }
  3703. }],
  3704. range: [6, 11],
  3705. loc: {
  3706. start: { line: 1, column: 6 },
  3707. end: { line: 1, column: 11 }
  3708. }
  3709. },
  3710. init: {
  3711. type: 'ObjectExpression',
  3712. properties: [],
  3713. range: [14, 16],
  3714. loc: {
  3715. start: { line: 1, column: 14 },
  3716. end: { line: 1, column: 16 }
  3717. }
  3718. },
  3719. range: [6, 16],
  3720. loc: {
  3721. start: { line: 1, column: 6 },
  3722. end: { line: 1, column: 16 }
  3723. }
  3724. }],
  3725. kind: 'const',
  3726. range: [0, 16],
  3727. loc: {
  3728. start: { line: 1, column: 0 },
  3729. end: { line: 1, column: 16 }
  3730. }
  3731. },
  3732. 'let {a:b} = {}': {
  3733. type: 'VariableDeclaration',
  3734. declarations: [{
  3735. type: 'VariableDeclarator',
  3736. id: {
  3737. type: 'ObjectPattern',
  3738. properties: [{
  3739. type: 'Property',
  3740. key: {
  3741. type: 'Identifier',
  3742. name: 'a',
  3743. range: [5, 6],
  3744. loc: {
  3745. start: { line: 1, column: 5 },
  3746. end: { line: 1, column: 6 }
  3747. }
  3748. },
  3749. value: {
  3750. type: 'Identifier',
  3751. name: 'b',
  3752. range: [7, 8],
  3753. loc: {
  3754. start: { line: 1, column: 7 },
  3755. end: { line: 1, column: 8 }
  3756. }
  3757. },
  3758. kind: 'init',
  3759. method: false,
  3760. shorthand: false,
  3761. range: [5, 8],
  3762. loc: {
  3763. start: { line: 1, column: 5 },
  3764. end: { line: 1, column: 8 }
  3765. }
  3766. }],
  3767. range: [4, 9],
  3768. loc: {
  3769. start: { line: 1, column: 4 },
  3770. end: { line: 1, column: 9 }
  3771. }
  3772. },
  3773. init: {
  3774. type: 'ObjectExpression',
  3775. properties: [],
  3776. range: [12, 14],
  3777. loc: {
  3778. start: { line: 1, column: 12 },
  3779. end: { line: 1, column: 14 }
  3780. }
  3781. },
  3782. range: [4, 14],
  3783. loc: {
  3784. start: { line: 1, column: 4 },
  3785. end: { line: 1, column: 14 }
  3786. }
  3787. }],
  3788. kind: 'let',
  3789. range: [0, 14],
  3790. loc: {
  3791. start: { line: 1, column: 0 },
  3792. end: { line: 1, column: 14 }
  3793. }
  3794. },
  3795. 'var {a:b} = {}': {
  3796. type: 'VariableDeclaration',
  3797. declarations: [{
  3798. type: 'VariableDeclarator',
  3799. id: {
  3800. type: 'ObjectPattern',
  3801. properties: [{
  3802. type: 'Property',
  3803. key: {
  3804. type: 'Identifier',
  3805. name: 'a',
  3806. range: [5, 6],
  3807. loc: {
  3808. start: { line: 1, column: 5 },
  3809. end: { line: 1, column: 6 }
  3810. }
  3811. },
  3812. value: {
  3813. type: 'Identifier',
  3814. name: 'b',
  3815. range: [7, 8],
  3816. loc: {
  3817. start: { line: 1, column: 7 },
  3818. end: { line: 1, column: 8 }
  3819. }
  3820. },
  3821. kind: 'init',
  3822. method: false,
  3823. shorthand: false,
  3824. range: [5, 8],
  3825. loc: {
  3826. start: { line: 1, column: 5 },
  3827. end: { line: 1, column: 8 }
  3828. }
  3829. }],
  3830. range: [4, 9],
  3831. loc: {
  3832. start: { line: 1, column: 4 },
  3833. end: { line: 1, column: 9 }
  3834. }
  3835. },
  3836. init: {
  3837. type: 'ObjectExpression',
  3838. properties: [],
  3839. range: [12, 14],
  3840. loc: {
  3841. start: { line: 1, column: 12 },
  3842. end: { line: 1, column: 14 }
  3843. }
  3844. },
  3845. range: [4, 14],
  3846. loc: {
  3847. start: { line: 1, column: 4 },
  3848. end: { line: 1, column: 14 }
  3849. }
  3850. }],
  3851. kind: 'var',
  3852. range: [0, 14],
  3853. loc: {
  3854. start: { line: 1, column: 0 },
  3855. end: { line: 1, column: 14 }
  3856. }
  3857. }
  3858. },
  3859. // http://wiki.ecmascript.org/doku.php?id=harmony:modules
  3860. 'Harmony: Modules': {
  3861. 'module "crypto" {}': {
  3862. type: 'ModuleDeclaration',
  3863. id: {
  3864. type: 'Literal',
  3865. value: 'crypto',
  3866. raw: '"crypto"',
  3867. range: [7, 15],
  3868. loc: {
  3869. start: { line: 1, column: 7 },
  3870. end: { line: 1, column: 15 }
  3871. }
  3872. },
  3873. source: null,
  3874. body: {
  3875. type: 'BlockStatement',
  3876. body: [],
  3877. range: [16, 18],
  3878. loc: {
  3879. start: { line: 1, column: 16 },
  3880. end: { line: 1, column: 18 }
  3881. }
  3882. },
  3883. range: [0, 18],
  3884. loc: {
  3885. start: { line: 1, column: 0 },
  3886. end: { line: 1, column: 18 }
  3887. }
  3888. },
  3889. 'module crypto from "crypto";': {
  3890. type: 'ModuleDeclaration',
  3891. id: {
  3892. type: 'Identifier',
  3893. name: 'crypto',
  3894. range: [7, 13],
  3895. loc: {
  3896. start: { line: 1, column: 7 },
  3897. end: { line: 1, column: 13 }
  3898. }
  3899. },
  3900. source: {
  3901. type: 'Literal',
  3902. value: 'crypto',
  3903. raw: '"crypto"',
  3904. range: [19, 27],
  3905. loc: {
  3906. start: { line: 1, column: 19 },
  3907. end: { line: 1, column: 27 }
  3908. }
  3909. },
  3910. body: null,
  3911. range: [0, 28],
  3912. loc: {
  3913. start: { line: 1, column: 0 },
  3914. end: { line: 1, column: 28 }
  3915. }
  3916. },
  3917. 'module "crypto/e" {}': {
  3918. type: 'ModuleDeclaration',
  3919. id: {
  3920. type: 'Literal',
  3921. value: 'crypto/e',
  3922. raw: '"crypto/e"',
  3923. range: [7, 17],
  3924. loc: {
  3925. start: { line: 1, column: 7 },
  3926. end: { line: 1, column: 17 }
  3927. }
  3928. },
  3929. source: null,
  3930. body: {
  3931. type: 'BlockStatement',
  3932. body: [],
  3933. range: [18, 20],
  3934. loc: {
  3935. start: { line: 1, column: 18 },
  3936. end: { line: 1, column: 20 }
  3937. }
  3938. },
  3939. range: [0, 20],
  3940. loc: {
  3941. start: { line: 1, column: 0 },
  3942. end: { line: 1, column: 20 }
  3943. }
  3944. },
  3945. 'export var document': {
  3946. type: 'ExportDeclaration',
  3947. declaration: {
  3948. type: 'VariableDeclaration',
  3949. declarations: [{
  3950. type: 'VariableDeclarator',
  3951. id: {
  3952. type: 'Identifier',
  3953. name: 'document',
  3954. range: [ 11, 19 ],
  3955. loc: {
  3956. start: { line: 1, column: 11 },
  3957. end: { line: 1, column: 19 }
  3958. }
  3959. },
  3960. init: null,
  3961. range: [ 11, 19 ],
  3962. loc: {
  3963. start: { line: 1, column: 11 },
  3964. end: { line: 1, column: 19 }
  3965. }
  3966. }],
  3967. kind: 'var',
  3968. range: [ 7, 19 ],
  3969. loc: {
  3970. start: { line: 1, column: 7 },
  3971. end: { line: 1, column: 19 }
  3972. }
  3973. },
  3974. specifiers: null,
  3975. source: null,
  3976. range: [ 0, 19 ],
  3977. loc: {
  3978. start: { line: 1, column: 0 },
  3979. end: { line: 1, column: 19 }
  3980. }
  3981. },
  3982. 'export var document = { }': {
  3983. type: 'ExportDeclaration',
  3984. declaration: {
  3985. type: 'VariableDeclaration',
  3986. declarations: [{
  3987. type: 'VariableDeclarator',
  3988. id: {
  3989. type: 'Identifier',
  3990. name: 'document',
  3991. range: [ 11, 19 ],
  3992. loc: {
  3993. start: { line: 1, column: 11 },
  3994. end: { line: 1, column: 19 }
  3995. }
  3996. },
  3997. init: {
  3998. type: 'ObjectExpression',
  3999. properties: [],
  4000. range: [ 22, 25 ],
  4001. loc: {
  4002. start: { line: 1, column: 22 },
  4003. end: { line: 1, column: 25 }
  4004. }
  4005. },
  4006. range: [ 11, 25 ],
  4007. loc: {
  4008. start: { line: 1, column: 11 },
  4009. end: { line: 1, column: 25 }
  4010. }
  4011. }],
  4012. kind: 'var',
  4013. range: [ 7, 25 ],
  4014. loc: {
  4015. start: { line: 1, column: 7 },
  4016. end: { line: 1, column: 25 }
  4017. }
  4018. },
  4019. specifiers: null,
  4020. source: null,
  4021. range: [ 0, 25 ],
  4022. loc: {
  4023. start: { line: 1, column: 0 },
  4024. end: { line: 1, column: 25 }
  4025. }
  4026. },
  4027. 'export let document': {
  4028. type: 'ExportDeclaration',
  4029. declaration: {
  4030. type: 'VariableDeclaration',
  4031. declarations: [{
  4032. type: 'VariableDeclarator',
  4033. id: {
  4034. type: 'Identifier',
  4035. name: 'document',
  4036. range: [ 11, 19 ],
  4037. loc: {
  4038. start: { line: 1, column: 11 },
  4039. end: { line: 1, column: 19 }
  4040. }
  4041. },
  4042. init: null,
  4043. range: [ 11, 19 ],
  4044. loc: {
  4045. start: { line: 1, column: 11 },
  4046. end: { line: 1, column: 19 }
  4047. }
  4048. }],
  4049. kind: 'let',
  4050. range: [ 7, 19 ],
  4051. loc: {
  4052. start: { line: 1, column: 7 },
  4053. end: { line: 1, column: 19 }
  4054. }
  4055. },
  4056. specifiers: null,
  4057. source: null,
  4058. range: [ 0, 19 ],
  4059. loc: {
  4060. start: { line: 1, column: 0 },
  4061. end: { line: 1, column: 19 }
  4062. }
  4063. },
  4064. 'export let document = { }': {
  4065. type: 'ExportDeclaration',
  4066. declaration: {
  4067. type: 'VariableDeclaration',
  4068. declarations: [{
  4069. type: 'VariableDeclarator',
  4070. id: {
  4071. type: 'Identifier',
  4072. name: 'document',
  4073. range: [ 11, 19 ],
  4074. loc: {
  4075. start: { line: 1, column: 11 },
  4076. end: { line: 1, column: 19 }
  4077. }
  4078. },
  4079. init: {
  4080. type: 'ObjectExpression',
  4081. properties: [],
  4082. range: [ 22, 25 ],
  4083. loc: {
  4084. start: { line: 1, column: 22 },
  4085. end: { line: 1, column: 25 }
  4086. }
  4087. },
  4088. range: [ 11, 25 ],
  4089. loc: {
  4090. start: { line: 1, column: 11 },
  4091. end: { line: 1, column: 25 }
  4092. }
  4093. }],
  4094. kind: 'let',
  4095. range: [ 7, 25 ],
  4096. loc: {
  4097. start: { line: 1, column: 7 },
  4098. end: { line: 1, column: 25 }
  4099. }
  4100. },
  4101. specifiers: null,
  4102. source: null,
  4103. range: [ 0, 25 ],
  4104. loc: {
  4105. start: { line: 1, column: 0 },
  4106. end: { line: 1, column: 25 }
  4107. }
  4108. },
  4109. 'export const document = { }': {
  4110. type: 'ExportDeclaration',
  4111. declaration: {
  4112. type: 'VariableDeclaration',
  4113. declarations: [{
  4114. type: 'VariableDeclarator',
  4115. id: {
  4116. type: 'Identifier',
  4117. name: 'document',
  4118. range: [ 13, 21 ],
  4119. loc: {
  4120. start: { line: 1, column: 13 },
  4121. end: { line: 1, column: 21 }
  4122. }
  4123. },
  4124. init: {
  4125. type: 'ObjectExpression',
  4126. properties: [],
  4127. range: [ 24, 27 ],
  4128. loc: {
  4129. start: { line: 1, column: 24 },
  4130. end: { line: 1, column: 27 }
  4131. }
  4132. },
  4133. range: [ 13, 27 ],
  4134. loc: {
  4135. start: { line: 1, column: 13 },
  4136. end: { line: 1, column: 27 }
  4137. }
  4138. }],
  4139. kind: 'const',
  4140. range: [ 7, 27 ],
  4141. loc: {
  4142. start: { line: 1, column: 7 },
  4143. end: { line: 1, column: 27 }
  4144. }
  4145. },
  4146. specifiers: null,
  4147. source: null,
  4148. range: [ 0, 27 ],
  4149. loc: {
  4150. start: { line: 1, column: 0 },
  4151. end: { line: 1, column: 27 }
  4152. }
  4153. },
  4154. 'export function parse() { }': {
  4155. type: 'ExportDeclaration',
  4156. declaration: {
  4157. type: 'FunctionDeclaration',
  4158. id: {
  4159. type: 'Identifier',
  4160. name: 'parse',
  4161. range: [ 16, 21 ],
  4162. loc: {
  4163. start: { line: 1, column: 16 },
  4164. end: { line: 1, column: 21 }
  4165. }
  4166. },
  4167. params: [],
  4168. defaults: [],
  4169. body: {
  4170. type: 'BlockStatement',
  4171. body: [],
  4172. range: [ 24, 27 ],
  4173. loc: {
  4174. start: { line: 1, column: 24 },
  4175. end: { line: 1, column: 27 }
  4176. }
  4177. },
  4178. rest: null,
  4179. generator: false,
  4180. expression: false,
  4181. range: [ 7, 27 ],
  4182. loc: {
  4183. start: { line: 1, column: 7 },
  4184. end: { line: 1, column: 27 }
  4185. }
  4186. },
  4187. specifiers: null,
  4188. source: null,
  4189. range: [ 0, 27 ],
  4190. loc: {
  4191. start: { line: 1, column: 0 },
  4192. end: { line: 1, column: 27 }
  4193. }
  4194. },
  4195. 'export class Class {}': {
  4196. type: 'ExportDeclaration',
  4197. declaration: {
  4198. type: 'ClassDeclaration',
  4199. id: {
  4200. type: 'Identifier',
  4201. name: 'Class',
  4202. range: [ 13, 18 ],
  4203. loc: {
  4204. start: { line: 1, column: 13 },
  4205. end: { line: 1, column: 18 }
  4206. }
  4207. },
  4208. superClass: null,
  4209. body: {
  4210. type: 'ClassBody',
  4211. body: [],
  4212. range: [ 19, 21 ],
  4213. loc: {
  4214. start: { line: 1, column: 19 },
  4215. end: { line: 1, column: 21 }
  4216. }
  4217. },
  4218. range: [ 7, 21 ],
  4219. loc: {
  4220. start: { line: 1, column: 7 },
  4221. end: { line: 1, column: 21 }
  4222. }
  4223. },
  4224. specifiers: null,
  4225. source: null,
  4226. range: [ 0, 21 ],
  4227. loc: {
  4228. start: { line: 1, column: 0 },
  4229. end: { line: 1, column: 21 }
  4230. }
  4231. },
  4232. 'export default = 42': {
  4233. type: 'ExportDeclaration',
  4234. declaration: [{
  4235. type: 'VariableDeclarator',
  4236. id: {
  4237. type: 'Identifier',
  4238. name: 'default',
  4239. range: [7, 14],
  4240. loc: {
  4241. start: { line: 1, column: 7 },
  4242. end: { line: 1, column: 14 }
  4243. }
  4244. },
  4245. init: {
  4246. type: 'Literal',
  4247. value: 42,
  4248. raw: '42',
  4249. range: [17, 19],
  4250. loc: {
  4251. start: { line: 1, column: 17 },
  4252. end: { line: 1, column: 19 }
  4253. }
  4254. },
  4255. range: [7, 19],
  4256. loc: {
  4257. start: { line: 1, column: 7 },
  4258. end: { line: 1, column: 19 }
  4259. }
  4260. }],
  4261. specifiers: null,
  4262. source: null,
  4263. range: [0, 19],
  4264. loc: {
  4265. start: { line: 1, column: 0 },
  4266. end: { line: 1, column: 19 }
  4267. }
  4268. },
  4269. 'export *': {
  4270. type: 'ExportDeclaration',
  4271. declaration: null,
  4272. specifiers: [{
  4273. type: 'ExportBatchSpecifier',
  4274. range: [7, 8],
  4275. loc: {
  4276. start: { line: 1, column: 7 },
  4277. end: { line: 1, column: 8 }
  4278. }
  4279. }],
  4280. source: null,
  4281. range: [ 0, 8 ],
  4282. loc: {
  4283. start: { line: 1, column: 0 },
  4284. end: { line: 1, column: 8 }
  4285. }
  4286. },
  4287. 'export * from "crypto"': {
  4288. type: 'ExportDeclaration',
  4289. declaration: null,
  4290. specifiers: [{
  4291. type: 'ExportBatchSpecifier',
  4292. range: [7, 8],
  4293. loc: {
  4294. start: { line: 1, column: 7 },
  4295. end: { line: 1, column: 8 }
  4296. }
  4297. }],
  4298. source: {
  4299. type: 'Literal',
  4300. value: 'crypto',
  4301. raw: '"crypto"',
  4302. range: [14, 22],
  4303. loc: {
  4304. start: { line: 1, column: 14 },
  4305. end: { line: 1, column: 22 }
  4306. }
  4307. },
  4308. range: [0, 22],
  4309. loc: {
  4310. start: { line: 1, column: 0 },
  4311. end: { line: 1, column: 22 }
  4312. }
  4313. },
  4314. 'export { encrypt }': {
  4315. type: 'ExportDeclaration',
  4316. declaration: null,
  4317. specifiers: [{
  4318. type: 'ExportSpecifier',
  4319. id: {
  4320. type: 'Identifier',
  4321. name: 'encrypt',
  4322. range: [9, 16],
  4323. loc: {
  4324. start: { line: 1, column: 9 },
  4325. end: { line: 1, column: 16 }
  4326. }
  4327. },
  4328. name: null,
  4329. range: [9, 16],
  4330. loc: {
  4331. start: { line: 1, column: 9 },
  4332. end: { line: 1, column: 16 }
  4333. }
  4334. }],
  4335. source: null,
  4336. range: [0, 18],
  4337. loc: {
  4338. start: { line: 1, column: 0 },
  4339. end: { line: 1, column: 18 }
  4340. }
  4341. },
  4342. 'export { encrypt, decrypt }': {
  4343. type: 'ExportDeclaration',
  4344. declaration: null,
  4345. specifiers: [{
  4346. type: 'ExportSpecifier',
  4347. id: {
  4348. type: 'Identifier',
  4349. name: 'encrypt',
  4350. range: [9, 16],
  4351. loc: {
  4352. start: { line: 1, column: 9 },
  4353. end: { line: 1, column: 16 }
  4354. }
  4355. },
  4356. name: null,
  4357. range: [9, 16],
  4358. loc: {
  4359. start: { line: 1, column: 9 },
  4360. end: { line: 1, column: 16 }
  4361. }
  4362. }, {
  4363. type: 'ExportSpecifier',
  4364. id: {
  4365. type: 'Identifier',
  4366. name: 'decrypt',
  4367. range: [18, 25],
  4368. loc: {
  4369. start: { line: 1, column: 18 },
  4370. end: { line: 1, column: 25 }
  4371. }
  4372. },
  4373. name: null,
  4374. range: [18, 25],
  4375. loc: {
  4376. start: { line: 1, column: 18 },
  4377. end: { line: 1, column: 25 }
  4378. }
  4379. }],
  4380. source: null,
  4381. range: [0, 27],
  4382. loc: {
  4383. start: { line: 1, column: 0 },
  4384. end: { line: 1, column: 27 }
  4385. }
  4386. },
  4387. 'export { encrypt as default }': {
  4388. type: 'ExportDeclaration',
  4389. declaration: null,
  4390. specifiers: [{
  4391. type: 'ExportSpecifier',
  4392. id: {
  4393. type: 'Identifier',
  4394. name: 'encrypt',
  4395. range: [9, 16],
  4396. loc: {
  4397. start: { line: 1, column: 9 },
  4398. end: { line: 1, column: 16 }
  4399. }
  4400. },
  4401. name: {
  4402. type: 'Identifier',
  4403. name: 'default',
  4404. range: [20, 27],
  4405. loc: {
  4406. start: { line: 1, column: 20 },
  4407. end: { line: 1, column: 27 }
  4408. }
  4409. },
  4410. range: [9, 27],
  4411. loc: {
  4412. start: { line: 1, column: 9 },
  4413. end: { line: 1, column: 27 }
  4414. }
  4415. }],
  4416. source: null,
  4417. range: [0, 29],
  4418. loc: {
  4419. start: { line: 1, column: 0 },
  4420. end: { line: 1, column: 29 }
  4421. }
  4422. },
  4423. 'export { encrypt, decrypt as dec }': {
  4424. type: 'ExportDeclaration',
  4425. declaration: null,
  4426. specifiers: [{
  4427. type: 'ExportSpecifier',
  4428. id: {
  4429. type: 'Identifier',
  4430. name: 'encrypt',
  4431. range: [9, 16],
  4432. loc: {
  4433. start: { line: 1, column: 9 },
  4434. end: { line: 1, column: 16 }
  4435. }
  4436. },
  4437. name: null,
  4438. range: [9, 16],
  4439. loc: {
  4440. start: { line: 1, column: 9 },
  4441. end: { line: 1, column: 16 }
  4442. }
  4443. }, {
  4444. type: 'ExportSpecifier',
  4445. id: {
  4446. type: 'Identifier',
  4447. name: 'decrypt',
  4448. range: [18, 25],
  4449. loc: {
  4450. start: { line: 1, column: 18 },
  4451. end: { line: 1, column: 25 }
  4452. }
  4453. },
  4454. name: {
  4455. type: 'Identifier',
  4456. name: 'dec',
  4457. range: [29, 32],
  4458. loc: {
  4459. start: { line: 1, column: 29 },
  4460. end: { line: 1, column: 32 }
  4461. }
  4462. },
  4463. range: [18, 32],
  4464. loc: {
  4465. start: { line: 1, column: 18 },
  4466. end: { line: 1, column: 32 }
  4467. }
  4468. }],
  4469. source: null,
  4470. range: [0, 34],
  4471. loc: {
  4472. start: { line: 1, column: 0 },
  4473. end: { line: 1, column: 34 }
  4474. }
  4475. },
  4476. 'module "lib" { export var document }': {
  4477. type: 'ModuleDeclaration',
  4478. id: {
  4479. type: 'Literal',
  4480. value: 'lib',
  4481. raw: '"lib"',
  4482. range: [7, 12],
  4483. loc: {
  4484. start: { line: 1, column: 7 },
  4485. end: { line: 1, column: 12 }
  4486. }
  4487. },
  4488. source: null,
  4489. body: {
  4490. type: 'BlockStatement',
  4491. body: [{
  4492. type: 'ExportDeclaration',
  4493. declaration: {
  4494. type: 'VariableDeclaration',
  4495. declarations: [{
  4496. type: 'VariableDeclarator',
  4497. id: {
  4498. type: 'Identifier',
  4499. name: 'document',
  4500. range: [26, 34],
  4501. loc: {
  4502. start: { line: 1, column: 26 },
  4503. end: { line: 1, column: 34 }
  4504. }
  4505. },
  4506. init: null,
  4507. range: [26, 34],
  4508. loc: {
  4509. start: { line: 1, column: 26 },
  4510. end: { line: 1, column: 34 }
  4511. }
  4512. }],
  4513. kind: 'var',
  4514. range: [22, 35],
  4515. loc: {
  4516. start: { line: 1, column: 22 },
  4517. end: { line: 1, column: 35 }
  4518. }
  4519. },
  4520. specifiers: null,
  4521. source: null,
  4522. range: [15, 35],
  4523. loc: {
  4524. start: { line: 1, column: 15 },
  4525. end: { line: 1, column: 35 }
  4526. }
  4527. }],
  4528. range: [13, 36],
  4529. loc: {
  4530. start: { line: 1, column: 13 },
  4531. end: { line: 1, column: 36 }
  4532. }
  4533. },
  4534. range: [0, 36],
  4535. loc: {
  4536. start: { line: 1, column: 0 },
  4537. end: { line: 1, column: 36 }
  4538. }
  4539. },
  4540. 'module "lib" { export var document = { } }': {
  4541. type: 'ModuleDeclaration',
  4542. id: {
  4543. type: 'Literal',
  4544. value: 'lib',
  4545. raw: '"lib"',
  4546. range: [7, 12],
  4547. loc: {
  4548. start: { line: 1, column: 7 },
  4549. end: { line: 1, column: 12 }
  4550. }
  4551. },
  4552. source: null,
  4553. body: {
  4554. type: 'BlockStatement',
  4555. body: [{
  4556. type: 'ExportDeclaration',
  4557. declaration: {
  4558. type: 'VariableDeclaration',
  4559. declarations: [{
  4560. type: 'VariableDeclarator',
  4561. id: {
  4562. type: 'Identifier',
  4563. name: 'document',
  4564. range: [26, 34],
  4565. loc: {
  4566. start: { line: 1, column: 26 },
  4567. end: { line: 1, column: 34 }
  4568. }
  4569. },
  4570. init: {
  4571. type: 'ObjectExpression',
  4572. properties: [],
  4573. range: [37, 40],
  4574. loc: {
  4575. start: { line: 1, column: 37 },
  4576. end: { line: 1, column: 40 }
  4577. }
  4578. },
  4579. range: [26, 40],
  4580. loc: {
  4581. start: { line: 1, column: 26 },
  4582. end: { line: 1, column: 40 }
  4583. }
  4584. }],
  4585. kind: 'var',
  4586. range: [22, 41],
  4587. loc: {
  4588. start: { line: 1, column: 22 },
  4589. end: { line: 1, column: 41 }
  4590. }
  4591. },
  4592. specifiers: null,
  4593. source: null,
  4594. range: [15, 41],
  4595. loc: {
  4596. start: { line: 1, column: 15 },
  4597. end: { line: 1, column: 41 }
  4598. }
  4599. }],
  4600. range: [13, 42],
  4601. loc: {
  4602. start: { line: 1, column: 13 },
  4603. end: { line: 1, column: 42 }
  4604. }
  4605. },
  4606. range: [0, 42],
  4607. loc: {
  4608. start: { line: 1, column: 0 },
  4609. end: { line: 1, column: 42 }
  4610. }
  4611. },
  4612. 'module "lib" { export let document }': {
  4613. type: 'ModuleDeclaration',
  4614. id: {
  4615. type: 'Literal',
  4616. value: 'lib',
  4617. raw: '"lib"',
  4618. range: [7, 12],
  4619. loc: {
  4620. start: { line: 1, column: 7 },
  4621. end: { line: 1, column: 12 }
  4622. }
  4623. },
  4624. source: null,
  4625. body: {
  4626. type: 'BlockStatement',
  4627. body: [{
  4628. type: 'ExportDeclaration',
  4629. declaration: {
  4630. type: 'VariableDeclaration',
  4631. declarations: [{
  4632. type: 'VariableDeclarator',
  4633. id: {
  4634. type: 'Identifier',
  4635. name: 'document',
  4636. range: [26, 34],
  4637. loc: {
  4638. start: { line: 1, column: 26 },
  4639. end: { line: 1, column: 34 }
  4640. }
  4641. },
  4642. init: null,
  4643. range: [26, 34],
  4644. loc: {
  4645. start: { line: 1, column: 26 },
  4646. end: { line: 1, column: 34 }
  4647. }
  4648. }],
  4649. kind: 'let',
  4650. range: [22, 35],
  4651. loc: {
  4652. start: { line: 1, column: 22 },
  4653. end: { line: 1, column: 35 }
  4654. }
  4655. },
  4656. specifiers: null,
  4657. source: null,
  4658. range: [15, 35],
  4659. loc: {
  4660. start: { line: 1, column: 15 },
  4661. end: { line: 1, column: 35 }
  4662. }
  4663. }],
  4664. range: [13, 36],
  4665. loc: {
  4666. start: { line: 1, column: 13 },
  4667. end: { line: 1, column: 36 }
  4668. }
  4669. },
  4670. range: [0, 36],
  4671. loc: {
  4672. start: { line: 1, column: 0 },
  4673. end: { line: 1, column: 36 }
  4674. }
  4675. },
  4676. 'module "lib" { export let document = { } }': {
  4677. type: 'ModuleDeclaration',
  4678. id: {
  4679. type: 'Literal',
  4680. value: 'lib',
  4681. raw: '"lib"',
  4682. range: [7, 12],
  4683. loc: {
  4684. start: { line: 1, column: 7 },
  4685. end: { line: 1, column: 12 }
  4686. }
  4687. },
  4688. source: null,
  4689. body: {
  4690. type: 'BlockStatement',
  4691. body: [{
  4692. type: 'ExportDeclaration',
  4693. declaration: {
  4694. type: 'VariableDeclaration',
  4695. declarations: [{
  4696. type: 'VariableDeclarator',
  4697. id: {
  4698. type: 'Identifier',
  4699. name: 'document',
  4700. range: [26, 34],
  4701. loc: {
  4702. start: { line: 1, column: 26 },
  4703. end: { line: 1, column: 34 }
  4704. }
  4705. },
  4706. init: {
  4707. type: 'ObjectExpression',
  4708. properties: [],
  4709. range: [37, 40],
  4710. loc: {
  4711. start: { line: 1, column: 37 },
  4712. end: { line: 1, column: 40 }
  4713. }
  4714. },
  4715. range: [26, 40],
  4716. loc: {
  4717. start: { line: 1, column: 26 },
  4718. end: { line: 1, column: 40 }
  4719. }
  4720. }],
  4721. kind: 'let',
  4722. range: [22, 41],
  4723. loc: {
  4724. start: { line: 1, column: 22 },
  4725. end: { line: 1, column: 41 }
  4726. }
  4727. },
  4728. specifiers: null,
  4729. source: null,
  4730. range: [15, 41],
  4731. loc: {
  4732. start: { line: 1, column: 15 },
  4733. end: { line: 1, column: 41 }
  4734. }
  4735. }],
  4736. range: [13, 42],
  4737. loc: {
  4738. start: { line: 1, column: 13 },
  4739. end: { line: 1, column: 42 }
  4740. }
  4741. },
  4742. range: [0, 42],
  4743. loc: {
  4744. start: { line: 1, column: 0 },
  4745. end: { line: 1, column: 42 }
  4746. }
  4747. },
  4748. 'module "lib" { export const document = { } }': {
  4749. type: 'ModuleDeclaration',
  4750. id: {
  4751. type: 'Literal',
  4752. value: 'lib',
  4753. raw: '"lib"',
  4754. range: [7, 12],
  4755. loc: {
  4756. start: { line: 1, column: 7 },
  4757. end: { line: 1, column: 12 }
  4758. }
  4759. },
  4760. source: null,
  4761. body: {
  4762. type: 'BlockStatement',
  4763. body: [{
  4764. type: 'ExportDeclaration',
  4765. declaration: {
  4766. type: 'VariableDeclaration',
  4767. declarations: [{
  4768. type: 'VariableDeclarator',
  4769. id: {
  4770. type: 'Identifier',
  4771. name: 'document',
  4772. range: [28, 36],
  4773. loc: {
  4774. start: { line: 1, column: 28 },
  4775. end: { line: 1, column: 36 }
  4776. }
  4777. },
  4778. init: {
  4779. type: 'ObjectExpression',
  4780. properties: [],
  4781. range: [39, 42],
  4782. loc: {
  4783. start: { line: 1, column: 39 },
  4784. end: { line: 1, column: 42 }
  4785. }
  4786. },
  4787. range: [28, 42],
  4788. loc: {
  4789. start: { line: 1, column: 28 },
  4790. end: { line: 1, column: 42 }
  4791. }
  4792. }],
  4793. kind: 'const',
  4794. range: [22, 43],
  4795. loc: {
  4796. start: { line: 1, column: 22 },
  4797. end: { line: 1, column: 43 }
  4798. }
  4799. },
  4800. specifiers: null,
  4801. source: null,
  4802. range: [15, 43],
  4803. loc: {
  4804. start: { line: 1, column: 15 },
  4805. end: { line: 1, column: 43 }
  4806. }
  4807. }],
  4808. range: [13, 44],
  4809. loc: {
  4810. start: { line: 1, column: 13 },
  4811. end: { line: 1, column: 44 }
  4812. }
  4813. },
  4814. range: [0, 44],
  4815. loc: {
  4816. start: { line: 1, column: 0 },
  4817. end: { line: 1, column: 44 }
  4818. }
  4819. },
  4820. 'module "lib" { export function parse() { } }': {
  4821. type: 'ModuleDeclaration',
  4822. id: {
  4823. type: 'Literal',
  4824. value: 'lib',
  4825. raw: '"lib"',
  4826. range: [7, 12],
  4827. loc: {
  4828. start: { line: 1, column: 7 },
  4829. end: { line: 1, column: 12 }
  4830. }
  4831. },
  4832. source: null,
  4833. body: {
  4834. type: 'BlockStatement',
  4835. body: [{
  4836. type: 'ExportDeclaration',
  4837. declaration: {
  4838. type: 'FunctionDeclaration',
  4839. id: {
  4840. type: 'Identifier',
  4841. name: 'parse',
  4842. range: [31, 36],
  4843. loc: {
  4844. start: { line: 1, column: 31 },
  4845. end: { line: 1, column: 36 }
  4846. }
  4847. },
  4848. params: [],
  4849. defaults: [],
  4850. body: {
  4851. type: 'BlockStatement',
  4852. body: [],
  4853. range: [39, 42],
  4854. loc: {
  4855. start: { line: 1, column: 39 },
  4856. end: { line: 1, column: 42 }
  4857. }
  4858. },
  4859. rest: null,
  4860. generator: false,
  4861. expression: false,
  4862. range: [22, 42],
  4863. loc: {
  4864. start: { line: 1, column: 22 },
  4865. end: { line: 1, column: 42 }
  4866. }
  4867. },
  4868. specifiers: null,
  4869. source: null,
  4870. range: [15, 42],
  4871. loc: {
  4872. start: { line: 1, column: 15 },
  4873. end: { line: 1, column: 42 }
  4874. }
  4875. }],
  4876. range: [13, 44],
  4877. loc: {
  4878. start: { line: 1, column: 13 },
  4879. end: { line: 1, column: 44 }
  4880. }
  4881. },
  4882. range: [0, 44],
  4883. loc: {
  4884. start: { line: 1, column: 0 },
  4885. end: { line: 1, column: 44 }
  4886. }
  4887. },
  4888. 'module "lib" { export class Class {} }': {
  4889. type: 'ModuleDeclaration',
  4890. id: {
  4891. type: 'Literal',
  4892. value: 'lib',
  4893. raw: '"lib"',
  4894. range: [7, 12],
  4895. loc: {
  4896. start: { line: 1, column: 7 },
  4897. end: { line: 1, column: 12 }
  4898. }
  4899. },
  4900. source: null,
  4901. body: {
  4902. type: 'BlockStatement',
  4903. body: [{
  4904. type: 'ExportDeclaration',
  4905. declaration: {
  4906. type: 'ClassDeclaration',
  4907. id: {
  4908. type: 'Identifier',
  4909. name: 'Class',
  4910. range: [28, 33],
  4911. loc: {
  4912. start: { line: 1, column: 28 },
  4913. end: { line: 1, column: 33 }
  4914. }
  4915. },
  4916. superClass: null,
  4917. body: {
  4918. type: 'ClassBody',
  4919. body: [],
  4920. range: [34, 36],
  4921. loc: {
  4922. start: { line: 1, column: 34 },
  4923. end: { line: 1, column: 36 }
  4924. }
  4925. },
  4926. range: [22, 36],
  4927. loc: {
  4928. start: { line: 1, column: 22 },
  4929. end: { line: 1, column: 36 }
  4930. }
  4931. },
  4932. specifiers: null,
  4933. source: null,
  4934. range: [15, 36],
  4935. loc: {
  4936. start: { line: 1, column: 15 },
  4937. end: { line: 1, column: 36 }
  4938. }
  4939. }],
  4940. range: [13, 38],
  4941. loc: {
  4942. start: { line: 1, column: 13 },
  4943. end: { line: 1, column: 38 }
  4944. }
  4945. },
  4946. range: [0, 38],
  4947. loc: {
  4948. start: { line: 1, column: 0 },
  4949. end: { line: 1, column: 38 }
  4950. }
  4951. },
  4952. 'module "lib" { export * }': {
  4953. type: 'ModuleDeclaration',
  4954. id: {
  4955. type: 'Literal',
  4956. value: 'lib',
  4957. raw: '"lib"',
  4958. range: [7, 12],
  4959. loc: {
  4960. start: { line: 1, column: 7 },
  4961. end: { line: 1, column: 12 }
  4962. }
  4963. },
  4964. source: null,
  4965. body: {
  4966. type: 'BlockStatement',
  4967. body: [{
  4968. type: 'ExportDeclaration',
  4969. declaration: null,
  4970. specifiers: [{
  4971. type: 'ExportBatchSpecifier',
  4972. range: [22, 23],
  4973. loc: {
  4974. start: { line: 1, column: 22 },
  4975. end: { line: 1, column: 23 }
  4976. }
  4977. }],
  4978. source: null,
  4979. range: [15, 24],
  4980. loc: {
  4981. start: { line: 1, column: 15 },
  4982. end: { line: 1, column: 24 }
  4983. }
  4984. }],
  4985. range: [13, 25],
  4986. loc: {
  4987. start: { line: 1, column: 13 },
  4988. end: { line: 1, column: 25 }
  4989. }
  4990. },
  4991. range: [0, 25],
  4992. loc: {
  4993. start: { line: 1, column: 0 },
  4994. end: { line: 1, column: 25 }
  4995. }
  4996. },
  4997. 'module "security" { export * from "crypto" }': {
  4998. type: 'ModuleDeclaration',
  4999. id: {
  5000. type: 'Literal',
  5001. value: 'security',
  5002. raw: '"security"',
  5003. range: [7, 17],
  5004. loc: {
  5005. start: { line: 1, column: 7 },
  5006. end: { line: 1, column: 17 }
  5007. }
  5008. },
  5009. source: null,
  5010. body: {
  5011. type: 'BlockStatement',
  5012. body: [{
  5013. type: 'ExportDeclaration',
  5014. declaration: null,
  5015. specifiers: [{
  5016. type: 'ExportBatchSpecifier',
  5017. range: [27, 28],
  5018. loc: {
  5019. start: { line: 1, column: 27 },
  5020. end: { line: 1, column: 28 }
  5021. }
  5022. }],
  5023. source: {
  5024. type: 'Literal',
  5025. value: 'crypto',
  5026. raw: '"crypto"',
  5027. range: [34, 42],
  5028. loc: {
  5029. start: { line: 1, column: 34 },
  5030. end: { line: 1, column: 42 }
  5031. }
  5032. },
  5033. range: [20, 43],
  5034. loc: {
  5035. start: { line: 1, column: 20 },
  5036. end: { line: 1, column: 43 }
  5037. }
  5038. }],
  5039. range: [18, 44],
  5040. loc: {
  5041. start: { line: 1, column: 18 },
  5042. end: { line: 1, column: 44 }
  5043. }
  5044. },
  5045. range: [0, 44],
  5046. loc: {
  5047. start: { line: 1, column: 0 },
  5048. end: { line: 1, column: 44 }
  5049. }
  5050. },
  5051. 'module "crypto" { export { encrypt } }': {
  5052. type: 'ModuleDeclaration',
  5053. id: {
  5054. type: 'Literal',
  5055. value: 'crypto',
  5056. raw: '"crypto"',
  5057. range: [7, 15],
  5058. loc: {
  5059. start: { line: 1, column: 7 },
  5060. end: { line: 1, column: 15 }
  5061. }
  5062. },
  5063. source: null,
  5064. body: {
  5065. type: 'BlockStatement',
  5066. body: [{
  5067. type: 'ExportDeclaration',
  5068. declaration: null,
  5069. specifiers: [{
  5070. type: 'ExportSpecifier',
  5071. id: {
  5072. type: 'Identifier',
  5073. name: 'encrypt',
  5074. range: [27, 34],
  5075. loc: {
  5076. start: { line: 1, column: 27 },
  5077. end: { line: 1, column: 34 }
  5078. }
  5079. },
  5080. name: null,
  5081. range: [27, 34],
  5082. loc: {
  5083. start: { line: 1, column: 27 },
  5084. end: { line: 1, column: 34 }
  5085. }
  5086. }],
  5087. source: null,
  5088. range: [18, 37],
  5089. loc: {
  5090. start: { line: 1, column: 18 },
  5091. end: { line: 1, column: 37 }
  5092. }
  5093. }],
  5094. range: [16, 38],
  5095. loc: {
  5096. start: { line: 1, column: 16 },
  5097. end: { line: 1, column: 38 }
  5098. }
  5099. },
  5100. range: [0, 38],
  5101. loc: {
  5102. start: { line: 1, column: 0 },
  5103. end: { line: 1, column: 38 }
  5104. }
  5105. },
  5106. 'module "crypto" { export { encrypt, decrypt } }': {
  5107. type: 'ModuleDeclaration',
  5108. id: {
  5109. type: 'Literal',
  5110. value: 'crypto',
  5111. raw: '"crypto"',
  5112. range: [7, 15],
  5113. loc: {
  5114. start: { line: 1, column: 7 },
  5115. end: { line: 1, column: 15 }
  5116. }
  5117. },
  5118. source: null,
  5119. body: {
  5120. type: 'BlockStatement',
  5121. body: [{
  5122. type: 'ExportDeclaration',
  5123. declaration: null,
  5124. specifiers: [{
  5125. type: 'ExportSpecifier',
  5126. id: {
  5127. type: 'Identifier',
  5128. name: 'encrypt',
  5129. range: [27, 34],
  5130. loc: {
  5131. start: { line: 1, column: 27 },
  5132. end: { line: 1, column: 34 }
  5133. }
  5134. },
  5135. name: null,
  5136. range: [27, 34],
  5137. loc: {
  5138. start: { line: 1, column: 27 },
  5139. end: { line: 1, column: 34 }
  5140. }
  5141. }, {
  5142. type: 'ExportSpecifier',
  5143. id: {
  5144. type: 'Identifier',
  5145. name: 'decrypt',
  5146. range: [36, 43],
  5147. loc: {
  5148. start: { line: 1, column: 36 },
  5149. end: { line: 1, column: 43 }
  5150. }
  5151. },
  5152. name: null,
  5153. range: [36, 43],
  5154. loc: {
  5155. start: { line: 1, column: 36 },
  5156. end: { line: 1, column: 43 }
  5157. }
  5158. }],
  5159. source: null,
  5160. range: [18, 46],
  5161. loc: {
  5162. start: { line: 1, column: 18 },
  5163. end: { line: 1, column: 46 }
  5164. }
  5165. }],
  5166. range: [16, 47],
  5167. loc: {
  5168. start: { line: 1, column: 16 },
  5169. end: { line: 1, column: 47 }
  5170. }
  5171. },
  5172. range: [0, 47],
  5173. loc: {
  5174. start: { line: 1, column: 0 },
  5175. end: { line: 1, column: 47 }
  5176. }
  5177. },
  5178. 'module "crypto" { export { encrypt, decrypt as dec } }': {
  5179. type: 'ModuleDeclaration',
  5180. id: {
  5181. type: 'Literal',
  5182. value: 'crypto',
  5183. raw: '"crypto"',
  5184. range: [7, 15],
  5185. loc: {
  5186. start: { line: 1, column: 7 },
  5187. end: { line: 1, column: 15 }
  5188. }
  5189. },
  5190. source: null,
  5191. body: {
  5192. type: 'BlockStatement',
  5193. body: [{
  5194. type: 'ExportDeclaration',
  5195. declaration: null,
  5196. specifiers: [{
  5197. type: 'ExportSpecifier',
  5198. id: {
  5199. type: 'Identifier',
  5200. name: 'encrypt',
  5201. range: [27, 34],
  5202. loc: {
  5203. start: { line: 1, column: 27 },
  5204. end: { line: 1, column: 34 }
  5205. }
  5206. },
  5207. name: null,
  5208. range: [27, 34],
  5209. loc: {
  5210. start: { line: 1, column: 27 },
  5211. end: { line: 1, column: 34 }
  5212. }
  5213. }, {
  5214. type: 'ExportSpecifier',
  5215. id: {
  5216. type: 'Identifier',
  5217. name: 'decrypt',
  5218. range: [36, 43],
  5219. loc: {
  5220. start: { line: 1, column: 36 },
  5221. end: { line: 1, column: 43 }
  5222. }
  5223. },
  5224. name: {
  5225. type: 'Identifier',
  5226. name: 'dec',
  5227. range: [47, 50],
  5228. loc: {
  5229. start: { line: 1, column: 47 },
  5230. end: { line: 1, column: 50 }
  5231. }
  5232. },
  5233. range: [36, 50],
  5234. loc: {
  5235. start: { line: 1, column: 36 },
  5236. end: { line: 1, column: 50 }
  5237. }
  5238. }],
  5239. source: null,
  5240. range: [18, 53],
  5241. loc: {
  5242. start: { line: 1, column: 18 },
  5243. end: { line: 1, column: 53 }
  5244. }
  5245. }],
  5246. range: [16, 54],
  5247. loc: {
  5248. start: { line: 1, column: 16 },
  5249. end: { line: 1, column: 54 }
  5250. }
  5251. },
  5252. range: [0, 54],
  5253. loc: {
  5254. start: { line: 1, column: 0 },
  5255. end: { line: 1, column: 54 }
  5256. }
  5257. },
  5258. 'import "jquery"': {
  5259. type: 'ImportDeclaration',
  5260. specifiers: [],
  5261. source: {
  5262. type: 'Literal',
  5263. value: 'jquery',
  5264. raw: '"jquery"',
  5265. range: [7, 15],
  5266. loc: {
  5267. start: { line: 1, column: 7 },
  5268. end: { line: 1, column: 15 }
  5269. }
  5270. },
  5271. range: [0, 15],
  5272. loc: {
  5273. start: { line: 1, column: 0 },
  5274. end: { line: 1, column: 15 }
  5275. }
  5276. },
  5277. 'import $ from "jquery"': {
  5278. type: 'ImportDeclaration',
  5279. specifiers: [{
  5280. type: 'ImportSpecifier',
  5281. id: {
  5282. type: 'Identifier',
  5283. name: '$',
  5284. range: [7, 8],
  5285. loc: {
  5286. start: { line: 1, column: 7 },
  5287. end: { line: 1, column: 8 }
  5288. }
  5289. },
  5290. name: null,
  5291. range: [7, 8],
  5292. loc: {
  5293. start: { line: 1, column: 7 },
  5294. end: { line: 1, column: 8 }
  5295. }
  5296. }],
  5297. kind: 'default',
  5298. source: {
  5299. type: 'Literal',
  5300. value: 'jquery',
  5301. raw: '"jquery"',
  5302. range: [14, 22],
  5303. loc: {
  5304. start: { line: 1, column: 14 },
  5305. end: { line: 1, column: 22 }
  5306. }
  5307. },
  5308. range: [0, 22],
  5309. loc: {
  5310. start: { line: 1, column: 0 },
  5311. end: { line: 1, column: 22 }
  5312. }
  5313. },
  5314. 'import { encrypt, decrypt } from "crypto"': {
  5315. type: 'ImportDeclaration',
  5316. specifiers: [{
  5317. type: 'ImportSpecifier',
  5318. id: {
  5319. type: 'Identifier',
  5320. name: 'encrypt',
  5321. range: [9, 16],
  5322. loc: {
  5323. start: { line: 1, column: 9 },
  5324. end: { line: 1, column: 16 }
  5325. }
  5326. },
  5327. name: null,
  5328. range: [9, 16],
  5329. loc: {
  5330. start: { line: 1, column: 9 },
  5331. end: { line: 1, column: 16 }
  5332. }
  5333. }, {
  5334. type: 'ImportSpecifier',
  5335. id: {
  5336. type: 'Identifier',
  5337. name: 'decrypt',
  5338. range: [18, 25],
  5339. loc: {
  5340. start: { line: 1, column: 18 },
  5341. end: { line: 1, column: 25 }
  5342. }
  5343. },
  5344. name: null,
  5345. range: [18, 25],
  5346. loc: {
  5347. start: { line: 1, column: 18 },
  5348. end: { line: 1, column: 25 }
  5349. }
  5350. }],
  5351. kind: 'named',
  5352. source: {
  5353. type: 'Literal',
  5354. value: 'crypto',
  5355. raw: '"crypto"',
  5356. range: [33, 41],
  5357. loc: {
  5358. start: { line: 1, column: 33 },
  5359. end: { line: 1, column: 41 }
  5360. }
  5361. },
  5362. range: [0, 41],
  5363. loc: {
  5364. start: { line: 1, column: 0 },
  5365. end: { line: 1, column: 41 }
  5366. }
  5367. },
  5368. 'import { encrypt as enc } from "crypto"': {
  5369. type: 'ImportDeclaration',
  5370. specifiers: [{
  5371. type: 'ImportSpecifier',
  5372. id: {
  5373. type: 'Identifier',
  5374. name: 'encrypt',
  5375. range: [9, 16],
  5376. loc: {
  5377. start: { line: 1, column: 9 },
  5378. end: { line: 1, column: 16 }
  5379. }
  5380. },
  5381. name: {
  5382. type: 'Identifier',
  5383. name: 'enc',
  5384. range: [20, 23],
  5385. loc: {
  5386. start: { line: 1, column: 20 },
  5387. end: { line: 1, column: 23 }
  5388. }
  5389. },
  5390. range: [9, 23],
  5391. loc: {
  5392. start: { line: 1, column: 9 },
  5393. end: { line: 1, column: 23 }
  5394. }
  5395. }],
  5396. kind: 'named',
  5397. source: {
  5398. type: 'Literal',
  5399. value: 'crypto',
  5400. raw: '"crypto"',
  5401. range: [31, 39],
  5402. loc: {
  5403. start: { line: 1, column: 31 },
  5404. end: { line: 1, column: 39 }
  5405. }
  5406. },
  5407. range: [0, 39],
  5408. loc: {
  5409. start: { line: 1, column: 0 },
  5410. end: { line: 1, column: 39 }
  5411. }
  5412. },
  5413. 'import { decrypt, encrypt as enc } from "crypto"': {
  5414. type: 'ImportDeclaration',
  5415. specifiers: [{
  5416. type: 'ImportSpecifier',
  5417. id: {
  5418. type: 'Identifier',
  5419. name: 'decrypt',
  5420. range: [9, 16],
  5421. loc: {
  5422. start: { line: 1, column: 9 },
  5423. end: { line: 1, column: 16 }
  5424. }
  5425. },
  5426. name: null,
  5427. range: [9, 16],
  5428. loc: {
  5429. start: { line: 1, column: 9 },
  5430. end: { line: 1, column: 16 }
  5431. }
  5432. }, {
  5433. type: 'ImportSpecifier',
  5434. id: {
  5435. type: 'Identifier',
  5436. name: 'encrypt',
  5437. range: [18, 25],
  5438. loc: {
  5439. start: { line: 1, column: 18 },
  5440. end: { line: 1, column: 25 }
  5441. }
  5442. },
  5443. name: {
  5444. type: 'Identifier',
  5445. name: 'enc',
  5446. range: [29, 32],
  5447. loc: {
  5448. start: { line: 1, column: 29 },
  5449. end: { line: 1, column: 32 }
  5450. }
  5451. },
  5452. range: [18, 32],
  5453. loc: {
  5454. start: { line: 1, column: 18 },
  5455. end: { line: 1, column: 32 }
  5456. }
  5457. }],
  5458. kind: 'named',
  5459. source: {
  5460. type: 'Literal',
  5461. value: 'crypto',
  5462. raw: '"crypto"',
  5463. range: [40, 48],
  5464. loc: {
  5465. start: { line: 1, column: 40 },
  5466. end: { line: 1, column: 48 }
  5467. }
  5468. },
  5469. range: [0, 48],
  5470. loc: {
  5471. start: { line: 1, column: 0 },
  5472. end: { line: 1, column: 48 }
  5473. }
  5474. },
  5475. 'import default from "foo"': {
  5476. type: 'ImportDeclaration',
  5477. specifiers: [{
  5478. type: 'ImportSpecifier',
  5479. id: {
  5480. type: 'Identifier',
  5481. name: 'default',
  5482. range: [7, 14],
  5483. loc: {
  5484. start: { line: 1, column: 7 },
  5485. end: { line: 1, column: 14 }
  5486. }
  5487. },
  5488. name: null,
  5489. range: [7, 14],
  5490. loc: {
  5491. start: { line: 1, column: 7 },
  5492. end: { line: 1, column: 14 }
  5493. }
  5494. }],
  5495. kind: 'default',
  5496. source: {
  5497. type: 'Literal',
  5498. value: 'foo',
  5499. raw: '"foo"',
  5500. range: [20, 25],
  5501. loc: {
  5502. start: { line: 1, column: 20 },
  5503. end: { line: 1, column: 25 }
  5504. }
  5505. },
  5506. range: [0, 25],
  5507. loc: {
  5508. start: { line: 1, column: 0 },
  5509. end: { line: 1, column: 25 }
  5510. }
  5511. },
  5512. 'import { null as nil } from "bar"': {
  5513. type: 'ImportDeclaration',
  5514. specifiers: [{
  5515. type: 'ImportSpecifier',
  5516. id: {
  5517. type: 'Identifier',
  5518. name: 'null',
  5519. range: [9, 13],
  5520. loc: {
  5521. start: { line: 1, column: 9 },
  5522. end: { line: 1, column: 13 }
  5523. }
  5524. },
  5525. name: {
  5526. type: 'Identifier',
  5527. name: 'nil',
  5528. range: [17, 20],
  5529. loc: {
  5530. start: { line: 1, column: 17 },
  5531. end: { line: 1, column: 20 }
  5532. }
  5533. },
  5534. range: [9, 20],
  5535. loc: {
  5536. start: { line: 1, column: 9 },
  5537. end: { line: 1, column: 20 }
  5538. }
  5539. }],
  5540. kind: 'named',
  5541. source: {
  5542. type: 'Literal',
  5543. value: 'bar',
  5544. raw: '"bar"',
  5545. range: [28, 33],
  5546. loc: {
  5547. start: { line: 1, column: 28 },
  5548. end: { line: 1, column: 33 }
  5549. }
  5550. },
  5551. range: [0, 33],
  5552. loc: {
  5553. start: { line: 1, column: 0 },
  5554. end: { line: 1, column: 33 }
  5555. }
  5556. },
  5557. 'module "security" { import "cryto" }': {
  5558. type: 'ModuleDeclaration',
  5559. id: {
  5560. type: 'Literal',
  5561. value: 'security',
  5562. raw: '"security"',
  5563. range: [7, 17],
  5564. loc: {
  5565. start: { line: 1, column: 7 },
  5566. end: { line: 1, column: 17 }
  5567. }
  5568. },
  5569. source: null,
  5570. body: {
  5571. type: 'BlockStatement',
  5572. body: [{
  5573. type: 'ImportDeclaration',
  5574. specifiers: [],
  5575. source: {
  5576. type: 'Literal',
  5577. value: 'cryto',
  5578. raw: '"cryto"',
  5579. range: [27, 34],
  5580. loc: {
  5581. start: { line: 1, column: 27 },
  5582. end: { line: 1, column: 34 }
  5583. }
  5584. },
  5585. range: [20, 35],
  5586. loc: {
  5587. start: { line: 1, column: 20 },
  5588. end: { line: 1, column: 35 }
  5589. }
  5590. }],
  5591. range: [18, 36],
  5592. loc: {
  5593. start: { line: 1, column: 18 },
  5594. end: { line: 1, column: 36 }
  5595. }
  5596. },
  5597. range: [0, 36],
  5598. loc: {
  5599. start: { line: 1, column: 0 },
  5600. end: { line: 1, column: 36 }
  5601. }
  5602. },
  5603. 'module()': {
  5604. type: 'ExpressionStatement',
  5605. expression: {
  5606. type: 'CallExpression',
  5607. callee: {
  5608. type: 'Identifier',
  5609. name: 'module',
  5610. range: [0, 6],
  5611. loc: {
  5612. start: { line: 1, column: 0 },
  5613. end: { line: 1, column: 6 }
  5614. }
  5615. },
  5616. 'arguments': [],
  5617. range: [0, 8],
  5618. loc: {
  5619. start: { line: 1, column: 0 },
  5620. end: { line: 1, column: 8 }
  5621. }
  5622. },
  5623. range: [0, 8],
  5624. loc: {
  5625. start: { line: 1, column: 0 },
  5626. end: { line: 1, column: 8 }
  5627. }
  5628. },
  5629. 'module "foo" { module() }': {
  5630. type: 'ModuleDeclaration',
  5631. id: {
  5632. type: 'Literal',
  5633. value: 'foo',
  5634. raw: '"foo"',
  5635. range: [7, 12],
  5636. loc: {
  5637. start: { line: 1, column: 7 },
  5638. end: { line: 1, column: 12 }
  5639. }
  5640. },
  5641. source: null,
  5642. body: {
  5643. type: 'BlockStatement',
  5644. body: [{
  5645. type: 'ExpressionStatement',
  5646. expression: {
  5647. type: 'CallExpression',
  5648. callee: {
  5649. type: 'Identifier',
  5650. name: 'module',
  5651. range: [15, 21],
  5652. loc: {
  5653. start: { line: 1, column: 15 },
  5654. end: { line: 1, column: 21 }
  5655. }
  5656. },
  5657. 'arguments': [],
  5658. range: [15, 23],
  5659. loc: {
  5660. start: { line: 1, column: 15 },
  5661. end: { line: 1, column: 23 }
  5662. }
  5663. },
  5664. range: [15, 24],
  5665. loc: {
  5666. start: { line: 1, column: 15 },
  5667. end: { line: 1, column: 24 }
  5668. }
  5669. }],
  5670. range: [13, 25],
  5671. loc: {
  5672. start: { line: 1, column: 13 },
  5673. end: { line: 1, column: 25 }
  5674. }
  5675. },
  5676. range: [0, 25],
  5677. loc: {
  5678. start: { line: 1, column: 0 },
  5679. end: { line: 1, column: 25 }
  5680. }
  5681. }
  5682. },
  5683. // http://wiki.ecmascript.org/doku.php?id=harmony:generators
  5684. 'Harmony: Yield Expression': {
  5685. '(function* () { yield v })': {
  5686. type: 'ExpressionStatement',
  5687. expression: {
  5688. type: 'FunctionExpression',
  5689. id: null,
  5690. params: [],
  5691. defaults: [],
  5692. body: {
  5693. type: 'BlockStatement',
  5694. body: [{
  5695. type: 'ExpressionStatement',
  5696. expression: {
  5697. type: 'YieldExpression',
  5698. argument: {
  5699. type: 'Identifier',
  5700. name: 'v',
  5701. range: [22, 23],
  5702. loc: {
  5703. start: { line: 1, column: 22 },
  5704. end: { line: 1, column: 23 }
  5705. }
  5706. },
  5707. delegate: false,
  5708. range: [16, 23],
  5709. loc: {
  5710. start: { line: 1, column: 16 },
  5711. end: { line: 1, column: 23 }
  5712. }
  5713. },
  5714. range: [16, 24],
  5715. loc: {
  5716. start: { line: 1, column: 16 },
  5717. end: { line: 1, column: 24 }
  5718. }
  5719. }],
  5720. range: [14, 25],
  5721. loc: {
  5722. start: { line: 1, column: 14 },
  5723. end: { line: 1, column: 25 }
  5724. }
  5725. },
  5726. rest: null,
  5727. generator: true,
  5728. expression: false,
  5729. range: [1, 25],
  5730. loc: {
  5731. start: { line: 1, column: 1 },
  5732. end: { line: 1, column: 25 }
  5733. }
  5734. },
  5735. range: [0, 26],
  5736. loc: {
  5737. start: { line: 1, column: 0 },
  5738. end: { line: 1, column: 26 }
  5739. }
  5740. },
  5741. '(function* () { yield *v })': {
  5742. type: 'ExpressionStatement',
  5743. expression: {
  5744. type: 'FunctionExpression',
  5745. id: null,
  5746. params: [],
  5747. defaults: [],
  5748. body: {
  5749. type: 'BlockStatement',
  5750. body: [{
  5751. type: 'ExpressionStatement',
  5752. expression: {
  5753. type: 'YieldExpression',
  5754. argument: {
  5755. type: 'Identifier',
  5756. name: 'v',
  5757. range: [23, 24],
  5758. loc: {
  5759. start: { line: 1, column: 23 },
  5760. end: { line: 1, column: 24 }
  5761. }
  5762. },
  5763. delegate: true,
  5764. range: [16, 24],
  5765. loc: {
  5766. start: { line: 1, column: 16 },
  5767. end: { line: 1, column: 24 }
  5768. }
  5769. },
  5770. range: [16, 25],
  5771. loc: {
  5772. start: { line: 1, column: 16 },
  5773. end: { line: 1, column: 25 }
  5774. }
  5775. }],
  5776. range: [14, 26],
  5777. loc: {
  5778. start: { line: 1, column: 14 },
  5779. end: { line: 1, column: 26 }
  5780. }
  5781. },
  5782. rest: null,
  5783. generator: true,
  5784. expression: false,
  5785. range: [1, 26],
  5786. loc: {
  5787. start: { line: 1, column: 1 },
  5788. end: { line: 1, column: 26 }
  5789. }
  5790. },
  5791. range: [0, 27],
  5792. loc: {
  5793. start: { line: 1, column: 0 },
  5794. end: { line: 1, column: 27 }
  5795. }
  5796. },
  5797. 'function* test () { yield *v }': {
  5798. type: 'FunctionDeclaration',
  5799. id: {
  5800. type: 'Identifier',
  5801. name: 'test',
  5802. range: [10, 14],
  5803. loc: {
  5804. start: { line: 1, column: 10 },
  5805. end: { line: 1, column: 14}
  5806. }
  5807. },
  5808. params: [],
  5809. defaults: [],
  5810. body: {
  5811. type: 'BlockStatement',
  5812. body: [{
  5813. type: 'ExpressionStatement',
  5814. expression: {
  5815. type: 'YieldExpression',
  5816. argument: {
  5817. type: 'Identifier',
  5818. name: 'v',
  5819. range: [27, 28],
  5820. loc: {
  5821. start: { line: 1, column: 27 },
  5822. end: { line: 1, column: 28 }
  5823. }
  5824. },
  5825. delegate: true,
  5826. range: [20, 28],
  5827. loc: {
  5828. start: { line: 1, column: 20 },
  5829. end: { line: 1, column: 28 }
  5830. }
  5831. },
  5832. range: [20, 29],
  5833. loc: {
  5834. start: { line: 1, column: 20 },
  5835. end: { line: 1, column: 29 }
  5836. }
  5837. }],
  5838. range: [18, 30],
  5839. loc: {
  5840. start: { line: 1, column: 18 },
  5841. end: { line: 1, column: 30 }
  5842. }
  5843. },
  5844. rest: null,
  5845. generator: true,
  5846. expression: false,
  5847. range: [0, 30],
  5848. loc: {
  5849. start: { line: 1, column: 0 },
  5850. end: { line: 1, column: 30 }
  5851. }
  5852. },
  5853. 'var x = { *test () { yield *v } };': {
  5854. type: 'VariableDeclaration',
  5855. declarations: [{
  5856. type: 'VariableDeclarator',
  5857. id: {
  5858. type: 'Identifier',
  5859. name: 'x',
  5860. range: [4, 5],
  5861. loc: {
  5862. start: { line: 1, column: 4 },
  5863. end: { line: 1, column: 5 }
  5864. }
  5865. },
  5866. init: {
  5867. type: 'ObjectExpression',
  5868. properties: [{
  5869. type: 'Property',
  5870. key: {
  5871. type: 'Identifier',
  5872. name: 'test',
  5873. range: [11, 15],
  5874. loc: {
  5875. start: { line: 1, column: 11 },
  5876. end: { line: 1, column: 15 }
  5877. }
  5878. },
  5879. value: {
  5880. type: 'FunctionExpression',
  5881. id: null,
  5882. params: [],
  5883. defaults: [],
  5884. body: {
  5885. type: 'BlockStatement',
  5886. body: [{
  5887. type: 'ExpressionStatement',
  5888. expression: {
  5889. type: 'YieldExpression',
  5890. argument: {
  5891. type: 'Identifier',
  5892. name: 'v',
  5893. range: [28, 29],
  5894. loc: {
  5895. start: { line: 1, column: 28 },
  5896. end: { line: 1, column: 29 }
  5897. }
  5898. },
  5899. delegate: true,
  5900. range: [21, 29],
  5901. loc: {
  5902. start: { line: 1, column: 21 },
  5903. end: { line: 1, column: 29 }
  5904. }
  5905. },
  5906. range: [21, 30],
  5907. loc: {
  5908. start: { line: 1, column: 21 },
  5909. end: { line: 1, column: 30 }
  5910. }
  5911. }],
  5912. range: [19, 31],
  5913. loc: {
  5914. start: { line: 1, column: 19 },
  5915. end: { line: 1, column: 31 }
  5916. }
  5917. },
  5918. rest: null,
  5919. generator: true,
  5920. expression: false,
  5921. range: [19, 31],
  5922. loc: {
  5923. start: { line: 1, column: 19 },
  5924. end: { line: 1, column: 31 }
  5925. }
  5926. },
  5927. kind: 'init',
  5928. method: true,
  5929. shorthand: false,
  5930. range: [10, 31],
  5931. loc: {
  5932. start: { line: 1, column: 10 },
  5933. end: { line: 1, column: 31 }
  5934. }
  5935. }],
  5936. range: [8, 33],
  5937. loc: {
  5938. start: { line: 1, column: 8 },
  5939. end: { line: 1, column: 33 }
  5940. }
  5941. },
  5942. range: [4, 33],
  5943. loc: {
  5944. start: { line: 1, column: 4 },
  5945. end: { line: 1, column: 33 }
  5946. }
  5947. }],
  5948. kind: 'var',
  5949. range: [0, 34],
  5950. loc: {
  5951. start: { line: 1, column: 0 },
  5952. end: { line: 1, column: 34 }
  5953. }
  5954. },
  5955. 'function* t() {}': {
  5956. type: 'Program',
  5957. body: [{
  5958. type: 'FunctionDeclaration',
  5959. id: {
  5960. type: 'Identifier',
  5961. name: 't',
  5962. range: [10, 11],
  5963. loc: {
  5964. start: { line: 1, column: 10 },
  5965. end: { line: 1, column: 11 }
  5966. }
  5967. },
  5968. params: [],
  5969. defaults: [],
  5970. body: {
  5971. type: 'BlockStatement',
  5972. body: [],
  5973. range: [14, 16],
  5974. loc: {
  5975. start: { line: 1, column: 14 },
  5976. end: { line: 1, column: 16 }
  5977. }
  5978. },
  5979. rest: null,
  5980. generator: true,
  5981. expression: false,
  5982. range: [0, 16],
  5983. loc: {
  5984. start: { line: 1, column: 0 },
  5985. end: { line: 1, column: 16 }
  5986. }
  5987. }],
  5988. range: [0, 16],
  5989. loc: {
  5990. start: { line: 1, column: 0 },
  5991. end: { line: 1, column: 16 }
  5992. },
  5993. errors: [{
  5994. index: 16,
  5995. lineNumber: 1,
  5996. column: 17,
  5997. message: 'Error: Line 1: Missing yield in generator'
  5998. }]
  5999. },
  6000. '(function* () { yield yield 10 })': {
  6001. type: 'ExpressionStatement',
  6002. expression: {
  6003. type: 'FunctionExpression',
  6004. id: null,
  6005. params: [],
  6006. defaults: [],
  6007. body: {
  6008. type: 'BlockStatement',
  6009. body: [{
  6010. type: 'ExpressionStatement',
  6011. expression: {
  6012. type: 'YieldExpression',
  6013. argument: {
  6014. type: 'YieldExpression',
  6015. argument: {
  6016. type: 'Literal',
  6017. value: 10,
  6018. raw: '10',
  6019. range: [28, 30],
  6020. loc: {
  6021. start: { line: 1, column: 28 },
  6022. end: { line: 1, column: 30 }
  6023. }
  6024. },
  6025. delegate: false,
  6026. range: [22, 30],
  6027. loc: {
  6028. start: { line: 1, column: 22 },
  6029. end: { line: 1, column: 30 }
  6030. }
  6031. },
  6032. delegate: false,
  6033. range: [16, 30],
  6034. loc: {
  6035. start: { line: 1, column: 16 },
  6036. end: { line: 1, column: 30 }
  6037. }
  6038. },
  6039. range: [16, 31],
  6040. loc: {
  6041. start: { line: 1, column: 16 },
  6042. end: { line: 1, column: 31 }
  6043. }
  6044. }],
  6045. range: [14, 32],
  6046. loc: {
  6047. start: { line: 1, column: 14 },
  6048. end: { line: 1, column: 32 }
  6049. }
  6050. },
  6051. rest: null,
  6052. generator: true,
  6053. expression: false,
  6054. range: [1, 32],
  6055. loc: {
  6056. start: { line: 1, column: 1 },
  6057. end: { line: 1, column: 32 }
  6058. }
  6059. },
  6060. range: [0, 33],
  6061. loc: {
  6062. start: { line: 1, column: 0 },
  6063. end: { line: 1, column: 33 }
  6064. }
  6065. }
  6066. },
  6067. // http://wiki.ecmascript.org/doku.php?id=harmony:iterators
  6068. 'Harmony: Iterators': {
  6069. 'for(x of list) process(x);': {
  6070. type: 'ForOfStatement',
  6071. left: {
  6072. type: 'Identifier',
  6073. name: 'x',
  6074. range: [4, 5],
  6075. loc: {
  6076. start: { line: 1, column: 4 },
  6077. end: { line: 1, column: 5 }
  6078. }
  6079. },
  6080. right: {
  6081. type: 'Identifier',
  6082. name: 'list',
  6083. range: [9, 13],
  6084. loc: {
  6085. start: { line: 1, column: 9 },
  6086. end: { line: 1, column: 13 }
  6087. }
  6088. },
  6089. body: {
  6090. type: 'ExpressionStatement',
  6091. expression: {
  6092. type: 'CallExpression',
  6093. callee: {
  6094. type: 'Identifier',
  6095. name: 'process',
  6096. range: [15, 22],
  6097. loc: {
  6098. start: { line: 1, column: 15 },
  6099. end: { line: 1, column: 22 }
  6100. }
  6101. },
  6102. 'arguments': [{
  6103. type: 'Identifier',
  6104. name: 'x',
  6105. range: [23, 24],
  6106. loc: {
  6107. start: { line: 1, column: 23 },
  6108. end: { line: 1, column: 24 }
  6109. }
  6110. }],
  6111. range: [15, 25],
  6112. loc: {
  6113. start: { line: 1, column: 15 },
  6114. end: { line: 1, column: 25 }
  6115. }
  6116. },
  6117. range: [15, 26],
  6118. loc: {
  6119. start: { line: 1, column: 15 },
  6120. end: { line: 1, column: 26 }
  6121. }
  6122. },
  6123. range: [0, 26],
  6124. loc: {
  6125. start: { line: 1, column: 0 },
  6126. end: { line: 1, column: 26 }
  6127. }
  6128. },
  6129. 'for (var x of list) process(x);': {
  6130. type: 'ForOfStatement',
  6131. left: {
  6132. type: 'VariableDeclaration',
  6133. declarations: [{
  6134. type: 'VariableDeclarator',
  6135. id: {
  6136. type: 'Identifier',
  6137. name: 'x',
  6138. range: [9, 10],
  6139. loc: {
  6140. start: { line: 1, column: 9 },
  6141. end: { line: 1, column: 10 }
  6142. }
  6143. },
  6144. init: null,
  6145. range: [9, 10],
  6146. loc: {
  6147. start: { line: 1, column: 9 },
  6148. end: { line: 1, column: 10 }
  6149. }
  6150. }],
  6151. kind: 'var',
  6152. range: [5, 10],
  6153. loc: {
  6154. start: { line: 1, column: 5 },
  6155. end: { line: 1, column: 10 }
  6156. }
  6157. },
  6158. right: {
  6159. type: 'Identifier',
  6160. name: 'list',
  6161. range: [14, 18],
  6162. loc: {
  6163. start: { line: 1, column: 14 },
  6164. end: { line: 1, column: 18 }
  6165. }
  6166. },
  6167. body: {
  6168. type: 'ExpressionStatement',
  6169. expression: {
  6170. type: 'CallExpression',
  6171. callee: {
  6172. type: 'Identifier',
  6173. name: 'process',
  6174. range: [20, 27],
  6175. loc: {
  6176. start: { line: 1, column: 20 },
  6177. end: { line: 1, column: 27 }
  6178. }
  6179. },
  6180. 'arguments': [{
  6181. type: 'Identifier',
  6182. name: 'x',
  6183. range: [28, 29],
  6184. loc: {
  6185. start: { line: 1, column: 28 },
  6186. end: { line: 1, column: 29 }
  6187. }
  6188. }],
  6189. range: [20, 30],
  6190. loc: {
  6191. start: { line: 1, column: 20 },
  6192. end: { line: 1, column: 30 }
  6193. }
  6194. },
  6195. range: [20, 31],
  6196. loc: {
  6197. start: { line: 1, column: 20 },
  6198. end: { line: 1, column: 31 }
  6199. }
  6200. },
  6201. range: [0, 31],
  6202. loc: {
  6203. start: { line: 1, column: 0 },
  6204. end: { line: 1, column: 31 }
  6205. }
  6206. },
  6207. 'for (var x = 42 of list) process(x);': {
  6208. type: 'ForOfStatement',
  6209. left: {
  6210. type: 'VariableDeclaration',
  6211. declarations: [{
  6212. type: 'VariableDeclarator',
  6213. id: {
  6214. type: 'Identifier',
  6215. name: 'x',
  6216. range: [9, 10],
  6217. loc: {
  6218. start: { line: 1, column: 9 },
  6219. end: { line: 1, column: 10 }
  6220. }
  6221. },
  6222. init: {
  6223. type: 'Literal',
  6224. value: 42,
  6225. raw: '42',
  6226. range: [13, 15],
  6227. loc: {
  6228. start: { line: 1, column: 13 },
  6229. end: { line: 1, column: 15 }
  6230. }
  6231. },
  6232. range: [9, 15],
  6233. loc: {
  6234. start: { line: 1, column: 9 },
  6235. end: { line: 1, column: 15 }
  6236. }
  6237. }],
  6238. kind: 'var',
  6239. range: [5, 15],
  6240. loc: {
  6241. start: { line: 1, column: 5 },
  6242. end: { line: 1, column: 15 }
  6243. }
  6244. },
  6245. right: {
  6246. type: 'Identifier',
  6247. name: 'list',
  6248. range: [19, 23],
  6249. loc: {
  6250. start: { line: 1, column: 19 },
  6251. end: { line: 1, column: 23 }
  6252. }
  6253. },
  6254. body: {
  6255. type: 'ExpressionStatement',
  6256. expression: {
  6257. type: 'CallExpression',
  6258. callee: {
  6259. type: 'Identifier',
  6260. name: 'process',
  6261. range: [25, 32],
  6262. loc: {
  6263. start: { line: 1, column: 25 },
  6264. end: { line: 1, column: 32 }
  6265. }
  6266. },
  6267. 'arguments': [{
  6268. type: 'Identifier',
  6269. name: 'x',
  6270. range: [33, 34],
  6271. loc: {
  6272. start: { line: 1, column: 33 },
  6273. end: { line: 1, column: 34 }
  6274. }
  6275. }],
  6276. range: [25, 35],
  6277. loc: {
  6278. start: { line: 1, column: 25 },
  6279. end: { line: 1, column: 35 }
  6280. }
  6281. },
  6282. range: [25, 36],
  6283. loc: {
  6284. start: { line: 1, column: 25 },
  6285. end: { line: 1, column: 36 }
  6286. }
  6287. },
  6288. range: [0, 36],
  6289. loc: {
  6290. start: { line: 1, column: 0 },
  6291. end: { line: 1, column: 36 }
  6292. }
  6293. },
  6294. 'for (let x of list) process(x);': {
  6295. type: 'ForOfStatement',
  6296. left: {
  6297. type: 'VariableDeclaration',
  6298. declarations: [{
  6299. type: 'VariableDeclarator',
  6300. id: {
  6301. type: 'Identifier',
  6302. name: 'x',
  6303. range: [9, 10],
  6304. loc: {
  6305. start: { line: 1, column: 9 },
  6306. end: { line: 1, column: 10 }
  6307. }
  6308. },
  6309. init: null,
  6310. range: [9, 10],
  6311. loc: {
  6312. start: { line: 1, column: 9 },
  6313. end: { line: 1, column: 10 }
  6314. }
  6315. }],
  6316. kind: 'let',
  6317. range: [5, 10],
  6318. loc: {
  6319. start: { line: 1, column: 5 },
  6320. end: { line: 1, column: 10 }
  6321. }
  6322. },
  6323. right: {
  6324. type: 'Identifier',
  6325. name: 'list',
  6326. range: [14, 18],
  6327. loc: {
  6328. start: { line: 1, column: 14 },
  6329. end: { line: 1, column: 18 }
  6330. }
  6331. },
  6332. body: {
  6333. type: 'ExpressionStatement',
  6334. expression: {
  6335. type: 'CallExpression',
  6336. callee: {
  6337. type: 'Identifier',
  6338. name: 'process',
  6339. range: [20, 27],
  6340. loc: {
  6341. start: { line: 1, column: 20 },
  6342. end: { line: 1, column: 27 }
  6343. }
  6344. },
  6345. 'arguments': [{
  6346. type: 'Identifier',
  6347. name: 'x',
  6348. range: [28, 29],
  6349. loc: {
  6350. start: { line: 1, column: 28 },
  6351. end: { line: 1, column: 29 }
  6352. }
  6353. }],
  6354. range: [20, 30],
  6355. loc: {
  6356. start: { line: 1, column: 20 },
  6357. end: { line: 1, column: 30 }
  6358. }
  6359. },
  6360. range: [20, 31],
  6361. loc: {
  6362. start: { line: 1, column: 20 },
  6363. end: { line: 1, column: 31 }
  6364. }
  6365. },
  6366. range: [0, 31],
  6367. loc: {
  6368. start: { line: 1, column: 0 },
  6369. end: { line: 1, column: 31 }
  6370. }
  6371. }
  6372. },
  6373. // http://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes
  6374. 'Harmony: Class (strawman)': {
  6375. 'var A = class extends B {}': {
  6376. type: "VariableDeclaration",
  6377. declarations: [
  6378. {
  6379. type: "VariableDeclarator",
  6380. id: {
  6381. type: "Identifier",
  6382. name: "A",
  6383. range: [4, 5],
  6384. loc: {
  6385. start: { line: 1, column: 4 },
  6386. end: { line: 1, column: 5 }
  6387. }
  6388. },
  6389. init: {
  6390. type: "ClassExpression",
  6391. superClass: {
  6392. type: "Identifier",
  6393. name: "B",
  6394. range: [22, 23],
  6395. loc: {
  6396. start: { line: 1, column: 22 },
  6397. end: { line: 1, column: 23 }
  6398. }
  6399. },
  6400. body: {
  6401. type: "ClassBody",
  6402. body: [],
  6403. range: [24, 26],
  6404. loc: {
  6405. start: { line: 1, column: 24 },
  6406. end: { line: 1, column: 26 }
  6407. }
  6408. },
  6409. range: [8, 26],
  6410. loc: {
  6411. start: { line: 1, column: 8 },
  6412. end: { line: 1, column: 26 }
  6413. }
  6414. },
  6415. range: [4, 26],
  6416. loc: {
  6417. start: { line: 1, column: 4 },
  6418. end: { line: 1, column: 26 }
  6419. }
  6420. }
  6421. ],
  6422. kind: "var",
  6423. range: [0, 26],
  6424. loc: {
  6425. start: { line: 1, column: 0 },
  6426. end: { line: 1, column: 26 }
  6427. }
  6428. },
  6429. 'class A extends class B extends C {} {}': {
  6430. type: "ClassDeclaration",
  6431. id: {
  6432. type: "Identifier",
  6433. name: "A",
  6434. range: [6, 7],
  6435. loc: {
  6436. start: { line: 1, column: 6 },
  6437. end: { line: 1, column: 7 }
  6438. }
  6439. },
  6440. superClass: {
  6441. type: "ClassExpression",
  6442. id: {
  6443. type: "Identifier",
  6444. name: "B",
  6445. range: [22, 23],
  6446. loc: {
  6447. start: { line: 1, column: 22 },
  6448. end: { line: 1, column: 23 }
  6449. }
  6450. },
  6451. superClass: null,
  6452. body: {
  6453. type: "ClassBody",
  6454. body: [],
  6455. range: [34, 36],
  6456. loc: {
  6457. start: { line: 1, column: 34 },
  6458. end: { line: 1, column: 36 }
  6459. }
  6460. },
  6461. superClass: {
  6462. type: "Identifier",
  6463. name: "C",
  6464. range: [32, 33],
  6465. loc: {
  6466. start: { line: 1, column: 32 },
  6467. end: { line: 1, column: 33 }
  6468. }
  6469. },
  6470. range: [16, 36],
  6471. loc: {
  6472. start: { line: 1, column: 16 },
  6473. end: { line: 1, column: 36 }
  6474. }
  6475. },
  6476. body: {
  6477. type: "ClassBody",
  6478. body: [],
  6479. range: [37, 39],
  6480. loc: {
  6481. start: { line: 1, column: 37 },
  6482. end: { line: 1, column: 39 }
  6483. }
  6484. },
  6485. range: [0, 39],
  6486. loc: {
  6487. start: { line: 1, column: 0 },
  6488. end: { line: 1, column: 39 }
  6489. }
  6490. },
  6491. 'class A {get() {}}': {
  6492. type: "ClassDeclaration",
  6493. id: {
  6494. type: "Identifier",
  6495. name: "A",
  6496. range: [6, 7],
  6497. loc: {
  6498. start: { line: 1, column: 6 },
  6499. end: { line: 1, column: 7 }
  6500. }
  6501. },
  6502. superClass: null,
  6503. body: {
  6504. type: "ClassBody",
  6505. body: [
  6506. {
  6507. type: "MethodDefinition",
  6508. key: {
  6509. type: "Identifier",
  6510. name: "get",
  6511. range: [9, 12],
  6512. loc: {
  6513. start: { line: 1, column: 9 },
  6514. end: { line: 1, column: 12 }
  6515. }
  6516. },
  6517. value: {
  6518. type: "FunctionExpression",
  6519. id: null,
  6520. params: [],
  6521. defaults: [],
  6522. body: {
  6523. type: "BlockStatement",
  6524. body: [],
  6525. range: [15, 17],
  6526. loc: {
  6527. start: { line: 1, column: 15 },
  6528. end: { line: 1, column: 17 }
  6529. }
  6530. },
  6531. rest: null,
  6532. generator: false,
  6533. expression: false,
  6534. range: [15, 17],
  6535. loc: {
  6536. start: { line: 1, column: 15 },
  6537. end: { line: 1, column: 17 }
  6538. }
  6539. },
  6540. kind: "",
  6541. 'static': false,
  6542. range: [9, 17],
  6543. loc: {
  6544. start: { line: 1, column: 9 },
  6545. end: { line: 1, column: 17 }
  6546. }
  6547. }
  6548. ],
  6549. range: [8, 18],
  6550. loc: {
  6551. start: { line: 1, column: 8 },
  6552. end: { line: 1, column: 18 }
  6553. }
  6554. },
  6555. range: [0, 18],
  6556. loc: {
  6557. start: { line: 1, column: 0 },
  6558. end: { line: 1, column: 18 }
  6559. }
  6560. },
  6561. 'class A { static get() {}}': {
  6562. type: 'ClassDeclaration',
  6563. id: {
  6564. type: 'Identifier',
  6565. name: 'A',
  6566. range: [6, 7],
  6567. loc: {
  6568. start: { line: 1, column: 6 },
  6569. end: { line: 1, column: 7 }
  6570. }
  6571. },
  6572. superClass: null,
  6573. body: {
  6574. type: 'ClassBody',
  6575. body: [{
  6576. type: 'MethodDefinition',
  6577. key: {
  6578. type: 'Identifier',
  6579. name: 'get',
  6580. range: [17, 20],
  6581. loc: {
  6582. start: { line: 1, column: 17 },
  6583. end: { line: 1, column: 20 }
  6584. }
  6585. },
  6586. value: {
  6587. type: 'FunctionExpression',
  6588. id: null,
  6589. params: [],
  6590. defaults: [],
  6591. body: {
  6592. type: 'BlockStatement',
  6593. body: [],
  6594. range: [23, 25],
  6595. loc: {
  6596. start: { line: 1, column: 23 },
  6597. end: { line: 1, column: 25 }
  6598. }
  6599. },
  6600. rest: null,
  6601. generator: false,
  6602. expression: false,
  6603. range: [23, 25],
  6604. loc: {
  6605. start: { line: 1, column: 23 },
  6606. end: { line: 1, column: 25 }
  6607. }
  6608. },
  6609. kind: '',
  6610. 'static': true,
  6611. range: [10, 25],
  6612. loc: {
  6613. start: { line: 1, column: 10 },
  6614. end: { line: 1, column: 25 }
  6615. }
  6616. }],
  6617. range: [8, 26],
  6618. loc: {
  6619. start: { line: 1, column: 8 },
  6620. end: { line: 1, column: 26 }
  6621. }
  6622. },
  6623. range: [0, 26],
  6624. loc: {
  6625. start: { line: 1, column: 0 },
  6626. end: { line: 1, column: 26 }
  6627. }
  6628. },
  6629. 'class A extends B {get foo() {}}': {
  6630. type: "ClassDeclaration",
  6631. id: {
  6632. type: "Identifier",
  6633. name: "A",
  6634. range: [6, 7],
  6635. loc: {
  6636. start: { line: 1, column: 6 },
  6637. end: { line: 1, column: 7 }
  6638. }
  6639. },
  6640. superClass: {
  6641. type: "Identifier",
  6642. name: "B",
  6643. range: [16, 17],
  6644. loc: {
  6645. start: { line: 1, column: 16 },
  6646. end: { line: 1, column: 17 }
  6647. }
  6648. },
  6649. body: {
  6650. type: "ClassBody",
  6651. body: [{
  6652. type: "MethodDefinition",
  6653. key: {
  6654. type: "Identifier",
  6655. name: "foo",
  6656. range: [23, 26],
  6657. loc: {
  6658. start: { line: 1, column: 23 },
  6659. end: { line: 1, column: 26 }
  6660. }
  6661. },
  6662. value: {
  6663. type: "FunctionExpression",
  6664. id: null,
  6665. params: [],
  6666. defaults: [],
  6667. body: {
  6668. type: "BlockStatement",
  6669. body: [],
  6670. range: [29, 31],
  6671. loc: {
  6672. start: { line: 1, column: 29 },
  6673. end: { line: 1, column: 31 }
  6674. }
  6675. },
  6676. rest: null,
  6677. generator: false,
  6678. expression: false,
  6679. range: [29, 31],
  6680. loc: {
  6681. start: { line: 1, column: 29 },
  6682. end: { line: 1, column: 31 }
  6683. }
  6684. },
  6685. kind: "get",
  6686. 'static': false,
  6687. range: [19, 31],
  6688. loc: {
  6689. start: { line: 1, column: 19 },
  6690. end: { line: 1, column: 31 }
  6691. }
  6692. }],
  6693. range: [18, 32],
  6694. loc: {
  6695. start: { line: 1, column: 18 },
  6696. end: { line: 1, column: 32 }
  6697. }
  6698. },
  6699. range: [0, 32],
  6700. loc: {
  6701. start: { line: 1, column: 0 },
  6702. end: { line: 1, column: 32 }
  6703. }
  6704. },
  6705. 'class A extends B { static get foo() {}}': {
  6706. type: 'ClassDeclaration',
  6707. id: {
  6708. type: 'Identifier',
  6709. name: 'A',
  6710. range: [6, 7],
  6711. loc: {
  6712. start: { line: 1, column: 6 },
  6713. end: { line: 1, column: 7 }
  6714. }
  6715. },
  6716. superClass: {
  6717. type: 'Identifier',
  6718. name: 'B',
  6719. range: [16, 17],
  6720. loc: {
  6721. start: { line: 1, column: 16 },
  6722. end: { line: 1, column: 17 }
  6723. }
  6724. },
  6725. body: {
  6726. type: 'ClassBody',
  6727. body: [{
  6728. type: 'MethodDefinition',
  6729. key: {
  6730. type: 'Identifier',
  6731. name: 'foo',
  6732. range: [31, 34],
  6733. loc: {
  6734. start: { line: 1, column: 31 },
  6735. end: { line: 1, column: 34 }
  6736. }
  6737. },
  6738. value: {
  6739. type: 'FunctionExpression',
  6740. id: null,
  6741. params: [],
  6742. defaults: [],
  6743. body: {
  6744. type: 'BlockStatement',
  6745. body: [],
  6746. range: [37, 39],
  6747. loc: {
  6748. start: { line: 1, column: 37 },
  6749. end: { line: 1, column: 39 }
  6750. }
  6751. },
  6752. rest: null,
  6753. generator: false,
  6754. expression: false,
  6755. range: [37, 39],
  6756. loc: {
  6757. start: { line: 1, column: 37 },
  6758. end: { line: 1, column: 39 }
  6759. }
  6760. },
  6761. kind: 'get',
  6762. 'static': true,
  6763. range: [20, 39],
  6764. loc: {
  6765. start: { line: 1, column: 20 },
  6766. end: { line: 1, column: 39 }
  6767. }
  6768. }],
  6769. range: [18, 40],
  6770. loc: {
  6771. start: { line: 1, column: 18 },
  6772. end: { line: 1, column: 40 }
  6773. }
  6774. },
  6775. range: [0, 40],
  6776. loc: {
  6777. start: { line: 1, column: 0 },
  6778. end: { line: 1, column: 40 }
  6779. }
  6780. },
  6781. 'class A {set a(v) {}}': {
  6782. type: "ClassDeclaration",
  6783. id: {
  6784. type: "Identifier",
  6785. name: "A",
  6786. range: [6, 7],
  6787. loc: {
  6788. start: { line: 1, column: 6 },
  6789. end: { line: 1, column: 7 }
  6790. }
  6791. },
  6792. superClass: null,
  6793. body: {
  6794. type: "ClassBody",
  6795. body: [
  6796. {
  6797. type: "MethodDefinition",
  6798. key: {
  6799. type: 'Identifier',
  6800. name: 'a',
  6801. range: [13, 14],
  6802. loc: {
  6803. start: { line: 1, column: 13 },
  6804. end: { line: 1, column: 14 }
  6805. }
  6806. },
  6807. value: {
  6808. type: "FunctionExpression",
  6809. id: null,
  6810. params: [{
  6811. type: 'Identifier',
  6812. name: 'v',
  6813. range: [15, 16],
  6814. loc: {
  6815. start: { line: 1, column: 15 },
  6816. end: { line: 1, column: 16 }
  6817. }
  6818. }],
  6819. defaults: [],
  6820. body: {
  6821. type: "BlockStatement",
  6822. body: [],
  6823. range: [18, 20],
  6824. loc: {
  6825. start: { line: 1, column: 18 },
  6826. end: { line: 1, column: 20 }
  6827. }
  6828. },
  6829. rest: null,
  6830. generator: false,
  6831. expression: false,
  6832. range: [18, 20],
  6833. loc: {
  6834. start: { line: 1, column: 18 },
  6835. end: { line: 1, column: 20 }
  6836. }
  6837. },
  6838. kind: "set",
  6839. 'static': false,
  6840. range: [9, 20],
  6841. loc: {
  6842. start: { line: 1, column: 9 },
  6843. end: { line: 1, column: 20 }
  6844. }
  6845. }
  6846. ],
  6847. range: [8, 21],
  6848. loc: {
  6849. start: { line: 1, column: 8 },
  6850. end: { line: 1, column: 21 }
  6851. }
  6852. },
  6853. range: [0, 21],
  6854. loc: {
  6855. start: { line: 1, column: 0 },
  6856. end: { line: 1, column: 21 }
  6857. }
  6858. },
  6859. 'class A { static set a(v) {}}': {
  6860. type: 'ClassDeclaration',
  6861. id: {
  6862. type: 'Identifier',
  6863. name: 'A',
  6864. range: [6, 7],
  6865. loc: {
  6866. start: { line: 1, column: 6 },
  6867. end: { line: 1, column: 7 }
  6868. }
  6869. },
  6870. superClass: null,
  6871. body: {
  6872. type: 'ClassBody',
  6873. body: [{
  6874. type: 'MethodDefinition',
  6875. key: {
  6876. type: 'Identifier',
  6877. name: 'a',
  6878. range: [21, 22],
  6879. loc: {
  6880. start: { line: 1, column: 21 },
  6881. end: { line: 1, column: 22 }
  6882. }
  6883. },
  6884. value: {
  6885. type: 'FunctionExpression',
  6886. id: null,
  6887. params: [{
  6888. type: 'Identifier',
  6889. name: 'v',
  6890. range: [23, 24],
  6891. loc: {
  6892. start: { line: 1, column: 23 },
  6893. end: { line: 1, column: 24 }
  6894. }
  6895. }],
  6896. defaults: [],
  6897. body: {
  6898. type: 'BlockStatement',
  6899. body: [],
  6900. range: [26, 28],
  6901. loc: {
  6902. start: { line: 1, column: 26 },
  6903. end: { line: 1, column: 28 }
  6904. }
  6905. },
  6906. rest: null,
  6907. generator: false,
  6908. expression: false,
  6909. range: [26, 28],
  6910. loc: {
  6911. start: { line: 1, column: 26 },
  6912. end: { line: 1, column: 28 }
  6913. }
  6914. },
  6915. kind: 'set',
  6916. 'static': true,
  6917. range: [10, 28],
  6918. loc: {
  6919. start: { line: 1, column: 10 },
  6920. end: { line: 1, column: 28 }
  6921. }
  6922. }],
  6923. range: [8, 29],
  6924. loc: {
  6925. start: { line: 1, column: 8 },
  6926. end: { line: 1, column: 29 }
  6927. }
  6928. },
  6929. range: [0, 29],
  6930. loc: {
  6931. start: { line: 1, column: 0 },
  6932. end: { line: 1, column: 29 }
  6933. }
  6934. },
  6935. 'class A {set(v) {};}': {
  6936. type: "ClassDeclaration",
  6937. id: {
  6938. type: "Identifier",
  6939. name: "A",
  6940. range: [6, 7],
  6941. loc: {
  6942. start: { line: 1, column: 6 },
  6943. end: { line: 1, column: 7 }
  6944. }
  6945. },
  6946. superClass: null,
  6947. body: {
  6948. type: "ClassBody",
  6949. body: [
  6950. {
  6951. type: "MethodDefinition",
  6952. key: {
  6953. type: "Identifier",
  6954. name: "set",
  6955. range: [9, 12],
  6956. loc: {
  6957. start: { line: 1, column: 9 },
  6958. end: { line: 1, column: 12 }
  6959. }
  6960. },
  6961. value: {
  6962. type: "FunctionExpression",
  6963. id: null,
  6964. params: [{
  6965. type: 'Identifier',
  6966. name: 'v',
  6967. range: [13, 14],
  6968. loc: {
  6969. start: { line: 1, column: 13 },
  6970. end: { line: 1, column: 14 }
  6971. }
  6972. }],
  6973. defaults: [],
  6974. body: {
  6975. type: "BlockStatement",
  6976. body: [],
  6977. range: [16, 18],
  6978. loc: {
  6979. start: { line: 1, column: 16 },
  6980. end: { line: 1, column: 18 }
  6981. }
  6982. },
  6983. rest: null,
  6984. generator: false,
  6985. expression: false,
  6986. range: [16, 18],
  6987. loc: {
  6988. start: { line: 1, column: 16 },
  6989. end: { line: 1, column: 18 }
  6990. }
  6991. },
  6992. kind: "",
  6993. 'static': false,
  6994. range: [9, 18],
  6995. loc: {
  6996. start: { line: 1, column: 9 },
  6997. end: { line: 1, column: 18 }
  6998. }
  6999. }
  7000. ],
  7001. range: [8, 20],
  7002. loc: {
  7003. start: { line: 1, column: 8 },
  7004. end: { line: 1, column: 20 }
  7005. }
  7006. },
  7007. range: [0, 20],
  7008. loc: {
  7009. start: { line: 1, column: 0 },
  7010. end: { line: 1, column: 20 }
  7011. }
  7012. },
  7013. 'class A { static set(v) {};}': {
  7014. type: 'ClassDeclaration',
  7015. id: {
  7016. type: 'Identifier',
  7017. name: 'A',
  7018. range: [6, 7],
  7019. loc: {
  7020. start: { line: 1, column: 6 },
  7021. end: { line: 1, column: 7 }
  7022. }
  7023. },
  7024. superClass: null,
  7025. body: {
  7026. type: 'ClassBody',
  7027. body: [{
  7028. type: 'MethodDefinition',
  7029. key: {
  7030. type: 'Identifier',
  7031. name: 'set',
  7032. range: [17, 20],
  7033. loc: {
  7034. start: { line: 1, column: 17 },
  7035. end: { line: 1, column: 20 }
  7036. }
  7037. },
  7038. value: {
  7039. type: 'FunctionExpression',
  7040. id: null,
  7041. params: [{
  7042. type: 'Identifier',
  7043. name: 'v',
  7044. range: [21, 22],
  7045. loc: {
  7046. start: { line: 1, column: 21 },
  7047. end: { line: 1, column: 22 }
  7048. }
  7049. }],
  7050. defaults: [],
  7051. body: {
  7052. type: 'BlockStatement',
  7053. body: [],
  7054. range: [24, 26],
  7055. loc: {
  7056. start: { line: 1, column: 24 },
  7057. end: { line: 1, column: 26 }
  7058. }
  7059. },
  7060. rest: null,
  7061. generator: false,
  7062. expression: false,
  7063. range: [24, 26],
  7064. loc: {
  7065. start: { line: 1, column: 24 },
  7066. end: { line: 1, column: 26 }
  7067. }
  7068. },
  7069. kind: '',
  7070. 'static': true,
  7071. range: [10, 26],
  7072. loc: {
  7073. start: { line: 1, column: 10 },
  7074. end: { line: 1, column: 26 }
  7075. }
  7076. }],
  7077. range: [8, 28],
  7078. loc: {
  7079. start: { line: 1, column: 8 },
  7080. end: { line: 1, column: 28 }
  7081. }
  7082. },
  7083. range: [0, 28],
  7084. loc: {
  7085. start: { line: 1, column: 0 },
  7086. end: { line: 1, column: 28 }
  7087. }
  7088. },
  7089. 'class A {*gen(v) { yield v; }}': {
  7090. type: "ClassDeclaration",
  7091. id: {
  7092. type: "Identifier",
  7093. name: "A",
  7094. range: [6, 7],
  7095. loc: {
  7096. start: { line: 1, column: 6 },
  7097. end: { line: 1, column: 7 }
  7098. }
  7099. },
  7100. superClass: null,
  7101. body: {
  7102. type: "ClassBody",
  7103. body: [
  7104. {
  7105. type: "MethodDefinition",
  7106. key: {
  7107. type: "Identifier",
  7108. name: "gen",
  7109. range: [10, 13],
  7110. loc: {
  7111. start: { line: 1, column: 10 },
  7112. end: { line: 1, column: 13 }
  7113. }
  7114. },
  7115. value: {
  7116. type: "FunctionExpression",
  7117. id: null,
  7118. params: [{
  7119. type: 'Identifier',
  7120. name: 'v',
  7121. range: [14, 15],
  7122. loc: {
  7123. start: { line: 1, column: 14 },
  7124. end: { line: 1, column: 15 }
  7125. }
  7126. }],
  7127. defaults: [],
  7128. body: {
  7129. type: "BlockStatement",
  7130. body: [{
  7131. type: 'ExpressionStatement',
  7132. expression: {
  7133. type: 'YieldExpression',
  7134. argument: {
  7135. type: 'Identifier',
  7136. name: 'v',
  7137. range: [25, 26],
  7138. loc: {
  7139. start: { line: 1, column: 25 },
  7140. end: { line: 1, column: 26 }
  7141. }
  7142. },
  7143. delegate: false,
  7144. range: [19, 26],
  7145. loc: {
  7146. start: { line: 1, column: 19 },
  7147. end: { line: 1, column: 26 }
  7148. }
  7149. },
  7150. range: [19, 27],
  7151. loc: {
  7152. start: { line: 1, column: 19 },
  7153. end: { line: 1, column: 27 }
  7154. }
  7155. }],
  7156. range: [17, 29],
  7157. loc: {
  7158. start: { line: 1, column: 17 },
  7159. end: { line: 1, column: 29 }
  7160. }
  7161. },
  7162. rest: null,
  7163. generator: true,
  7164. expression: false,
  7165. range: [17, 29],
  7166. loc: {
  7167. start: { line: 1, column: 17 },
  7168. end: { line: 1, column: 29 }
  7169. }
  7170. },
  7171. kind: "",
  7172. 'static': false,
  7173. range: [9, 29],
  7174. loc: {
  7175. start: { line: 1, column: 9 },
  7176. end: { line: 1, column: 29 }
  7177. }
  7178. }
  7179. ],
  7180. range: [8, 30],
  7181. loc: {
  7182. start: { line: 1, column: 8 },
  7183. end: { line: 1, column: 30 }
  7184. }
  7185. },
  7186. range: [0, 30],
  7187. loc: {
  7188. start: { line: 1, column: 0 },
  7189. end: { line: 1, column: 30 }
  7190. }
  7191. },
  7192. 'class A { static *gen(v) { yield v; }}': {
  7193. type: 'ClassDeclaration',
  7194. id: {
  7195. type: 'Identifier',
  7196. name: 'A',
  7197. range: [6, 7],
  7198. loc: {
  7199. start: { line: 1, column: 6 },
  7200. end: { line: 1, column: 7 }
  7201. }
  7202. },
  7203. superClass: null,
  7204. body: {
  7205. type: 'ClassBody',
  7206. body: [{
  7207. type: 'MethodDefinition',
  7208. key: {
  7209. type: 'Identifier',
  7210. name: 'gen',
  7211. range: [18, 21],
  7212. loc: {
  7213. start: { line: 1, column: 18 },
  7214. end: { line: 1, column: 21 }
  7215. }
  7216. },
  7217. value: {
  7218. type: 'FunctionExpression',
  7219. id: null,
  7220. params: [{
  7221. type: 'Identifier',
  7222. name: 'v',
  7223. range: [22, 23],
  7224. loc: {
  7225. start: { line: 1, column: 22 },
  7226. end: { line: 1, column: 23 }
  7227. }
  7228. }],
  7229. defaults: [],
  7230. body: {
  7231. type: 'BlockStatement',
  7232. body: [{
  7233. type: 'ExpressionStatement',
  7234. expression: {
  7235. type: 'YieldExpression',
  7236. argument: {
  7237. type: 'Identifier',
  7238. name: 'v',
  7239. range: [33, 34],
  7240. loc: {
  7241. start: { line: 1, column: 33 },
  7242. end: { line: 1, column: 34 }
  7243. }
  7244. },
  7245. delegate: false,
  7246. range: [27, 34],
  7247. loc: {
  7248. start: { line: 1, column: 27 },
  7249. end: { line: 1, column: 34 }
  7250. }
  7251. },
  7252. range: [27, 35],
  7253. loc: {
  7254. start: { line: 1, column: 27 },
  7255. end: { line: 1, column: 35 }
  7256. }
  7257. }],
  7258. range: [25, 37],
  7259. loc: {
  7260. start: { line: 1, column: 25 },
  7261. end: { line: 1, column: 37 }
  7262. }
  7263. },
  7264. rest: null,
  7265. generator: true,
  7266. expression: false,
  7267. range: [25, 37],
  7268. loc: {
  7269. start: { line: 1, column: 25 },
  7270. end: { line: 1, column: 37 }
  7271. }
  7272. },
  7273. kind: '',
  7274. 'static': true,
  7275. range: [10, 37],
  7276. loc: {
  7277. start: { line: 1, column: 10 },
  7278. end: { line: 1, column: 37 }
  7279. }
  7280. }],
  7281. range: [8, 38],
  7282. loc: {
  7283. start: { line: 1, column: 8 },
  7284. end: { line: 1, column: 38 }
  7285. }
  7286. },
  7287. range: [0, 38],
  7288. loc: {
  7289. start: { line: 1, column: 0 },
  7290. end: { line: 1, column: 38 }
  7291. }
  7292. },
  7293. '"use strict"; (class A {constructor() { super() }})': {
  7294. type: "Program",
  7295. body: [
  7296. {
  7297. type: "ExpressionStatement",
  7298. expression: {
  7299. type: "Literal",
  7300. value: "use strict",
  7301. raw: "\"use strict\"",
  7302. range: [0, 12],
  7303. loc: {
  7304. start: { line: 1, column: 0 },
  7305. end: { line: 1, column: 12 }
  7306. }
  7307. },
  7308. range: [0, 13],
  7309. loc: {
  7310. start: { line: 1, column: 0 },
  7311. end: { line: 1, column: 13 }
  7312. }
  7313. },
  7314. {
  7315. type: "ExpressionStatement",
  7316. expression: {
  7317. type: "ClassExpression",
  7318. id: {
  7319. type: "Identifier",
  7320. name: "A",
  7321. range: [21, 22],
  7322. loc: {
  7323. start: { line: 1, column: 21 },
  7324. end: { line: 1, column: 22 }
  7325. }
  7326. },
  7327. superClass: null,
  7328. body: {
  7329. type: "ClassBody",
  7330. body: [
  7331. {
  7332. type: "MethodDefinition",
  7333. key: {
  7334. type: "Identifier",
  7335. name: "constructor",
  7336. range: [24, 35],
  7337. loc: {
  7338. start: { line: 1, column: 24 },
  7339. end: { line: 1, column: 35 }
  7340. }
  7341. },
  7342. value: {
  7343. type: "FunctionExpression",
  7344. id: null,
  7345. params: [],
  7346. defaults: [],
  7347. body: {
  7348. type: "BlockStatement",
  7349. body: [
  7350. {
  7351. type: "ExpressionStatement",
  7352. expression: {
  7353. type: "CallExpression",
  7354. callee: {
  7355. type: "Identifier",
  7356. name: "super",
  7357. range: [40, 45],
  7358. loc: {
  7359. start: { line: 1, column: 40 },
  7360. end: { line: 1, column: 45 }
  7361. }
  7362. },
  7363. 'arguments': [],
  7364. range: [40, 47],
  7365. loc: {
  7366. start: { line: 1, column: 40 },
  7367. end: { line: 1, column: 47 }
  7368. }
  7369. },
  7370. range: [40, 48],
  7371. loc: {
  7372. start: { line: 1, column: 40 },
  7373. end: { line: 1, column: 48 }
  7374. }
  7375. }
  7376. ],
  7377. range: [38, 49],
  7378. loc: {
  7379. start: { line: 1, column: 38 },
  7380. end: { line: 1, column: 49 }
  7381. }
  7382. },
  7383. rest: null,
  7384. generator: false,
  7385. expression: false,
  7386. range: [38, 49],
  7387. loc: {
  7388. start: { line: 1, column: 38 },
  7389. end: { line: 1, column: 49 }
  7390. }
  7391. },
  7392. kind: "",
  7393. 'static': false,
  7394. range: [24, 49],
  7395. loc: {
  7396. start: { line: 1, column: 24 },
  7397. end: { line: 1, column: 49 }
  7398. }
  7399. }
  7400. ],
  7401. range: [23, 50],
  7402. loc: {
  7403. start: { line: 1, column: 23 },
  7404. end: { line: 1, column: 50 }
  7405. }
  7406. },
  7407. range: [15, 50],
  7408. loc: {
  7409. start: { line: 1, column: 15 },
  7410. end: { line: 1, column: 50 }
  7411. }
  7412. },
  7413. range: [14, 51],
  7414. loc: {
  7415. start: { line: 1, column: 14 },
  7416. end: { line: 1, column: 51 }
  7417. }
  7418. }
  7419. ],
  7420. range: [0, 51],
  7421. loc: {
  7422. start: { line: 1, column: 0 },
  7423. end: { line: 1, column: 51 }
  7424. },
  7425. comments: []
  7426. },
  7427. 'class A {static foo() {}}': {
  7428. type: 'ClassDeclaration',
  7429. id: {
  7430. type: 'Identifier',
  7431. name: 'A',
  7432. range: [6, 7],
  7433. loc: {
  7434. start: { line: 1, column: 6 },
  7435. end: { line: 1, column: 7}
  7436. }
  7437. },
  7438. superClass: null,
  7439. body: {
  7440. type: 'ClassBody',
  7441. body: [{
  7442. type: 'MethodDefinition',
  7443. key: {
  7444. type: 'Identifier',
  7445. name: 'foo',
  7446. range: [16, 19],
  7447. loc: {
  7448. start: { line: 1, column: 16 },
  7449. end: { line: 1, column: 19 }
  7450. }
  7451. },
  7452. value: {
  7453. type: 'FunctionExpression',
  7454. id: null,
  7455. params: [],
  7456. defaults: [],
  7457. body: {
  7458. type: 'BlockStatement',
  7459. body: [],
  7460. range: [22, 24],
  7461. loc: {
  7462. start: { line: 1, column: 22 },
  7463. end: { line: 1, column: 24}
  7464. }
  7465. },
  7466. rest: null,
  7467. generator: false,
  7468. expression: false,
  7469. range: [22, 24],
  7470. loc: {
  7471. start: { line: 1, column: 22 },
  7472. end: { line: 1, column: 24 }
  7473. }
  7474. },
  7475. kind: '',
  7476. 'static': true,
  7477. range: [9, 24],
  7478. loc: {
  7479. start: { line: 1, column: 9 },
  7480. end: { line: 1, column: 24 }
  7481. }
  7482. }],
  7483. range: [8, 25],
  7484. loc: {
  7485. start: { line: 1, column: 8 },
  7486. end: { line: 1, column: 25 }
  7487. }
  7488. },
  7489. range: [0, 25],
  7490. loc: {
  7491. start: { line: 1, column: 0 },
  7492. end: { line: 1, column: 25 }
  7493. }
  7494. },
  7495. 'class A {foo() {} static bar() {}}': {
  7496. type: 'ClassDeclaration',
  7497. id: {
  7498. type: 'Identifier',
  7499. name: 'A',
  7500. range: [6, 7],
  7501. loc: {
  7502. start: { line: 1, column: 6 },
  7503. end: { line: 1, column: 7 }
  7504. }
  7505. },
  7506. superClass: null,
  7507. body: {
  7508. type: 'ClassBody',
  7509. body: [{
  7510. type: 'MethodDefinition',
  7511. key: {
  7512. type: 'Identifier',
  7513. name: 'foo',
  7514. range: [9, 12],
  7515. loc: {
  7516. start: { line: 1, column: 9 },
  7517. end: { line: 1, column: 12 }
  7518. }
  7519. },
  7520. value: {
  7521. type: 'FunctionExpression',
  7522. id: null,
  7523. params: [],
  7524. defaults: [],
  7525. body: {
  7526. type: 'BlockStatement',
  7527. body: [],
  7528. range: [15, 17],
  7529. loc: {
  7530. start: { line: 1, column: 15 },
  7531. end: { line: 1, column: 17 }
  7532. }
  7533. },
  7534. rest: null,
  7535. generator: false,
  7536. expression: false,
  7537. range: [15, 17],
  7538. loc: {
  7539. start: { line: 1, column: 15 },
  7540. end: { line: 1, column: 17 }
  7541. }
  7542. },
  7543. kind: '',
  7544. 'static': false,
  7545. range: [9, 17],
  7546. loc: {
  7547. start: { line: 1, column: 9 },
  7548. end: { line: 1, column: 17 }
  7549. }
  7550. }, {
  7551. type: 'MethodDefinition',
  7552. key: {
  7553. type: 'Identifier',
  7554. name: 'bar',
  7555. range: [25, 28],
  7556. loc: {
  7557. start: { line: 1, column: 25 },
  7558. end: { line: 1, column: 28 }
  7559. }
  7560. },
  7561. value: {
  7562. type: 'FunctionExpression',
  7563. id: null,
  7564. params: [],
  7565. defaults: [],
  7566. body: {
  7567. type: 'BlockStatement',
  7568. body: [],
  7569. range: [31, 33],
  7570. loc: {
  7571. start: { line: 1, column: 31 },
  7572. end: { line: 1, column: 33 }
  7573. }
  7574. },
  7575. rest: null,
  7576. generator: false,
  7577. expression: false,
  7578. range: [31, 33],
  7579. loc: {
  7580. start: { line: 1, column: 31 },
  7581. end: { line: 1, column: 33 }
  7582. }
  7583. },
  7584. kind: '',
  7585. 'static': true,
  7586. range: [18, 33],
  7587. loc: {
  7588. start: { line: 1, column: 18 },
  7589. end: { line: 1, column: 33 }
  7590. }
  7591. }],
  7592. range: [8, 34],
  7593. loc: {
  7594. start: { line: 1, column: 8 },
  7595. end: { line: 1, column: 34 }
  7596. }
  7597. },
  7598. range: [0, 34],
  7599. loc: {
  7600. start: { line: 1, column: 0 },
  7601. end: { line: 1, column: 34 }
  7602. }
  7603. },
  7604. '"use strict"; (class A { static constructor() { super() }})': {
  7605. type: 'Program',
  7606. body: [{
  7607. type: 'ExpressionStatement',
  7608. expression: {
  7609. type: 'Literal',
  7610. value: 'use strict',
  7611. raw: '"use strict"',
  7612. range: [0, 12],
  7613. loc: {
  7614. start: { line: 1, column: 0 },
  7615. end: { line: 1, column: 12 }
  7616. }
  7617. },
  7618. range: [0, 13],
  7619. loc: {
  7620. start: { line: 1, column: 0 },
  7621. end: { line: 1, column: 13 }
  7622. }
  7623. }, {
  7624. type: 'ExpressionStatement',
  7625. expression: {
  7626. type: 'ClassExpression',
  7627. id: {
  7628. type: 'Identifier',
  7629. name: 'A',
  7630. range: [21, 22],
  7631. loc: {
  7632. start: { line: 1, column: 21 },
  7633. end: { line: 1, column: 22 }
  7634. }
  7635. },
  7636. superClass: null,
  7637. body: {
  7638. type: 'ClassBody',
  7639. body: [{
  7640. type: 'MethodDefinition',
  7641. key: {
  7642. type: 'Identifier',
  7643. name: 'constructor',
  7644. range: [32, 43],
  7645. loc: {
  7646. start: { line: 1, column: 32 },
  7647. end: { line: 1, column: 43 }
  7648. }
  7649. },
  7650. value: {
  7651. type: 'FunctionExpression',
  7652. id: null,
  7653. params: [],
  7654. defaults: [],
  7655. body: {
  7656. type: 'BlockStatement',
  7657. body: [{
  7658. type: 'ExpressionStatement',
  7659. expression: {
  7660. type: 'CallExpression',
  7661. callee: {
  7662. type: 'Identifier',
  7663. name: 'super',
  7664. range: [48, 53],
  7665. loc: {
  7666. start: { line: 1, column: 48 },
  7667. end: { line: 1, column: 53 }
  7668. }
  7669. },
  7670. 'arguments': [],
  7671. range: [48, 55],
  7672. loc: {
  7673. start: { line: 1, column: 48 },
  7674. end: { line: 1, column: 55 }
  7675. }
  7676. },
  7677. range: [48, 56],
  7678. loc: {
  7679. start: { line: 1, column: 48 },
  7680. end: { line: 1, column: 56 }
  7681. }
  7682. }],
  7683. range: [46, 57],
  7684. loc: {
  7685. start: { line: 1, column: 46 },
  7686. end: { line: 1, column: 57 }
  7687. }
  7688. },
  7689. rest: null,
  7690. generator: false,
  7691. expression: false,
  7692. range: [46, 57],
  7693. loc: {
  7694. start: { line: 1, column: 46 },
  7695. end: { line: 1, column: 57 }
  7696. }
  7697. },
  7698. kind: '',
  7699. 'static': true,
  7700. range: [25, 57],
  7701. loc: {
  7702. start: { line: 1, column: 25 },
  7703. end: { line: 1, column: 57 }
  7704. }
  7705. }],
  7706. range: [23, 58],
  7707. loc: {
  7708. start: { line: 1, column: 23 },
  7709. end: { line: 1, column: 58 }
  7710. }
  7711. },
  7712. range: [15, 58],
  7713. loc: {
  7714. start: { line: 1, column: 15 },
  7715. end: { line: 1, column: 58 }
  7716. }
  7717. },
  7718. range: [14, 59],
  7719. loc: {
  7720. start: { line: 1, column: 14 },
  7721. end: { line: 1, column: 59 }
  7722. }
  7723. }],
  7724. range: [0, 59],
  7725. loc: {
  7726. start: { line: 1, column: 0 },
  7727. end: { line: 1, column: 59 }
  7728. },
  7729. comments: []
  7730. },
  7731. 'class A { foo() {} bar() {}}': {
  7732. type: 'ClassDeclaration',
  7733. id: {
  7734. type: 'Identifier',
  7735. name: 'A',
  7736. range: [6, 7],
  7737. loc: {
  7738. start: { line: 1, column: 6 },
  7739. end: { line: 1, column: 7 }
  7740. }
  7741. },
  7742. superClass: null,
  7743. body: {
  7744. type: 'ClassBody',
  7745. body: [{
  7746. type: 'MethodDefinition',
  7747. key: {
  7748. type: 'Identifier',
  7749. name: 'foo',
  7750. range: [10, 13],
  7751. loc: {
  7752. start: { line: 1, column: 10 },
  7753. end: { line: 1, column: 13 }
  7754. }
  7755. },
  7756. value: {
  7757. type: 'FunctionExpression',
  7758. id: null,
  7759. params: [],
  7760. defaults: [],
  7761. body: {
  7762. type: 'BlockStatement',
  7763. body: [],
  7764. range: [16, 18],
  7765. loc: {
  7766. start: { line: 1, column: 16 },
  7767. end: { line: 1, column: 18 }
  7768. }
  7769. },
  7770. rest: null,
  7771. generator: false,
  7772. expression: false,
  7773. range: [16, 18],
  7774. loc: {
  7775. start: { line: 1, column: 16 },
  7776. end: { line: 1, column: 18 }
  7777. }
  7778. },
  7779. kind: '',
  7780. 'static': false,
  7781. range: [10, 18],
  7782. loc: {
  7783. start: { line: 1, column: 10 },
  7784. end: { line: 1, column: 18 }
  7785. }
  7786. }, {
  7787. type: 'MethodDefinition',
  7788. key: {
  7789. type: 'Identifier',
  7790. name: 'bar',
  7791. range: [19, 22],
  7792. loc: {
  7793. start: { line: 1, column: 19 },
  7794. end: { line: 1, column: 22 }
  7795. }
  7796. },
  7797. value: {
  7798. type: 'FunctionExpression',
  7799. id: null,
  7800. params: [],
  7801. defaults: [],
  7802. body: {
  7803. type: 'BlockStatement',
  7804. body: [],
  7805. range: [25, 27],
  7806. loc: {
  7807. start: { line: 1, column: 25 },
  7808. end: { line: 1, column: 27 }
  7809. }
  7810. },
  7811. rest: null,
  7812. generator: false,
  7813. expression: false,
  7814. range: [25, 27],
  7815. loc: {
  7816. start: { line: 1, column: 25 },
  7817. end: { line: 1, column: 27 }
  7818. }
  7819. },
  7820. kind: '',
  7821. 'static': false,
  7822. range: [19, 27],
  7823. loc: {
  7824. start: { line: 1, column: 19 },
  7825. end: { line: 1, column: 27 }
  7826. }
  7827. }],
  7828. range: [8, 28],
  7829. loc: {
  7830. start: { line: 1, column: 8 },
  7831. end: { line: 1, column: 28 }
  7832. }
  7833. },
  7834. range: [0, 28],
  7835. loc: {
  7836. start: { line: 1, column: 0 },
  7837. end: { line: 1, column: 28 }
  7838. }
  7839. },
  7840. 'class A { get foo() {} set foo(v) {}}': {
  7841. type: 'ClassDeclaration',
  7842. id: {
  7843. type: 'Identifier',
  7844. name: 'A',
  7845. range: [6, 7],
  7846. loc: {
  7847. start: { line: 1, column: 6 },
  7848. end: { line: 1, column: 7 }
  7849. }
  7850. },
  7851. superClass: null,
  7852. body: {
  7853. type: 'ClassBody',
  7854. body: [{
  7855. type: 'MethodDefinition',
  7856. key: {
  7857. type: 'Identifier',
  7858. name: 'foo',
  7859. range: [14, 17],
  7860. loc: {
  7861. start: { line: 1, column: 14 },
  7862. end: { line: 1, column: 17 }
  7863. }
  7864. },
  7865. value: {
  7866. type: 'FunctionExpression',
  7867. id: null,
  7868. params: [],
  7869. defaults: [],
  7870. body: {
  7871. type: 'BlockStatement',
  7872. body: [],
  7873. range: [20, 22],
  7874. loc: {
  7875. start: { line: 1, column: 20 },
  7876. end: { line: 1, column: 22 }
  7877. }
  7878. },
  7879. rest: null,
  7880. generator: false,
  7881. expression: false,
  7882. range: [20, 22],
  7883. loc: {
  7884. start: { line: 1, column: 20 },
  7885. end: { line: 1, column: 22 }
  7886. }
  7887. },
  7888. kind: 'get',
  7889. 'static': false,
  7890. range: [10, 22],
  7891. loc: {
  7892. start: { line: 1, column: 10 },
  7893. end: { line: 1, column: 22 }
  7894. }
  7895. }, {
  7896. type: 'MethodDefinition',
  7897. key: {
  7898. type: 'Identifier',
  7899. name: 'foo',
  7900. range: [27, 30],
  7901. loc: {
  7902. start: { line: 1, column: 27 },
  7903. end: { line: 1, column: 30 }
  7904. }
  7905. },
  7906. value: {
  7907. type: 'FunctionExpression',
  7908. id: null,
  7909. params: [{
  7910. type: 'Identifier',
  7911. name: 'v',
  7912. range: [31, 32],
  7913. loc: {
  7914. start: { line: 1, column: 31 },
  7915. end: { line: 1, column: 32 }
  7916. }
  7917. }],
  7918. defaults: [],
  7919. body: {
  7920. type: 'BlockStatement',
  7921. body: [],
  7922. range: [34, 36],
  7923. loc: {
  7924. start: { line: 1, column: 34 },
  7925. end: { line: 1, column: 36 }
  7926. }
  7927. },
  7928. rest: null,
  7929. generator: false,
  7930. expression: false,
  7931. range: [34, 36],
  7932. loc: {
  7933. start: { line: 1, column: 34 },
  7934. end: { line: 1, column: 36 }
  7935. }
  7936. },
  7937. kind: 'set',
  7938. 'static': false,
  7939. range: [23, 36],
  7940. loc: {
  7941. start: { line: 1, column: 23 },
  7942. end: { line: 1, column: 36 }
  7943. }
  7944. }],
  7945. range: [8, 37],
  7946. loc: {
  7947. start: { line: 1, column: 8 },
  7948. end: { line: 1, column: 37 }
  7949. }
  7950. },
  7951. range: [0, 37],
  7952. loc: {
  7953. start: { line: 1, column: 0 },
  7954. end: { line: 1, column: 37 }
  7955. }
  7956. },
  7957. 'class A { static get foo() {} get foo() {}}': {
  7958. type: 'ClassDeclaration',
  7959. id: {
  7960. type: 'Identifier',
  7961. name: 'A',
  7962. range: [6, 7],
  7963. loc: {
  7964. start: { line: 1, column: 6 },
  7965. end: { line: 1, column: 7 }
  7966. }
  7967. },
  7968. superClass: null,
  7969. body: {
  7970. type: 'ClassBody',
  7971. body: [{
  7972. type: 'MethodDefinition',
  7973. key: {
  7974. type: 'Identifier',
  7975. name: 'foo',
  7976. range: [21, 24],
  7977. loc: {
  7978. start: { line: 1, column: 21 },
  7979. end: { line: 1, column: 24 }
  7980. }
  7981. },
  7982. value: {
  7983. type: 'FunctionExpression',
  7984. id: null,
  7985. params: [],
  7986. defaults: [],
  7987. body: {
  7988. type: 'BlockStatement',
  7989. body: [],
  7990. range: [27, 29],
  7991. loc: {
  7992. start: { line: 1, column: 27 },
  7993. end: { line: 1, column: 29 }
  7994. }
  7995. },
  7996. rest: null,
  7997. generator: false,
  7998. expression: false,
  7999. range: [27, 29],
  8000. loc: {
  8001. start: { line: 1, column: 27 },
  8002. end: { line: 1, column: 29 }
  8003. }
  8004. },
  8005. kind: 'get',
  8006. 'static': true,
  8007. range: [10, 29],
  8008. loc: {
  8009. start: { line: 1, column: 10 },
  8010. end: { line: 1, column: 29 }
  8011. }
  8012. }, {
  8013. type: 'MethodDefinition',
  8014. key: {
  8015. type: 'Identifier',
  8016. name: 'foo',
  8017. range: [34, 37],
  8018. loc: {
  8019. start: { line: 1, column: 34 },
  8020. end: { line: 1, column: 37 }
  8021. }
  8022. },
  8023. value: {
  8024. type: 'FunctionExpression',
  8025. id: null,
  8026. params: [],
  8027. defaults: [],
  8028. body: {
  8029. type: 'BlockStatement',
  8030. body: [],
  8031. range: [40, 42],
  8032. loc: {
  8033. start: { line: 1, column: 40 },
  8034. end: { line: 1, column: 42 }
  8035. }
  8036. },
  8037. rest: null,
  8038. generator: false,
  8039. expression: false,
  8040. range: [40, 42],
  8041. loc: {
  8042. start: { line: 1, column: 40 },
  8043. end: { line: 1, column: 42 }
  8044. }
  8045. },
  8046. kind: 'get',
  8047. 'static': false,
  8048. range: [30, 42],
  8049. loc: {
  8050. start: { line: 1, column: 30 },
  8051. end: { line: 1, column: 42 }
  8052. }
  8053. }],
  8054. range: [8, 43],
  8055. loc: {
  8056. start: { line: 1, column: 8 },
  8057. end: { line: 1, column: 43 }
  8058. }
  8059. },
  8060. range: [0, 43],
  8061. loc: {
  8062. start: { line: 1, column: 0 },
  8063. end: { line: 1, column: 43 }
  8064. }
  8065. },
  8066. 'class A { static get foo() {} static get bar() {} }': {
  8067. type: 'ClassDeclaration',
  8068. id: {
  8069. type: 'Identifier',
  8070. name: 'A',
  8071. range: [6, 7],
  8072. loc: {
  8073. start: { line: 1, column: 6 },
  8074. end: { line: 1, column: 7 }
  8075. }
  8076. },
  8077. superClass: null,
  8078. body: {
  8079. type: 'ClassBody',
  8080. body: [{
  8081. type: 'MethodDefinition',
  8082. key: {
  8083. type: 'Identifier',
  8084. name: 'foo',
  8085. range: [21, 24],
  8086. loc: {
  8087. start: { line: 1, column: 21 },
  8088. end: { line: 1, column: 24 }
  8089. }
  8090. },
  8091. value: {
  8092. type: 'FunctionExpression',
  8093. id: null,
  8094. params: [],
  8095. defaults: [],
  8096. body: {
  8097. type: 'BlockStatement',
  8098. body: [],
  8099. range: [27, 29],
  8100. loc: {
  8101. start: { line: 1, column: 27 },
  8102. end: { line: 1, column: 29 }
  8103. }
  8104. },
  8105. rest: null,
  8106. generator: false,
  8107. expression: false,
  8108. range: [27, 29],
  8109. loc: {
  8110. start: { line: 1, column: 27 },
  8111. end: { line: 1, column: 29 }
  8112. }
  8113. },
  8114. kind: 'get',
  8115. 'static': true,
  8116. range: [10, 29],
  8117. loc: {
  8118. start: { line: 1, column: 10 },
  8119. end: { line: 1, column: 29 }
  8120. }
  8121. }, {
  8122. type: 'MethodDefinition',
  8123. key: {
  8124. type: 'Identifier',
  8125. name: 'bar',
  8126. range: [41, 44],
  8127. loc: {
  8128. start: { line: 1, column: 41 },
  8129. end: { line: 1, column: 44 }
  8130. }
  8131. },
  8132. value: {
  8133. type: 'FunctionExpression',
  8134. id: null,
  8135. params: [],
  8136. defaults: [],
  8137. body: {
  8138. type: 'BlockStatement',
  8139. body: [],
  8140. range: [47, 49],
  8141. loc: {
  8142. start: { line: 1, column: 47 },
  8143. end: { line: 1, column: 49 }
  8144. }
  8145. },
  8146. rest: null,
  8147. generator: false,
  8148. expression: false,
  8149. range: [47, 49],
  8150. loc: {
  8151. start: { line: 1, column: 47 },
  8152. end: { line: 1, column: 49 }
  8153. }
  8154. },
  8155. kind: 'get',
  8156. 'static': true,
  8157. range: [30, 49],
  8158. loc: {
  8159. start: { line: 1, column: 30 },
  8160. end: { line: 1, column: 49 }
  8161. }
  8162. }],
  8163. range: [8, 51],
  8164. loc: {
  8165. start: { line: 1, column: 8 },
  8166. end: { line: 1, column: 51 }
  8167. }
  8168. },
  8169. range: [0, 51],
  8170. loc: {
  8171. start: { line: 1, column: 0 },
  8172. end: { line: 1, column: 51 }
  8173. }
  8174. },
  8175. 'class A { static get foo() {} static set foo(v) {} get foo() {} set foo(v) {}}': {
  8176. type: 'ClassDeclaration',
  8177. id: {
  8178. type: 'Identifier',
  8179. name: 'A',
  8180. range: [6, 7],
  8181. loc: {
  8182. start: { line: 1, column: 6 },
  8183. end: { line: 1, column: 7 }
  8184. }
  8185. },
  8186. superClass: null,
  8187. body: {
  8188. type: 'ClassBody',
  8189. body: [{
  8190. type: 'MethodDefinition',
  8191. key: {
  8192. type: 'Identifier',
  8193. name: 'foo',
  8194. range: [21, 24],
  8195. loc: {
  8196. start: { line: 1, column: 21 },
  8197. end: { line: 1, column: 24 }
  8198. }
  8199. },
  8200. value: {
  8201. type: 'FunctionExpression',
  8202. id: null,
  8203. params: [],
  8204. defaults: [],
  8205. body: {
  8206. type: 'BlockStatement',
  8207. body: [],
  8208. range: [27, 29],
  8209. loc: {
  8210. start: { line: 1, column: 27 },
  8211. end: { line: 1, column: 29 }
  8212. }
  8213. },
  8214. rest: null,
  8215. generator: false,
  8216. expression: false,
  8217. range: [27, 29],
  8218. loc: {
  8219. start: { line: 1, column: 27 },
  8220. end: { line: 1, column: 29 }
  8221. }
  8222. },
  8223. kind: 'get',
  8224. 'static': true,
  8225. range: [10, 29],
  8226. loc: {
  8227. start: { line: 1, column: 10 },
  8228. end: { line: 1, column: 29 }
  8229. }
  8230. }, {
  8231. type: 'MethodDefinition',
  8232. key: {
  8233. type: 'Identifier',
  8234. name: 'foo',
  8235. range: [41, 44],
  8236. loc: {
  8237. start: { line: 1, column: 41 },
  8238. end: { line: 1, column: 44 }
  8239. }
  8240. },
  8241. value: {
  8242. type: 'FunctionExpression',
  8243. id: null,
  8244. params: [{
  8245. type: 'Identifier',
  8246. name: 'v',
  8247. range: [45, 46],
  8248. loc: {
  8249. start: { line: 1, column: 45 },
  8250. end: { line: 1, column: 46 }
  8251. }
  8252. }],
  8253. defaults: [],
  8254. body: {
  8255. type: 'BlockStatement',
  8256. body: [],
  8257. range: [48, 50],
  8258. loc: {
  8259. start: { line: 1, column: 48 },
  8260. end: { line: 1, column: 50 }
  8261. }
  8262. },
  8263. rest: null,
  8264. generator: false,
  8265. expression: false,
  8266. range: [48, 50],
  8267. loc: {
  8268. start: { line: 1, column: 48 },
  8269. end: { line: 1, column: 50 }
  8270. }
  8271. },
  8272. kind: 'set',
  8273. 'static': true,
  8274. range: [30, 50],
  8275. loc: {
  8276. start: { line: 1, column: 30 },
  8277. end: { line: 1, column: 50 }
  8278. }
  8279. }, {
  8280. type: 'MethodDefinition',
  8281. key: {
  8282. type: 'Identifier',
  8283. name: 'foo',
  8284. range: [55, 58],
  8285. loc: {
  8286. start: { line: 1, column: 55 },
  8287. end: { line: 1, column: 58 }
  8288. }
  8289. },
  8290. value: {
  8291. type: 'FunctionExpression',
  8292. id: null,
  8293. params: [],
  8294. defaults: [],
  8295. body: {
  8296. type: 'BlockStatement',
  8297. body: [],
  8298. range: [61, 63],
  8299. loc: {
  8300. start: { line: 1, column: 61 },
  8301. end: { line: 1, column: 63 }
  8302. }
  8303. },
  8304. rest: null,
  8305. generator: false,
  8306. expression: false,
  8307. range: [61, 63],
  8308. loc: {
  8309. start: { line: 1, column: 61 },
  8310. end: { line: 1, column: 63 }
  8311. }
  8312. },
  8313. kind: 'get',
  8314. 'static': false,
  8315. range: [51, 63],
  8316. loc: {
  8317. start: { line: 1, column: 51 },
  8318. end: { line: 1, column: 63 }
  8319. }
  8320. }, {
  8321. type: 'MethodDefinition',
  8322. key: {
  8323. type: 'Identifier',
  8324. name: 'foo',
  8325. range: [68, 71],
  8326. loc: {
  8327. start: { line: 1, column: 68 },
  8328. end: { line: 1, column: 71 }
  8329. }
  8330. },
  8331. value: {
  8332. type: 'FunctionExpression',
  8333. id: null,
  8334. params: [{
  8335. type: 'Identifier',
  8336. name: 'v',
  8337. range: [72, 73],
  8338. loc: {
  8339. start: { line: 1, column: 72 },
  8340. end: { line: 1, column: 73 }
  8341. }
  8342. }],
  8343. defaults: [],
  8344. body: {
  8345. type: 'BlockStatement',
  8346. body: [],
  8347. range: [75, 77],
  8348. loc: {
  8349. start: { line: 1, column: 75 },
  8350. end: { line: 1, column: 77 }
  8351. }
  8352. },
  8353. rest: null,
  8354. generator: false,
  8355. expression: false,
  8356. range: [75, 77],
  8357. loc: {
  8358. start: { line: 1, column: 75 },
  8359. end: { line: 1, column: 77 }
  8360. }
  8361. },
  8362. kind: 'set',
  8363. 'static': false,
  8364. range: [64, 77],
  8365. loc: {
  8366. start: { line: 1, column: 64 },
  8367. end: { line: 1, column: 77 }
  8368. }
  8369. }],
  8370. range: [8, 78],
  8371. loc: {
  8372. start: { line: 1, column: 8 },
  8373. end: { line: 1, column: 78 }
  8374. }
  8375. },
  8376. range: [0, 78],
  8377. loc: {
  8378. start: { line: 1, column: 0 },
  8379. end: { line: 1, column: 78 }
  8380. }
  8381. },
  8382. 'class A { set foo(v) {} get foo() {} }': {
  8383. type: 'ClassDeclaration',
  8384. id: {
  8385. type: 'Identifier',
  8386. name: 'A',
  8387. range: [6, 7],
  8388. loc: {
  8389. start: { line: 1, column: 6 },
  8390. end: { line: 1, column: 7 }
  8391. }
  8392. },
  8393. superClass: null,
  8394. body: {
  8395. type: 'ClassBody',
  8396. body: [{
  8397. type: 'MethodDefinition',
  8398. key: {
  8399. type: 'Identifier',
  8400. name: 'foo',
  8401. range: [14, 17],
  8402. loc: {
  8403. start: { line: 1, column: 14 },
  8404. end: { line: 1, column: 17 }
  8405. }
  8406. },
  8407. value: {
  8408. type: 'FunctionExpression',
  8409. id: null,
  8410. params: [{
  8411. type: 'Identifier',
  8412. name: 'v',
  8413. range: [18, 19],
  8414. loc: {
  8415. start: { line: 1, column: 18 },
  8416. end: { line: 1, column: 19 }
  8417. }
  8418. }],
  8419. defaults: [],
  8420. body: {
  8421. type: 'BlockStatement',
  8422. body: [],
  8423. range: [21, 23],
  8424. loc: {
  8425. start: { line: 1, column: 21 },
  8426. end: { line: 1, column: 23 }
  8427. }
  8428. },
  8429. rest: null,
  8430. generator: false,
  8431. expression: false,
  8432. range: [21, 23],
  8433. loc: {
  8434. start: { line: 1, column: 21 },
  8435. end: { line: 1, column: 23 }
  8436. }
  8437. },
  8438. kind: 'set',
  8439. 'static': false,
  8440. range: [10, 23],
  8441. loc: {
  8442. start: { line: 1, column: 10 },
  8443. end: { line: 1, column: 23 }
  8444. }
  8445. }, {
  8446. type: 'MethodDefinition',
  8447. key: {
  8448. type: 'Identifier',
  8449. name: 'foo',
  8450. range: [28, 31],
  8451. loc: {
  8452. start: { line: 1, column: 28 },
  8453. end: { line: 1, column: 31 }
  8454. }
  8455. },
  8456. value: {
  8457. type: 'FunctionExpression',
  8458. id: null,
  8459. params: [],
  8460. defaults: [],
  8461. body: {
  8462. type: 'BlockStatement',
  8463. body: [],
  8464. range: [34, 36],
  8465. loc: {
  8466. start: { line: 1, column: 34 },
  8467. end: { line: 1, column: 36 }
  8468. }
  8469. },
  8470. rest: null,
  8471. generator: false,
  8472. expression: false,
  8473. range: [34, 36],
  8474. loc: {
  8475. start: { line: 1, column: 34 },
  8476. end: { line: 1, column: 36 }
  8477. }
  8478. },
  8479. kind: 'get',
  8480. 'static': false,
  8481. range: [24, 36],
  8482. loc: {
  8483. start: { line: 1, column: 24 },
  8484. end: { line: 1, column: 36 }
  8485. }
  8486. }],
  8487. range: [8, 38],
  8488. loc: {
  8489. start: { line: 1, column: 8 },
  8490. end: { line: 1, column: 38 }
  8491. }
  8492. },
  8493. range: [0, 38],
  8494. loc: {
  8495. start: { line: 1, column: 0 },
  8496. end: { line: 1, column: 38 }
  8497. }
  8498. },
  8499. 'class A { get foo() {} get foo() {} }': {
  8500. index: 30,
  8501. lineNumber: 1,
  8502. column: 31,
  8503. message: 'Error: Line 1: Illegal duplicate property in class definition',
  8504. description: 'Illegal duplicate property in class definition'
  8505. },
  8506. 'class A { set foo(v) {} set foo(v) {} }': {
  8507. index: 31,
  8508. lineNumber: 1,
  8509. column: 32,
  8510. message: 'Error: Line 1: Illegal duplicate property in class definition',
  8511. description: 'Illegal duplicate property in class definition'
  8512. },
  8513. 'class A { get foo() {} foo() {} }': {
  8514. index: 26,
  8515. lineNumber: 1,
  8516. column: 27,
  8517. message: 'Error: Line 1: Illegal duplicate property in class definition',
  8518. description: 'Illegal duplicate property in class definition'
  8519. },
  8520. 'class A { foo() {} get foo() {} }': {
  8521. index: 26,
  8522. lineNumber: 1,
  8523. column: 27,
  8524. message: 'Error: Line 1: Illegal duplicate property in class definition',
  8525. description: 'Illegal duplicate property in class definition'
  8526. },
  8527. 'class A { set foo(v) {} foo() {} }': {
  8528. index: 27,
  8529. lineNumber: 1,
  8530. column: 28,
  8531. message: 'Error: Line 1: Illegal duplicate property in class definition',
  8532. description: 'Illegal duplicate property in class definition'
  8533. },
  8534. 'class A { foo() {} set foo(v) {} }': {
  8535. index: 26,
  8536. lineNumber: 1,
  8537. column: 27,
  8538. message: 'Error: Line 1: Illegal duplicate property in class definition',
  8539. description: 'Illegal duplicate property in class definition'
  8540. },
  8541. },
  8542. 'ES6: Default parameters': {
  8543. 'x = function(y = 1) {}': {
  8544. type: 'ExpressionStatement',
  8545. expression: {
  8546. type: 'AssignmentExpression',
  8547. operator: '=',
  8548. left: {
  8549. type: 'Identifier',
  8550. name: 'x',
  8551. range: [0, 1],
  8552. loc: {
  8553. start: { line: 1, column: 0 },
  8554. end: { line: 1, column: 1 }
  8555. }
  8556. },
  8557. right: {
  8558. type: 'FunctionExpression',
  8559. id: null,
  8560. params: [{
  8561. type: 'Identifier',
  8562. name: 'y',
  8563. range: [13, 14],
  8564. loc: {
  8565. start: { line: 1, column: 13 },
  8566. end: { line: 1, column: 14 }
  8567. }
  8568. }],
  8569. defaults: [{
  8570. type: 'Literal',
  8571. value: 1,
  8572. raw: '1',
  8573. range: [17, 18],
  8574. loc: {
  8575. start: { line: 1, column: 17 },
  8576. end: { line: 1, column: 18 }
  8577. }
  8578. }],
  8579. body: {
  8580. type: 'BlockStatement',
  8581. body: [],
  8582. range: [20, 22],
  8583. loc: {
  8584. start: { line: 1, column: 20 },
  8585. end: { line: 1, column: 22 }
  8586. }
  8587. },
  8588. rest: null,
  8589. generator: false,
  8590. expression: false,
  8591. range: [4, 22],
  8592. loc: {
  8593. start: { line: 1, column: 4 },
  8594. end: { line: 1, column: 22 }
  8595. }
  8596. },
  8597. range: [0, 22],
  8598. loc: {
  8599. start: { line: 1, column: 0 },
  8600. end: { line: 1, column: 22 }
  8601. }
  8602. },
  8603. range: [0, 22],
  8604. loc: {
  8605. start: { line: 1, column: 0 },
  8606. end: { line: 1, column: 22 }
  8607. }
  8608. },
  8609. 'function f(a = 1) {}': {
  8610. type: 'FunctionDeclaration',
  8611. id: {
  8612. type: 'Identifier',
  8613. name: 'f',
  8614. range: [9, 10],
  8615. loc: {
  8616. start: { line: 1, column: 9 },
  8617. end: { line: 1, column: 10 }
  8618. }
  8619. },
  8620. params: [{
  8621. type: 'Identifier',
  8622. name: 'a',
  8623. range: [11, 12],
  8624. loc: {
  8625. start: { line: 1, column: 11 },
  8626. end: { line: 1, column: 12 }
  8627. }
  8628. }],
  8629. defaults: [{
  8630. type: 'Literal',
  8631. value: 1,
  8632. raw: '1',
  8633. range: [15, 16],
  8634. loc: {
  8635. start: { line: 1, column: 15 },
  8636. end: { line: 1, column: 16 }
  8637. }
  8638. }],
  8639. body: {
  8640. type: 'BlockStatement',
  8641. body: [],
  8642. range: [18, 20],
  8643. loc: {
  8644. start: { line: 1, column: 18 },
  8645. end: { line: 1, column: 20 }
  8646. }
  8647. },
  8648. rest: null,
  8649. generator: false,
  8650. expression: false,
  8651. range: [0, 20],
  8652. loc: {
  8653. start: { line: 1, column: 0 },
  8654. end: { line: 1, column: 20 }
  8655. }
  8656. },
  8657. 'x = { f: function(a=1) {} }': {
  8658. type: 'ExpressionStatement',
  8659. expression: {
  8660. type: 'AssignmentExpression',
  8661. operator: '=',
  8662. left: {
  8663. type: 'Identifier',
  8664. name: 'x',
  8665. range: [0, 1],
  8666. loc: {
  8667. start: { line: 1, column: 0 },
  8668. end: { line: 1, column: 1 }
  8669. }
  8670. },
  8671. right: {
  8672. type: 'ObjectExpression',
  8673. properties: [{
  8674. type: 'Property',
  8675. key: {
  8676. type: 'Identifier',
  8677. name: 'f',
  8678. range: [6, 7],
  8679. loc: {
  8680. start: { line: 1, column: 6 },
  8681. end: { line: 1, column: 7 }
  8682. }
  8683. },
  8684. value: {
  8685. type: 'FunctionExpression',
  8686. id: null,
  8687. params: [{
  8688. type: 'Identifier',
  8689. name: 'a',
  8690. range: [18, 19],
  8691. loc: {
  8692. start: { line: 1, column: 18 },
  8693. end: { line: 1, column: 19 }
  8694. }
  8695. }],
  8696. defaults: [{
  8697. type: 'Literal',
  8698. value: 1,
  8699. raw: '1',
  8700. range: [20, 21],
  8701. loc: {
  8702. start: { line: 1, column: 20 },
  8703. end: { line: 1, column: 21 }
  8704. }
  8705. }],
  8706. body: {
  8707. type: 'BlockStatement',
  8708. body: [],
  8709. range: [23, 25],
  8710. loc: {
  8711. start: { line: 1, column: 23 },
  8712. end: { line: 1, column: 25 }
  8713. }
  8714. },
  8715. rest: null,
  8716. generator: false,
  8717. expression: false,
  8718. range: [9, 25],
  8719. loc: {
  8720. start: { line: 1, column: 9 },
  8721. end: { line: 1, column: 25 }
  8722. }
  8723. },
  8724. kind: 'init',
  8725. method: false,
  8726. shorthand: false,
  8727. range: [6, 25],
  8728. loc: {
  8729. start: { line: 1, column: 6 },
  8730. end: { line: 1, column: 25 }
  8731. }
  8732. }],
  8733. range: [4, 27],
  8734. loc: {
  8735. start: { line: 1, column: 4 },
  8736. end: { line: 1, column: 27 }
  8737. }
  8738. },
  8739. range: [0, 27],
  8740. loc: {
  8741. start: { line: 1, column: 0 },
  8742. end: { line: 1, column: 27 }
  8743. }
  8744. },
  8745. range: [0, 27],
  8746. loc: {
  8747. start: { line: 1, column: 0 },
  8748. end: { line: 1, column: 27 }
  8749. }
  8750. },
  8751. 'x = { f(a=1) {} }': {
  8752. type: 'ExpressionStatement',
  8753. expression: {
  8754. type: 'AssignmentExpression',
  8755. operator: '=',
  8756. left: {
  8757. type: 'Identifier',
  8758. name: 'x',
  8759. range: [0, 1],
  8760. loc: {
  8761. start: { line: 1, column: 0 },
  8762. end: { line: 1, column: 1 }
  8763. }
  8764. },
  8765. right: {
  8766. type: 'ObjectExpression',
  8767. properties: [{
  8768. type: 'Property',
  8769. key: {
  8770. type: 'Identifier',
  8771. name: 'f',
  8772. range: [6, 7],
  8773. loc: {
  8774. start: { line: 1, column: 6 },
  8775. end: { line: 1, column: 7 }
  8776. }
  8777. },
  8778. value: {
  8779. type: 'FunctionExpression',
  8780. id: null,
  8781. params: [{
  8782. type: 'Identifier',
  8783. name: 'a',
  8784. range: [8, 9],
  8785. loc: {
  8786. start: { line: 1, column: 8 },
  8787. end: { line: 1, column: 9 }
  8788. }
  8789. }],
  8790. defaults: [{
  8791. type: 'Literal',
  8792. value: 1,
  8793. raw: '1',
  8794. range: [10, 11],
  8795. loc: {
  8796. start: { line: 1, column: 10 },
  8797. end: { line: 1, column: 11 }
  8798. }
  8799. }],
  8800. body: {
  8801. type: 'BlockStatement',
  8802. body: [],
  8803. range: [13, 15],
  8804. loc: {
  8805. start: { line: 1, column: 13 },
  8806. end: { line: 1, column: 15 }
  8807. }
  8808. },
  8809. rest: null,
  8810. generator: false,
  8811. expression: false,
  8812. range: [13, 15],
  8813. loc: {
  8814. start: { line: 1, column: 13 },
  8815. end: { line: 1, column: 15 }
  8816. }
  8817. },
  8818. kind: 'init',
  8819. method: true,
  8820. shorthand: false,
  8821. range: [6, 15],
  8822. loc: {
  8823. start: { line: 1, column: 6 },
  8824. end: { line: 1, column: 15 }
  8825. }
  8826. }],
  8827. range: [4, 17],
  8828. loc: {
  8829. start: { line: 1, column: 4 },
  8830. end: { line: 1, column: 17 }
  8831. }
  8832. },
  8833. range: [0, 17],
  8834. loc: {
  8835. start: { line: 1, column: 0 },
  8836. end: { line: 1, column: 17 }
  8837. }
  8838. },
  8839. range: [0, 17],
  8840. loc: {
  8841. start: { line: 1, column: 0 },
  8842. end: { line: 1, column: 17 }
  8843. }
  8844. }
  8845. },
  8846. // ECMAScript 6th Syntax, 13 - Rest parameters
  8847. // http://wiki.ecmascript.org/doku.php?id=harmony:rest_parameters
  8848. 'ES6: Rest parameters': {
  8849. 'function f(a, ...b) {}': {
  8850. type: 'FunctionDeclaration',
  8851. id: {
  8852. type: 'Identifier',
  8853. name: 'f',
  8854. range: [9, 10],
  8855. loc: {
  8856. start: { line: 1, column: 9 },
  8857. end: { line: 1, column: 10 }
  8858. }
  8859. },
  8860. params: [{
  8861. type: 'Identifier',
  8862. name: 'a',
  8863. range: [11, 12],
  8864. loc: {
  8865. start: { line: 1, column: 11 },
  8866. end: { line: 1, column: 12 }
  8867. }
  8868. }],
  8869. defaults: [],
  8870. body: {
  8871. type: 'BlockStatement',
  8872. body: [],
  8873. range: [20, 22],
  8874. loc: {
  8875. start: { line: 1, column: 20 },
  8876. end: { line: 1, column: 22 }
  8877. }
  8878. },
  8879. rest: {
  8880. type: 'Identifier',
  8881. name: 'b',
  8882. range: [17, 18],
  8883. loc: {
  8884. start: { line: 1, column: 17 },
  8885. end: { line: 1, column: 18 }
  8886. }
  8887. },
  8888. generator: false,
  8889. expression: false,
  8890. range: [0, 22],
  8891. loc: {
  8892. start: { line: 1, column: 0 },
  8893. end: { line: 1, column: 22 }
  8894. }
  8895. }
  8896. },
  8897. 'ES6: Destructured Parameters': {
  8898. 'function x([ a, b ]){}': {
  8899. type: 'FunctionDeclaration',
  8900. id: {
  8901. type: 'Identifier',
  8902. name: 'x',
  8903. range: [9, 10],
  8904. loc: {
  8905. start: { line: 1, column: 9 },
  8906. end: { line: 1, column: 10 }
  8907. }
  8908. },
  8909. params: [{
  8910. type: 'ArrayPattern',
  8911. elements: [{
  8912. type: 'Identifier',
  8913. name: 'a',
  8914. range: [13, 14],
  8915. loc: {
  8916. start: { line: 1, column: 13 },
  8917. end: { line: 1, column: 14 }
  8918. }
  8919. }, {
  8920. type: 'Identifier',
  8921. name: 'b',
  8922. range: [16, 17],
  8923. loc: {
  8924. start: { line: 1, column: 16 },
  8925. end: { line: 1, column: 17 }
  8926. }
  8927. }],
  8928. range: [11, 19],
  8929. loc: {
  8930. start: { line: 1, column: 11 },
  8931. end: { line: 1, column: 19 }
  8932. }
  8933. }],
  8934. defaults: [],
  8935. body: {
  8936. type: 'BlockStatement',
  8937. body: [],
  8938. range: [20, 22],
  8939. loc: {
  8940. start: { line: 1, column: 20 },
  8941. end: { line: 1, column: 22 }
  8942. }
  8943. },
  8944. rest: null,
  8945. generator: false,
  8946. expression: false,
  8947. range: [0, 22],
  8948. loc: {
  8949. start: { line: 1, column: 0 },
  8950. end: { line: 1, column: 22 }
  8951. }
  8952. },
  8953. 'function x({ a, b }){}': {
  8954. type: 'FunctionDeclaration',
  8955. id: {
  8956. type: 'Identifier',
  8957. name: 'x',
  8958. range: [9, 10],
  8959. loc: {
  8960. start: { line: 1, column: 9 },
  8961. end: { line: 1, column: 10 }
  8962. }
  8963. },
  8964. params: [{
  8965. type: 'ObjectPattern',
  8966. properties: [{
  8967. type: 'Property',
  8968. key: {
  8969. type: 'Identifier',
  8970. name: 'a',
  8971. range: [13, 14],
  8972. loc: {
  8973. start: { line: 1, column: 13 },
  8974. end: { line: 1, column: 14 }
  8975. }
  8976. },
  8977. value: {
  8978. type: 'Identifier',
  8979. name: 'a',
  8980. range: [13, 14],
  8981. loc: {
  8982. start: { line: 1, column: 13 },
  8983. end: { line: 1, column: 14 }
  8984. }
  8985. },
  8986. kind: 'init',
  8987. method: false,
  8988. shorthand: true,
  8989. range: [13, 14],
  8990. loc: {
  8991. start: { line: 1, column: 13 },
  8992. end: { line: 1, column: 14 }
  8993. }
  8994. }, {
  8995. type: 'Property',
  8996. key: {
  8997. type: 'Identifier',
  8998. name: 'b',
  8999. range: [16, 17],
  9000. loc: {
  9001. start: { line: 1, column: 16 },
  9002. end: { line: 1, column: 17 }
  9003. }
  9004. },
  9005. value: {
  9006. type: 'Identifier',
  9007. name: 'b',
  9008. range: [16, 17],
  9009. loc: {
  9010. start: { line: 1, column: 16 },
  9011. end: { line: 1, column: 17 }
  9012. }
  9013. },
  9014. kind: 'init',
  9015. method: false,
  9016. shorthand: true,
  9017. range: [16, 17],
  9018. loc: {
  9019. start: { line: 1, column: 16 },
  9020. end: { line: 1, column: 17 }
  9021. }
  9022. }],
  9023. range: [11, 19],
  9024. loc: {
  9025. start: { line: 1, column: 11 },
  9026. end: { line: 1, column: 19 }
  9027. }
  9028. }],
  9029. defaults: [],
  9030. body: {
  9031. type: 'BlockStatement',
  9032. body: [],
  9033. range: [20, 22],
  9034. loc: {
  9035. start: { line: 1, column: 20 },
  9036. end: { line: 1, column: 22 }
  9037. }
  9038. },
  9039. rest: null,
  9040. generator: false,
  9041. expression: false,
  9042. range: [0, 22],
  9043. loc: {
  9044. start: { line: 1, column: 0 },
  9045. end: { line: 1, column: 22 }
  9046. }
  9047. },
  9048. 'function x(a, { a }){}': {
  9049. type: 'FunctionDeclaration',
  9050. id: {
  9051. type: 'Identifier',
  9052. name: 'x',
  9053. range: [9, 10],
  9054. loc: {
  9055. start: { line: 1, column: 9 },
  9056. end: { line: 1, column: 10 }
  9057. }
  9058. },
  9059. params: [{
  9060. type: 'Identifier',
  9061. name: 'a',
  9062. range: [11, 12],
  9063. loc: {
  9064. start: { line: 1, column: 11 },
  9065. end: { line: 1, column: 12 }
  9066. }
  9067. }, {
  9068. type: 'ObjectPattern',
  9069. properties: [{
  9070. type: 'Property',
  9071. key: {
  9072. type: 'Identifier',
  9073. name: 'a',
  9074. range: [16, 17],
  9075. loc: {
  9076. start: { line: 1, column: 16 },
  9077. end: { line: 1, column: 17 }
  9078. }
  9079. },
  9080. value: {
  9081. type: 'Identifier',
  9082. name: 'a',
  9083. range: [16, 17],
  9084. loc: {
  9085. start: { line: 1, column: 16 },
  9086. end: { line: 1, column: 17 }
  9087. }
  9088. },
  9089. kind: 'init',
  9090. method: false,
  9091. shorthand: true,
  9092. range: [16, 17],
  9093. loc: {
  9094. start: { line: 1, column: 16 },
  9095. end: { line: 1, column: 17 }
  9096. }
  9097. }],
  9098. range: [14, 19],
  9099. loc: {
  9100. start: { line: 1, column: 14 },
  9101. end: { line: 1, column: 19 }
  9102. }
  9103. }],
  9104. defaults: [],
  9105. body: {
  9106. type: 'BlockStatement',
  9107. body: [],
  9108. range: [20, 22],
  9109. loc: {
  9110. start: { line: 1, column: 20 },
  9111. end: { line: 1, column: 22 }
  9112. }
  9113. },
  9114. rest: null,
  9115. generator: false,
  9116. expression: false,
  9117. range: [0, 22],
  9118. loc: {
  9119. start: { line: 1, column: 0 },
  9120. end: { line: 1, column: 22 }
  9121. }
  9122. },
  9123. 'function x(...[ a, b ]){}': {
  9124. type: 'FunctionDeclaration',
  9125. id: {
  9126. type: 'Identifier',
  9127. name: 'x',
  9128. range: [9, 10],
  9129. loc: {
  9130. start: { line: 1, column: 9 },
  9131. end: { line: 1, column: 10 }
  9132. }
  9133. },
  9134. params: [],
  9135. defaults: [],
  9136. body: {
  9137. type: 'BlockStatement',
  9138. body: [],
  9139. range: [23, 25],
  9140. loc: {
  9141. start: { line: 1, column: 23 },
  9142. end: { line: 1, column: 25 }
  9143. }
  9144. },
  9145. rest: {
  9146. type: 'ArrayPattern',
  9147. elements: [{
  9148. type: 'Identifier',
  9149. name: 'a',
  9150. range: [16, 17],
  9151. loc: {
  9152. start: { line: 1, column: 16 },
  9153. end: { line: 1, column: 17 }
  9154. }
  9155. }, {
  9156. type: 'Identifier',
  9157. name: 'b',
  9158. range: [19, 20],
  9159. loc: {
  9160. start: { line: 1, column: 19 },
  9161. end: { line: 1, column: 20 }
  9162. }
  9163. }],
  9164. range: [14, 22],
  9165. loc: {
  9166. start: { line: 1, column: 14 },
  9167. end: { line: 1, column: 22 }
  9168. }
  9169. },
  9170. generator: false,
  9171. expression: false,
  9172. range: [0, 25],
  9173. loc: {
  9174. start: { line: 1, column: 0 },
  9175. end: { line: 1, column: 25 }
  9176. }
  9177. },
  9178. 'function x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){}': {
  9179. type: 'FunctionDeclaration',
  9180. id: {
  9181. type: 'Identifier',
  9182. name: 'x',
  9183. range: [9, 10],
  9184. loc: {
  9185. start: { line: 1, column: 9 },
  9186. end: { line: 1, column: 10 }
  9187. }
  9188. },
  9189. params: [{
  9190. type: 'ObjectPattern',
  9191. properties: [{
  9192. type: 'Property',
  9193. key: {
  9194. type: 'Identifier',
  9195. name: 'a',
  9196. range: [13, 14],
  9197. loc: {
  9198. start: { line: 1, column: 13 },
  9199. end: { line: 1, column: 14 }
  9200. }
  9201. },
  9202. value: {
  9203. type: 'ObjectPattern',
  9204. properties: [{
  9205. type: 'Property',
  9206. key: {
  9207. type: 'Identifier',
  9208. name: 'w',
  9209. range: [18, 19],
  9210. loc: {
  9211. start: { line: 1, column: 18 },
  9212. end: { line: 1, column: 19 }
  9213. }
  9214. },
  9215. value: {
  9216. type: 'Identifier',
  9217. name: 'w',
  9218. range: [18, 19],
  9219. loc: {
  9220. start: { line: 1, column: 18 },
  9221. end: { line: 1, column: 19 }
  9222. }
  9223. },
  9224. kind: 'init',
  9225. method: false,
  9226. shorthand: true,
  9227. range: [18, 19],
  9228. loc: {
  9229. start: { line: 1, column: 18 },
  9230. end: { line: 1, column: 19 }
  9231. }
  9232. }, {
  9233. type: 'Property',
  9234. key: {
  9235. type: 'Identifier',
  9236. name: 'x',
  9237. range: [21, 22],
  9238. loc: {
  9239. start: { line: 1, column: 21 },
  9240. end: { line: 1, column: 22 }
  9241. }
  9242. },
  9243. value: {
  9244. type: 'Identifier',
  9245. name: 'x',
  9246. range: [21, 22],
  9247. loc: {
  9248. start: { line: 1, column: 21 },
  9249. end: { line: 1, column: 22 }
  9250. }
  9251. },
  9252. kind: 'init',
  9253. method: false,
  9254. shorthand: true,
  9255. range: [21, 22],
  9256. loc: {
  9257. start: { line: 1, column: 21 },
  9258. end: { line: 1, column: 22 }
  9259. }
  9260. }],
  9261. range: [16, 24],
  9262. loc: {
  9263. start: { line: 1, column: 16 },
  9264. end: { line: 1, column: 24 }
  9265. }
  9266. },
  9267. kind: 'init',
  9268. method: false,
  9269. shorthand: false,
  9270. range: [13, 24],
  9271. loc: {
  9272. start: { line: 1, column: 13 },
  9273. end: { line: 1, column: 24 }
  9274. }
  9275. }, {
  9276. type: 'Property',
  9277. key: {
  9278. type: 'Identifier',
  9279. name: 'b',
  9280. range: [26, 27],
  9281. loc: {
  9282. start: { line: 1, column: 26 },
  9283. end: { line: 1, column: 27 }
  9284. }
  9285. },
  9286. value: {
  9287. type: 'ArrayPattern',
  9288. elements: [{
  9289. type: 'Identifier',
  9290. name: 'y',
  9291. range: [30, 31],
  9292. loc: {
  9293. start: { line: 1, column: 30 },
  9294. end: { line: 1, column: 31 }
  9295. }
  9296. }, {
  9297. type: 'Identifier',
  9298. name: 'z',
  9299. range: [33, 34],
  9300. loc: {
  9301. start: { line: 1, column: 33 },
  9302. end: { line: 1, column: 34 }
  9303. }
  9304. }],
  9305. range: [29, 35],
  9306. loc: {
  9307. start: { line: 1, column: 29 },
  9308. end: { line: 1, column: 35 }
  9309. }
  9310. },
  9311. kind: 'init',
  9312. method: false,
  9313. shorthand: false,
  9314. range: [26, 35],
  9315. loc: {
  9316. start: { line: 1, column: 26 },
  9317. end: { line: 1, column: 35 }
  9318. }
  9319. }],
  9320. range: [11, 37],
  9321. loc: {
  9322. start: { line: 1, column: 11 },
  9323. end: { line: 1, column: 37 }
  9324. }
  9325. }],
  9326. defaults: [],
  9327. body: {
  9328. type: 'BlockStatement',
  9329. body: [],
  9330. range: [52, 54],
  9331. loc: {
  9332. start: { line: 1, column: 52 },
  9333. end: { line: 1, column: 54 }
  9334. }
  9335. },
  9336. rest: {
  9337. type: 'ArrayPattern',
  9338. elements: [{
  9339. type: 'Identifier',
  9340. name: 'a',
  9341. range: [43, 44],
  9342. loc: {
  9343. start: { line: 1, column: 43 },
  9344. end: { line: 1, column: 44 }
  9345. }
  9346. }, {
  9347. type: 'Identifier',
  9348. name: 'b',
  9349. range: [46, 47],
  9350. loc: {
  9351. start: { line: 1, column: 46 },
  9352. end: { line: 1, column: 47 }
  9353. }
  9354. }, {
  9355. type: 'Identifier',
  9356. name: 'c',
  9357. range: [49, 50],
  9358. loc: {
  9359. start: { line: 1, column: 49 },
  9360. end: { line: 1, column: 50 }
  9361. }
  9362. }],
  9363. range: [42, 51],
  9364. loc: {
  9365. start: { line: 1, column: 42 },
  9366. end: { line: 1, column: 51 }
  9367. }
  9368. },
  9369. generator: false,
  9370. expression: false,
  9371. range: [0, 54],
  9372. loc: {
  9373. start: { line: 1, column: 0 },
  9374. end: { line: 1, column: 54 }
  9375. }
  9376. },
  9377. '(function x([ a, b ]){})': {
  9378. type: 'ExpressionStatement',
  9379. expression: {
  9380. type: 'FunctionExpression',
  9381. id: {
  9382. type: 'Identifier',
  9383. name: 'x',
  9384. range: [10, 11],
  9385. loc: {
  9386. start: { line: 1, column: 10 },
  9387. end: { line: 1, column: 11 }
  9388. }
  9389. },
  9390. params: [{
  9391. type: 'ArrayPattern',
  9392. elements: [{
  9393. type: 'Identifier',
  9394. name: 'a',
  9395. range: [14, 15],
  9396. loc: {
  9397. start: { line: 1, column: 14 },
  9398. end: { line: 1, column: 15 }
  9399. }
  9400. }, {
  9401. type: 'Identifier',
  9402. name: 'b',
  9403. range: [17, 18],
  9404. loc: {
  9405. start: { line: 1, column: 17 },
  9406. end: { line: 1, column: 18 }
  9407. }
  9408. }],
  9409. range: [12, 20],
  9410. loc: {
  9411. start: { line: 1, column: 12 },
  9412. end: { line: 1, column: 20 }
  9413. }
  9414. }],
  9415. defaults: [],
  9416. body: {
  9417. type: 'BlockStatement',
  9418. body: [],
  9419. range: [21, 23],
  9420. loc: {
  9421. start: { line: 1, column: 21 },
  9422. end: { line: 1, column: 23 }
  9423. }
  9424. },
  9425. rest: null,
  9426. generator: false,
  9427. expression: false,
  9428. range: [1, 23],
  9429. loc: {
  9430. start: { line: 1, column: 1 },
  9431. end: { line: 1, column: 23 }
  9432. }
  9433. },
  9434. range: [0, 24],
  9435. loc: {
  9436. start: { line: 1, column: 0 },
  9437. end: { line: 1, column: 24 }
  9438. }
  9439. },
  9440. '(function x({ a, b }){})': {
  9441. type: 'ExpressionStatement',
  9442. expression: {
  9443. type: 'FunctionExpression',
  9444. id: {
  9445. type: 'Identifier',
  9446. name: 'x',
  9447. range: [10, 11],
  9448. loc: {
  9449. start: { line: 1, column: 10 },
  9450. end: { line: 1, column: 11 }
  9451. }
  9452. },
  9453. params: [{
  9454. type: 'ObjectPattern',
  9455. properties: [{
  9456. type: 'Property',
  9457. key: {
  9458. type: 'Identifier',
  9459. name: 'a',
  9460. range: [14, 15],
  9461. loc: {
  9462. start: { line: 1, column: 14 },
  9463. end: { line: 1, column: 15 }
  9464. }
  9465. },
  9466. value: {
  9467. type: 'Identifier',
  9468. name: 'a',
  9469. range: [14, 15],
  9470. loc: {
  9471. start: { line: 1, column: 14 },
  9472. end: { line: 1, column: 15 }
  9473. }
  9474. },
  9475. kind: 'init',
  9476. method: false,
  9477. shorthand: true,
  9478. range: [14, 15],
  9479. loc: {
  9480. start: { line: 1, column: 14 },
  9481. end: { line: 1, column: 15 }
  9482. }
  9483. }, {
  9484. type: 'Property',
  9485. key: {
  9486. type: 'Identifier',
  9487. name: 'b',
  9488. range: [17, 18],
  9489. loc: {
  9490. start: { line: 1, column: 17 },
  9491. end: { line: 1, column: 18 }
  9492. }
  9493. },
  9494. value: {
  9495. type: 'Identifier',
  9496. name: 'b',
  9497. range: [17, 18],
  9498. loc: {
  9499. start: { line: 1, column: 17 },
  9500. end: { line: 1, column: 18 }
  9501. }
  9502. },
  9503. kind: 'init',
  9504. method: false,
  9505. shorthand: true,
  9506. range: [17, 18],
  9507. loc: {
  9508. start: { line: 1, column: 17 },
  9509. end: { line: 1, column: 18 }
  9510. }
  9511. }],
  9512. range: [12, 20],
  9513. loc: {
  9514. start: { line: 1, column: 12 },
  9515. end: { line: 1, column: 20 }
  9516. }
  9517. }],
  9518. defaults: [],
  9519. body: {
  9520. type: 'BlockStatement',
  9521. body: [],
  9522. range: [21, 23],
  9523. loc: {
  9524. start: { line: 1, column: 21 },
  9525. end: { line: 1, column: 23 }
  9526. }
  9527. },
  9528. rest: null,
  9529. generator: false,
  9530. expression: false,
  9531. range: [1, 23],
  9532. loc: {
  9533. start: { line: 1, column: 1 },
  9534. end: { line: 1, column: 23 }
  9535. }
  9536. },
  9537. range: [0, 24],
  9538. loc: {
  9539. start: { line: 1, column: 0 },
  9540. end: { line: 1, column: 24 }
  9541. }
  9542. },
  9543. '(function x(...[ a, b ]){})': {
  9544. type: 'ExpressionStatement',
  9545. expression: {
  9546. type: 'FunctionExpression',
  9547. id: {
  9548. type: 'Identifier',
  9549. name: 'x',
  9550. range: [10, 11],
  9551. loc: {
  9552. start: { line: 1, column: 10 },
  9553. end: { line: 1, column: 11 }
  9554. }
  9555. },
  9556. params: [],
  9557. defaults: [],
  9558. body: {
  9559. type: 'BlockStatement',
  9560. body: [],
  9561. range: [24, 26],
  9562. loc: {
  9563. start: { line: 1, column: 24 },
  9564. end: { line: 1, column: 26 }
  9565. }
  9566. },
  9567. rest: {
  9568. type: 'ArrayPattern',
  9569. elements: [{
  9570. type: 'Identifier',
  9571. name: 'a',
  9572. range: [17, 18],
  9573. loc: {
  9574. start: { line: 1, column: 17 },
  9575. end: { line: 1, column: 18 }
  9576. }
  9577. }, {
  9578. type: 'Identifier',
  9579. name: 'b',
  9580. range: [20, 21],
  9581. loc: {
  9582. start: { line: 1, column: 20 },
  9583. end: { line: 1, column: 21 }
  9584. }
  9585. }],
  9586. range: [15, 23],
  9587. loc: {
  9588. start: { line: 1, column: 15 },
  9589. end: { line: 1, column: 23 }
  9590. }
  9591. },
  9592. generator: false,
  9593. expression: false,
  9594. range: [1, 26],
  9595. loc: {
  9596. start: { line: 1, column: 1 },
  9597. end: { line: 1, column: 26 }
  9598. }
  9599. },
  9600. range: [0, 27],
  9601. loc: {
  9602. start: { line: 1, column: 0 },
  9603. end: { line: 1, column: 27 }
  9604. }
  9605. },
  9606. '(function x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){})': {
  9607. type: 'ExpressionStatement',
  9608. expression: {
  9609. type: 'FunctionExpression',
  9610. id: {
  9611. type: 'Identifier',
  9612. name: 'x',
  9613. range: [10, 11],
  9614. loc: {
  9615. start: { line: 1, column: 10 },
  9616. end: { line: 1, column: 11 }
  9617. }
  9618. },
  9619. params: [{
  9620. type: 'ObjectPattern',
  9621. properties: [{
  9622. type: 'Property',
  9623. key: {
  9624. type: 'Identifier',
  9625. name: 'a',
  9626. range: [14, 15],
  9627. loc: {
  9628. start: { line: 1, column: 14 },
  9629. end: { line: 1, column: 15 }
  9630. }
  9631. },
  9632. value: {
  9633. type: 'ObjectPattern',
  9634. properties: [{
  9635. type: 'Property',
  9636. key: {
  9637. type: 'Identifier',
  9638. name: 'w',
  9639. range: [19, 20],
  9640. loc: {
  9641. start: { line: 1, column: 19 },
  9642. end: { line: 1, column: 20 }
  9643. }
  9644. },
  9645. value: {
  9646. type: 'Identifier',
  9647. name: 'w',
  9648. range: [19, 20],
  9649. loc: {
  9650. start: { line: 1, column: 19 },
  9651. end: { line: 1, column: 20 }
  9652. }
  9653. },
  9654. kind: 'init',
  9655. method: false,
  9656. shorthand: true,
  9657. range: [19, 20],
  9658. loc: {
  9659. start: { line: 1, column: 19 },
  9660. end: { line: 1, column: 20 }
  9661. }
  9662. }, {
  9663. type: 'Property',
  9664. key: {
  9665. type: 'Identifier',
  9666. name: 'x',
  9667. range: [22, 23],
  9668. loc: {
  9669. start: { line: 1, column: 22 },
  9670. end: { line: 1, column: 23 }
  9671. }
  9672. },
  9673. value: {
  9674. type: 'Identifier',
  9675. name: 'x',
  9676. range: [22, 23],
  9677. loc: {
  9678. start: { line: 1, column: 22 },
  9679. end: { line: 1, column: 23 }
  9680. }
  9681. },
  9682. kind: 'init',
  9683. method: false,
  9684. shorthand: true,
  9685. range: [22, 23],
  9686. loc: {
  9687. start: { line: 1, column: 22 },
  9688. end: { line: 1, column: 23 }
  9689. }
  9690. }],
  9691. range: [17, 25],
  9692. loc: {
  9693. start: { line: 1, column: 17 },
  9694. end: { line: 1, column: 25 }
  9695. }
  9696. },
  9697. kind: 'init',
  9698. method: false,
  9699. shorthand: false,
  9700. range: [14, 25],
  9701. loc: {
  9702. start: { line: 1, column: 14 },
  9703. end: { line: 1, column: 25 }
  9704. }
  9705. }, {
  9706. type: 'Property',
  9707. key: {
  9708. type: 'Identifier',
  9709. name: 'b',
  9710. range: [27, 28],
  9711. loc: {
  9712. start: { line: 1, column: 27 },
  9713. end: { line: 1, column: 28 }
  9714. }
  9715. },
  9716. value: {
  9717. type: 'ArrayPattern',
  9718. elements: [{
  9719. type: 'Identifier',
  9720. name: 'y',
  9721. range: [31, 32],
  9722. loc: {
  9723. start: { line: 1, column: 31 },
  9724. end: { line: 1, column: 32 }
  9725. }
  9726. }, {
  9727. type: 'Identifier',
  9728. name: 'z',
  9729. range: [34, 35],
  9730. loc: {
  9731. start: { line: 1, column: 34 },
  9732. end: { line: 1, column: 35 }
  9733. }
  9734. }],
  9735. range: [30, 36],
  9736. loc: {
  9737. start: { line: 1, column: 30 },
  9738. end: { line: 1, column: 36 }
  9739. }
  9740. },
  9741. kind: 'init',
  9742. method: false,
  9743. shorthand: false,
  9744. range: [27, 36],
  9745. loc: {
  9746. start: { line: 1, column: 27 },
  9747. end: { line: 1, column: 36 }
  9748. }
  9749. }],
  9750. range: [12, 38],
  9751. loc: {
  9752. start: { line: 1, column: 12 },
  9753. end: { line: 1, column: 38 }
  9754. }
  9755. }],
  9756. defaults: [],
  9757. body: {
  9758. type: 'BlockStatement',
  9759. body: [],
  9760. range: [53, 55],
  9761. loc: {
  9762. start: { line: 1, column: 53 },
  9763. end: { line: 1, column: 55 }
  9764. }
  9765. },
  9766. rest: {
  9767. type: 'ArrayPattern',
  9768. elements: [{
  9769. type: 'Identifier',
  9770. name: 'a',
  9771. range: [44, 45],
  9772. loc: {
  9773. start: { line: 1, column: 44 },
  9774. end: { line: 1, column: 45 }
  9775. }
  9776. }, {
  9777. type: 'Identifier',
  9778. name: 'b',
  9779. range: [47, 48],
  9780. loc: {
  9781. start: { line: 1, column: 47 },
  9782. end: { line: 1, column: 48 }
  9783. }
  9784. }, {
  9785. type: 'Identifier',
  9786. name: 'c',
  9787. range: [50, 51],
  9788. loc: {
  9789. start: { line: 1, column: 50 },
  9790. end: { line: 1, column: 51 }
  9791. }
  9792. }],
  9793. range: [43, 52],
  9794. loc: {
  9795. start: { line: 1, column: 43 },
  9796. end: { line: 1, column: 52 }
  9797. }
  9798. },
  9799. generator: false,
  9800. expression: false,
  9801. range: [1, 55],
  9802. loc: {
  9803. start: { line: 1, column: 1 },
  9804. end: { line: 1, column: 55 }
  9805. }
  9806. },
  9807. range: [0, 56],
  9808. loc: {
  9809. start: { line: 1, column: 0 },
  9810. end: { line: 1, column: 56 }
  9811. }
  9812. },
  9813. '({ x([ a, b ]){} })': {
  9814. type: 'ExpressionStatement',
  9815. expression: {
  9816. type: 'ObjectExpression',
  9817. properties: [{
  9818. type: 'Property',
  9819. key: {
  9820. type: 'Identifier',
  9821. name: 'x',
  9822. range: [3, 4],
  9823. loc: {
  9824. start: { line: 1, column: 3 },
  9825. end: { line: 1, column: 4 }
  9826. }
  9827. },
  9828. value: {
  9829. type: 'FunctionExpression',
  9830. id: null,
  9831. params: [{
  9832. type: 'ArrayPattern',
  9833. elements: [{
  9834. type: 'Identifier',
  9835. name: 'a',
  9836. range: [7, 8],
  9837. loc: {
  9838. start: { line: 1, column: 7 },
  9839. end: { line: 1, column: 8 }
  9840. }
  9841. }, {
  9842. type: 'Identifier',
  9843. name: 'b',
  9844. range: [10, 11],
  9845. loc: {
  9846. start: { line: 1, column: 10 },
  9847. end: { line: 1, column: 11 }
  9848. }
  9849. }],
  9850. range: [5, 13],
  9851. loc: {
  9852. start: { line: 1, column: 5 },
  9853. end: { line: 1, column: 13 }
  9854. }
  9855. }],
  9856. defaults: [],
  9857. body: {
  9858. type: 'BlockStatement',
  9859. body: [],
  9860. range: [14, 16],
  9861. loc: {
  9862. start: { line: 1, column: 14 },
  9863. end: { line: 1, column: 16 }
  9864. }
  9865. },
  9866. rest: null,
  9867. generator: false,
  9868. expression: false,
  9869. range: [14, 16],
  9870. loc: {
  9871. start: { line: 1, column: 14 },
  9872. end: { line: 1, column: 16 }
  9873. }
  9874. },
  9875. kind: 'init',
  9876. method: true,
  9877. shorthand: false,
  9878. range: [3, 16],
  9879. loc: {
  9880. start: { line: 1, column: 3 },
  9881. end: { line: 1, column: 16 }
  9882. }
  9883. }],
  9884. range: [1, 18],
  9885. loc: {
  9886. start: { line: 1, column: 1 },
  9887. end: { line: 1, column: 18 }
  9888. }
  9889. },
  9890. range: [0, 19],
  9891. loc: {
  9892. start: { line: 1, column: 0 },
  9893. end: { line: 1, column: 19 }
  9894. }
  9895. },
  9896. '({ x(...[ a, b ]){} })': {
  9897. type: 'ExpressionStatement',
  9898. expression: {
  9899. type: 'ObjectExpression',
  9900. properties: [{
  9901. type: 'Property',
  9902. key: {
  9903. type: 'Identifier',
  9904. name: 'x',
  9905. range: [3, 4],
  9906. loc: {
  9907. start: { line: 1, column: 3 },
  9908. end: { line: 1, column: 4 }
  9909. }
  9910. },
  9911. value: {
  9912. type: 'FunctionExpression',
  9913. id: null,
  9914. params: [],
  9915. defaults: [],
  9916. body: {
  9917. type: 'BlockStatement',
  9918. body: [],
  9919. range: [17, 19],
  9920. loc: {
  9921. start: { line: 1, column: 17 },
  9922. end: { line: 1, column: 19 }
  9923. }
  9924. },
  9925. rest: {
  9926. type: 'ArrayPattern',
  9927. elements: [{
  9928. type: 'Identifier',
  9929. name: 'a',
  9930. range: [10, 11],
  9931. loc: {
  9932. start: { line: 1, column: 10 },
  9933. end: { line: 1, column: 11 }
  9934. }
  9935. }, {
  9936. type: 'Identifier',
  9937. name: 'b',
  9938. range: [13, 14],
  9939. loc: {
  9940. start: { line: 1, column: 13 },
  9941. end: { line: 1, column: 14 }
  9942. }
  9943. }],
  9944. range: [8, 16],
  9945. loc: {
  9946. start: { line: 1, column: 8 },
  9947. end: { line: 1, column: 16 }
  9948. }
  9949. },
  9950. generator: false,
  9951. expression: false,
  9952. range: [17, 19],
  9953. loc: {
  9954. start: { line: 1, column: 17 },
  9955. end: { line: 1, column: 19 }
  9956. }
  9957. },
  9958. kind: 'init',
  9959. method: true,
  9960. shorthand: false,
  9961. range: [3, 19],
  9962. loc: {
  9963. start: { line: 1, column: 3 },
  9964. end: { line: 1, column: 19 }
  9965. }
  9966. }],
  9967. range: [1, 21],
  9968. loc: {
  9969. start: { line: 1, column: 1 },
  9970. end: { line: 1, column: 21 }
  9971. }
  9972. },
  9973. range: [0, 22],
  9974. loc: {
  9975. start: { line: 1, column: 0 },
  9976. end: { line: 1, column: 22 }
  9977. }
  9978. },
  9979. '({ x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){} })': {
  9980. type: 'ExpressionStatement',
  9981. expression: {
  9982. type: 'ObjectExpression',
  9983. properties: [{
  9984. type: 'Property',
  9985. key: {
  9986. type: 'Identifier',
  9987. name: 'x',
  9988. range: [3, 4],
  9989. loc: {
  9990. start: { line: 1, column: 3 },
  9991. end: { line: 1, column: 4 }
  9992. }
  9993. },
  9994. value: {
  9995. type: 'FunctionExpression',
  9996. id: null,
  9997. params: [{
  9998. type: 'ObjectPattern',
  9999. properties: [{
  10000. type: 'Property',
  10001. key: {
  10002. type: 'Identifier',
  10003. name: 'a',
  10004. range: [7, 8],
  10005. loc: {
  10006. start: { line: 1, column: 7 },
  10007. end: { line: 1, column: 8 }
  10008. }
  10009. },
  10010. value: {
  10011. type: 'ObjectPattern',
  10012. properties: [{
  10013. type: 'Property',
  10014. key: {
  10015. type: 'Identifier',
  10016. name: 'w',
  10017. range: [12, 13],
  10018. loc: {
  10019. start: { line: 1, column: 12 },
  10020. end: { line: 1, column: 13 }
  10021. }
  10022. },
  10023. value: {
  10024. type: 'Identifier',
  10025. name: 'w',
  10026. range: [12, 13],
  10027. loc: {
  10028. start: { line: 1, column: 12 },
  10029. end: { line: 1, column: 13 }
  10030. }
  10031. },
  10032. kind: 'init',
  10033. method: false,
  10034. shorthand: true,
  10035. range: [12, 13],
  10036. loc: {
  10037. start: { line: 1, column: 12 },
  10038. end: { line: 1, column: 13 }
  10039. }
  10040. }, {
  10041. type: 'Property',
  10042. key: {
  10043. type: 'Identifier',
  10044. name: 'x',
  10045. range: [15, 16],
  10046. loc: {
  10047. start: { line: 1, column: 15 },
  10048. end: { line: 1, column: 16 }
  10049. }
  10050. },
  10051. value: {
  10052. type: 'Identifier',
  10053. name: 'x',
  10054. range: [15, 16],
  10055. loc: {
  10056. start: { line: 1, column: 15 },
  10057. end: { line: 1, column: 16 }
  10058. }
  10059. },
  10060. kind: 'init',
  10061. method: false,
  10062. shorthand: true,
  10063. range: [15, 16],
  10064. loc: {
  10065. start: { line: 1, column: 15 },
  10066. end: { line: 1, column: 16 }
  10067. }
  10068. }],
  10069. range: [10, 18],
  10070. loc: {
  10071. start: { line: 1, column: 10 },
  10072. end: { line: 1, column: 18 }
  10073. }
  10074. },
  10075. kind: 'init',
  10076. method: false,
  10077. shorthand: false,
  10078. range: [7, 18],
  10079. loc: {
  10080. start: { line: 1, column: 7 },
  10081. end: { line: 1, column: 18 }
  10082. }
  10083. }, {
  10084. type: 'Property',
  10085. key: {
  10086. type: 'Identifier',
  10087. name: 'b',
  10088. range: [20, 21],
  10089. loc: {
  10090. start: { line: 1, column: 20 },
  10091. end: { line: 1, column: 21 }
  10092. }
  10093. },
  10094. value: {
  10095. type: 'ArrayPattern',
  10096. elements: [{
  10097. type: 'Identifier',
  10098. name: 'y',
  10099. range: [24, 25],
  10100. loc: {
  10101. start: { line: 1, column: 24 },
  10102. end: { line: 1, column: 25 }
  10103. }
  10104. }, {
  10105. type: 'Identifier',
  10106. name: 'z',
  10107. range: [27, 28],
  10108. loc: {
  10109. start: { line: 1, column: 27 },
  10110. end: { line: 1, column: 28 }
  10111. }
  10112. }],
  10113. range: [23, 29],
  10114. loc: {
  10115. start: { line: 1, column: 23 },
  10116. end: { line: 1, column: 29 }
  10117. }
  10118. },
  10119. kind: 'init',
  10120. method: false,
  10121. shorthand: false,
  10122. range: [20, 29],
  10123. loc: {
  10124. start: { line: 1, column: 20 },
  10125. end: { line: 1, column: 29 }
  10126. }
  10127. }],
  10128. range: [5, 31],
  10129. loc: {
  10130. start: { line: 1, column: 5 },
  10131. end: { line: 1, column: 31 }
  10132. }
  10133. }],
  10134. defaults: [],
  10135. body: {
  10136. type: 'BlockStatement',
  10137. body: [],
  10138. range: [46, 48],
  10139. loc: {
  10140. start: { line: 1, column: 46 },
  10141. end: { line: 1, column: 48 }
  10142. }
  10143. },
  10144. rest: {
  10145. type: 'ArrayPattern',
  10146. elements: [{
  10147. type: 'Identifier',
  10148. name: 'a',
  10149. range: [37, 38],
  10150. loc: {
  10151. start: { line: 1, column: 37 },
  10152. end: { line: 1, column: 38 }
  10153. }
  10154. }, {
  10155. type: 'Identifier',
  10156. name: 'b',
  10157. range: [40, 41],
  10158. loc: {
  10159. start: { line: 1, column: 40 },
  10160. end: { line: 1, column: 41 }
  10161. }
  10162. }, {
  10163. type: 'Identifier',
  10164. name: 'c',
  10165. range: [43, 44],
  10166. loc: {
  10167. start: { line: 1, column: 43 },
  10168. end: { line: 1, column: 44 }
  10169. }
  10170. }],
  10171. range: [36, 45],
  10172. loc: {
  10173. start: { line: 1, column: 36 },
  10174. end: { line: 1, column: 45 }
  10175. }
  10176. },
  10177. generator: false,
  10178. expression: false,
  10179. range: [46, 48],
  10180. loc: {
  10181. start: { line: 1, column: 46 },
  10182. end: { line: 1, column: 48 }
  10183. }
  10184. },
  10185. kind: 'init',
  10186. method: true,
  10187. shorthand: false,
  10188. range: [3, 48],
  10189. loc: {
  10190. start: { line: 1, column: 3 },
  10191. end: { line: 1, column: 48 }
  10192. }
  10193. }],
  10194. range: [1, 50],
  10195. loc: {
  10196. start: { line: 1, column: 1 },
  10197. end: { line: 1, column: 50 }
  10198. }
  10199. },
  10200. range: [0, 51],
  10201. loc: {
  10202. start: { line: 1, column: 0 },
  10203. end: { line: 1, column: 51 }
  10204. }
  10205. },
  10206. '(...a) => {}': {
  10207. type: 'ExpressionStatement',
  10208. expression: {
  10209. type: 'ArrowFunctionExpression',
  10210. id: null,
  10211. params: [],
  10212. defaults: [],
  10213. body: {
  10214. type: 'BlockStatement',
  10215. body: [],
  10216. range: [10, 12],
  10217. loc: {
  10218. start: { line: 1, column: 10 },
  10219. end: { line: 1, column: 12 }
  10220. }
  10221. },
  10222. rest: {
  10223. type: 'Identifier',
  10224. name: 'a',
  10225. range: [4, 5],
  10226. loc: {
  10227. start: { line: 1, column: 4 },
  10228. end: { line: 1, column: 5 }
  10229. }
  10230. },
  10231. generator: false,
  10232. expression: false,
  10233. range: [0, 12],
  10234. loc: {
  10235. start: { line: 1, column: 0 },
  10236. end: { line: 1, column: 12 }
  10237. }
  10238. },
  10239. range: [0, 12],
  10240. loc: {
  10241. start: { line: 1, column: 0 },
  10242. end: { line: 1, column: 12 }
  10243. }
  10244. },
  10245. '(a, ...b) => {}': {
  10246. type: 'ExpressionStatement',
  10247. expression: {
  10248. type: 'ArrowFunctionExpression',
  10249. id: null,
  10250. params: [{
  10251. type: 'Identifier',
  10252. name: 'a',
  10253. range: [1, 2],
  10254. loc: {
  10255. start: { line: 1, column: 1 },
  10256. end: { line: 1, column: 2 }
  10257. }
  10258. }],
  10259. defaults: [],
  10260. body: {
  10261. type: 'BlockStatement',
  10262. body: [],
  10263. range: [13, 15],
  10264. loc: {
  10265. start: { line: 1, column: 13 },
  10266. end: { line: 1, column: 15 }
  10267. }
  10268. },
  10269. rest: {
  10270. type: 'Identifier',
  10271. name: 'b',
  10272. range: [7, 8],
  10273. loc: {
  10274. start: { line: 1, column: 7 },
  10275. end: { line: 1, column: 8 }
  10276. }
  10277. },
  10278. generator: false,
  10279. expression: false,
  10280. range: [0, 15],
  10281. loc: {
  10282. start: { line: 1, column: 0 },
  10283. end: { line: 1, column: 15 }
  10284. }
  10285. },
  10286. range: [0, 15],
  10287. loc: {
  10288. start: { line: 1, column: 0 },
  10289. end: { line: 1, column: 15 }
  10290. }
  10291. },
  10292. '({ a }) => {}': {
  10293. type: 'ExpressionStatement',
  10294. expression: {
  10295. type: 'ArrowFunctionExpression',
  10296. id: null,
  10297. params: [{
  10298. type: 'ObjectPattern',
  10299. properties: [{
  10300. type: 'Property',
  10301. key: {
  10302. type: 'Identifier',
  10303. name: 'a',
  10304. range: [3, 4],
  10305. loc: {
  10306. start: { line: 1, column: 3 },
  10307. end: { line: 1, column: 4 }
  10308. }
  10309. },
  10310. value: {
  10311. type: 'Identifier',
  10312. name: 'a',
  10313. range: [3, 4],
  10314. loc: {
  10315. start: { line: 1, column: 3 },
  10316. end: { line: 1, column: 4 }
  10317. }
  10318. },
  10319. kind: 'init',
  10320. method: false,
  10321. shorthand: true,
  10322. range: [3, 4],
  10323. loc: {
  10324. start: { line: 1, column: 3 },
  10325. end: { line: 1, column: 4 }
  10326. }
  10327. }],
  10328. range: [1, 6],
  10329. loc: {
  10330. start: { line: 1, column: 1 },
  10331. end: { line: 1, column: 6 }
  10332. }
  10333. }],
  10334. defaults: [],
  10335. body: {
  10336. type: 'BlockStatement',
  10337. body: [],
  10338. range: [11, 13],
  10339. loc: {
  10340. start: { line: 1, column: 11 },
  10341. end: { line: 1, column: 13 }
  10342. }
  10343. },
  10344. rest: null,
  10345. generator: false,
  10346. expression: false,
  10347. range: [0, 13],
  10348. loc: {
  10349. start: { line: 1, column: 0 },
  10350. end: { line: 1, column: 13 }
  10351. }
  10352. },
  10353. range: [0, 13],
  10354. loc: {
  10355. start: { line: 1, column: 0 },
  10356. end: { line: 1, column: 13 }
  10357. }
  10358. },
  10359. '({ a }, ...b) => {}': {
  10360. type: 'ExpressionStatement',
  10361. expression: {
  10362. type: 'ArrowFunctionExpression',
  10363. id: null,
  10364. params: [{
  10365. type: 'ObjectPattern',
  10366. properties: [{
  10367. type: 'Property',
  10368. key: {
  10369. type: 'Identifier',
  10370. name: 'a',
  10371. range: [3, 4],
  10372. loc: {
  10373. start: { line: 1, column: 3 },
  10374. end: { line: 1, column: 4 }
  10375. }
  10376. },
  10377. value: {
  10378. type: 'Identifier',
  10379. name: 'a',
  10380. range: [3, 4],
  10381. loc: {
  10382. start: { line: 1, column: 3 },
  10383. end: { line: 1, column: 4 }
  10384. }
  10385. },
  10386. kind: 'init',
  10387. method: false,
  10388. shorthand: true,
  10389. range: [3, 4],
  10390. loc: {
  10391. start: { line: 1, column: 3 },
  10392. end: { line: 1, column: 4 }
  10393. }
  10394. }],
  10395. range: [1, 6],
  10396. loc: {
  10397. start: { line: 1, column: 1 },
  10398. end: { line: 1, column: 6 }
  10399. }
  10400. }],
  10401. defaults: [],
  10402. body: {
  10403. type: 'BlockStatement',
  10404. body: [],
  10405. range: [17, 19],
  10406. loc: {
  10407. start: { line: 1, column: 17 },
  10408. end: { line: 1, column: 19 }
  10409. }
  10410. },
  10411. rest: {
  10412. type: 'Identifier',
  10413. name: 'b',
  10414. range: [11, 12],
  10415. loc: {
  10416. start: { line: 1, column: 11 },
  10417. end: { line: 1, column: 12 }
  10418. }
  10419. },
  10420. generator: false,
  10421. expression: false,
  10422. range: [0, 19],
  10423. loc: {
  10424. start: { line: 1, column: 0 },
  10425. end: { line: 1, column: 19 }
  10426. }
  10427. },
  10428. range: [0, 19],
  10429. loc: {
  10430. start: { line: 1, column: 0 },
  10431. end: { line: 1, column: 19 }
  10432. }
  10433. },
  10434. '(...[a, b]) => {}': {
  10435. type: 'ExpressionStatement',
  10436. expression: {
  10437. type: 'ArrowFunctionExpression',
  10438. id: null,
  10439. params: [],
  10440. defaults: [],
  10441. body: {
  10442. type: 'BlockStatement',
  10443. body: [],
  10444. range: [15, 17],
  10445. loc: {
  10446. start: { line: 1, column: 15 },
  10447. end: { line: 1, column: 17 }
  10448. }
  10449. },
  10450. rest: {
  10451. type: 'ArrayPattern',
  10452. elements: [{
  10453. type: 'Identifier',
  10454. name: 'a',
  10455. range: [5, 6],
  10456. loc: {
  10457. start: { line: 1, column: 5 },
  10458. end: { line: 1, column: 6 }
  10459. }
  10460. }, {
  10461. type: 'Identifier',
  10462. name: 'b',
  10463. range: [8, 9],
  10464. loc: {
  10465. start: { line: 1, column: 8 },
  10466. end: { line: 1, column: 9 }
  10467. }
  10468. }],
  10469. range: [4, 10],
  10470. loc: {
  10471. start: { line: 1, column: 4 },
  10472. end: { line: 1, column: 10 }
  10473. }
  10474. },
  10475. generator: false,
  10476. expression: false,
  10477. range: [0, 17],
  10478. loc: {
  10479. start: { line: 1, column: 0 },
  10480. end: { line: 1, column: 17 }
  10481. }
  10482. },
  10483. range: [0, 17],
  10484. loc: {
  10485. start: { line: 1, column: 0 },
  10486. end: { line: 1, column: 17 }
  10487. }
  10488. },
  10489. '(a, ...[b]) => {}': {
  10490. type: 'ExpressionStatement',
  10491. expression: {
  10492. type: 'ArrowFunctionExpression',
  10493. id: null,
  10494. params: [{
  10495. type: 'Identifier',
  10496. name: 'a',
  10497. range: [1, 2],
  10498. loc: {
  10499. start: { line: 1, column: 1 },
  10500. end: { line: 1, column: 2 }
  10501. }
  10502. }],
  10503. defaults: [],
  10504. body: {
  10505. type: 'BlockStatement',
  10506. body: [],
  10507. range: [15, 17],
  10508. loc: {
  10509. start: { line: 1, column: 15 },
  10510. end: { line: 1, column: 17 }
  10511. }
  10512. },
  10513. rest: {
  10514. type: 'ArrayPattern',
  10515. elements: [{
  10516. type: 'Identifier',
  10517. name: 'b',
  10518. range: [8, 9],
  10519. loc: {
  10520. start: { line: 1, column: 8 },
  10521. end: { line: 1, column: 9 }
  10522. }
  10523. }],
  10524. range: [7, 10],
  10525. loc: {
  10526. start: { line: 1, column: 7 },
  10527. end: { line: 1, column: 10 }
  10528. }
  10529. },
  10530. generator: false,
  10531. expression: false,
  10532. range: [0, 17],
  10533. loc: {
  10534. start: { line: 1, column: 0 },
  10535. end: { line: 1, column: 17 }
  10536. }
  10537. },
  10538. range: [0, 17],
  10539. loc: {
  10540. start: { line: 1, column: 0 },
  10541. end: { line: 1, column: 17 }
  10542. }
  10543. },
  10544. '({ a: [a, b] }, ...c) => {}': {
  10545. type: 'ExpressionStatement',
  10546. expression: {
  10547. type: 'ArrowFunctionExpression',
  10548. id: null,
  10549. params: [{
  10550. type: 'ObjectPattern',
  10551. properties: [{
  10552. type: 'Property',
  10553. key: {
  10554. type: 'Identifier',
  10555. name: 'a',
  10556. range: [3, 4],
  10557. loc: {
  10558. start: { line: 1, column: 3 },
  10559. end: { line: 1, column: 4 }
  10560. }
  10561. },
  10562. value: {
  10563. type: 'ArrayPattern',
  10564. elements: [{
  10565. type: 'Identifier',
  10566. name: 'a',
  10567. range: [7, 8],
  10568. loc: {
  10569. start: { line: 1, column: 7 },
  10570. end: { line: 1, column: 8 }
  10571. }
  10572. }, {
  10573. type: 'Identifier',
  10574. name: 'b',
  10575. range: [10, 11],
  10576. loc: {
  10577. start: { line: 1, column: 10 },
  10578. end: { line: 1, column: 11 }
  10579. }
  10580. }],
  10581. range: [6, 12],
  10582. loc: {
  10583. start: { line: 1, column: 6 },
  10584. end: { line: 1, column: 12 }
  10585. }
  10586. },
  10587. kind: 'init',
  10588. method: false,
  10589. shorthand: false,
  10590. range: [3, 12],
  10591. loc: {
  10592. start: { line: 1, column: 3 },
  10593. end: { line: 1, column: 12 }
  10594. }
  10595. }],
  10596. range: [1, 14],
  10597. loc: {
  10598. start: { line: 1, column: 1 },
  10599. end: { line: 1, column: 14 }
  10600. }
  10601. }],
  10602. defaults: [],
  10603. body: {
  10604. type: 'BlockStatement',
  10605. body: [],
  10606. range: [25, 27],
  10607. loc: {
  10608. start: { line: 1, column: 25 },
  10609. end: { line: 1, column: 27 }
  10610. }
  10611. },
  10612. rest: {
  10613. type: 'Identifier',
  10614. name: 'c',
  10615. range: [19, 20],
  10616. loc: {
  10617. start: { line: 1, column: 19 },
  10618. end: { line: 1, column: 20 }
  10619. }
  10620. },
  10621. generator: false,
  10622. expression: false,
  10623. range: [0, 27],
  10624. loc: {
  10625. start: { line: 1, column: 0 },
  10626. end: { line: 1, column: 27 }
  10627. }
  10628. },
  10629. range: [0, 27],
  10630. loc: {
  10631. start: { line: 1, column: 0 },
  10632. end: { line: 1, column: 27 }
  10633. }
  10634. },
  10635. '({ a: b, c }, [d, e], ...f) => {}': {
  10636. type: 'ExpressionStatement',
  10637. expression: {
  10638. type: 'ArrowFunctionExpression',
  10639. id: null,
  10640. params: [{
  10641. type: 'ObjectPattern',
  10642. properties: [{
  10643. type: 'Property',
  10644. key: {
  10645. type: 'Identifier',
  10646. name: 'a',
  10647. range: [3, 4],
  10648. loc: {
  10649. start: { line: 1, column: 3 },
  10650. end: { line: 1, column: 4 }
  10651. }
  10652. },
  10653. value: {
  10654. type: 'Identifier',
  10655. name: 'b',
  10656. range: [6, 7],
  10657. loc: {
  10658. start: { line: 1, column: 6 },
  10659. end: { line: 1, column: 7 }
  10660. }
  10661. },
  10662. kind: 'init',
  10663. method: false,
  10664. shorthand: false,
  10665. range: [3, 7],
  10666. loc: {
  10667. start: { line: 1, column: 3 },
  10668. end: { line: 1, column: 7 }
  10669. }
  10670. }, {
  10671. type: 'Property',
  10672. key: {
  10673. type: 'Identifier',
  10674. name: 'c',
  10675. range: [9, 10],
  10676. loc: {
  10677. start: { line: 1, column: 9 },
  10678. end: { line: 1, column: 10 }
  10679. }
  10680. },
  10681. value: {
  10682. type: 'Identifier',
  10683. name: 'c',
  10684. range: [9, 10],
  10685. loc: {
  10686. start: { line: 1, column: 9 },
  10687. end: { line: 1, column: 10 }
  10688. }
  10689. },
  10690. kind: 'init',
  10691. method: false,
  10692. shorthand: true,
  10693. range: [9, 10],
  10694. loc: {
  10695. start: { line: 1, column: 9 },
  10696. end: { line: 1, column: 10 }
  10697. }
  10698. }],
  10699. range: [1, 12],
  10700. loc: {
  10701. start: { line: 1, column: 1 },
  10702. end: { line: 1, column: 12 }
  10703. }
  10704. }, {
  10705. type: 'ArrayPattern',
  10706. elements: [{
  10707. type: 'Identifier',
  10708. name: 'd',
  10709. range: [15, 16],
  10710. loc: {
  10711. start: { line: 1, column: 15 },
  10712. end: { line: 1, column: 16 }
  10713. }
  10714. }, {
  10715. type: 'Identifier',
  10716. name: 'e',
  10717. range: [18, 19],
  10718. loc: {
  10719. start: { line: 1, column: 18 },
  10720. end: { line: 1, column: 19 }
  10721. }
  10722. }],
  10723. range: [14, 20],
  10724. loc: {
  10725. start: { line: 1, column: 14 },
  10726. end: { line: 1, column: 20 }
  10727. }
  10728. }],
  10729. defaults: [],
  10730. body: {
  10731. type: 'BlockStatement',
  10732. body: [],
  10733. range: [31, 33],
  10734. loc: {
  10735. start: { line: 1, column: 31 },
  10736. end: { line: 1, column: 33 }
  10737. }
  10738. },
  10739. rest: {
  10740. type: 'Identifier',
  10741. name: 'f',
  10742. range: [25, 26],
  10743. loc: {
  10744. start: { line: 1, column: 25 },
  10745. end: { line: 1, column: 26 }
  10746. }
  10747. },
  10748. generator: false,
  10749. expression: false,
  10750. range: [0, 33],
  10751. loc: {
  10752. start: { line: 1, column: 0 },
  10753. end: { line: 1, column: 33 }
  10754. }
  10755. },
  10756. range: [0, 33],
  10757. loc: {
  10758. start: { line: 1, column: 0 },
  10759. end: { line: 1, column: 33 }
  10760. }
  10761. }
  10762. },
  10763. 'ES6: SpreadElement': {
  10764. '[...a] = b': {
  10765. type: 'ExpressionStatement',
  10766. expression: {
  10767. type: 'AssignmentExpression',
  10768. operator: '=',
  10769. left: {
  10770. type: 'ArrayPattern',
  10771. elements: [{
  10772. type: 'SpreadElement',
  10773. argument: {
  10774. type: 'Identifier',
  10775. name: 'a',
  10776. range: [4, 5],
  10777. loc: {
  10778. start: { line: 1, column: 4 },
  10779. end: { line: 1, column: 5 }
  10780. }
  10781. },
  10782. range: [1, 5],
  10783. loc: {
  10784. start: { line: 1, column: 1 },
  10785. end: { line: 1, column: 5 }
  10786. }
  10787. }],
  10788. range: [0, 6],
  10789. loc: {
  10790. start: { line: 1, column: 0 },
  10791. end: { line: 1, column: 6 }
  10792. }
  10793. },
  10794. right: {
  10795. type: 'Identifier',
  10796. name: 'b',
  10797. range: [9, 10],
  10798. loc: {
  10799. start: { line: 1, column: 9 },
  10800. end: { line: 1, column: 10 }
  10801. }
  10802. },
  10803. range: [0, 10],
  10804. loc: {
  10805. start: { line: 1, column: 0 },
  10806. end: { line: 1, column: 10 }
  10807. }
  10808. },
  10809. range: [0, 10],
  10810. loc: {
  10811. start: { line: 1, column: 0 },
  10812. end: { line: 1, column: 10 }
  10813. }
  10814. },
  10815. '[a, ...b] = c': {
  10816. type: 'ExpressionStatement',
  10817. expression: {
  10818. type: 'AssignmentExpression',
  10819. operator: '=',
  10820. left: {
  10821. type: 'ArrayPattern',
  10822. elements: [{
  10823. type: 'Identifier',
  10824. name: 'a',
  10825. range: [1, 2],
  10826. loc: {
  10827. start: { line: 1, column: 1 },
  10828. end: { line: 1, column: 2 }
  10829. }
  10830. }, {
  10831. type: 'SpreadElement',
  10832. argument: {
  10833. type: 'Identifier',
  10834. name: 'b',
  10835. range: [7, 8],
  10836. loc: {
  10837. start: { line: 1, column: 7 },
  10838. end: { line: 1, column: 8 }
  10839. }
  10840. },
  10841. range: [4, 8],
  10842. loc: {
  10843. start: { line: 1, column: 4 },
  10844. end: { line: 1, column: 8 }
  10845. }
  10846. }],
  10847. range: [0, 9],
  10848. loc: {
  10849. start: { line: 1, column: 0 },
  10850. end: { line: 1, column: 9 }
  10851. }
  10852. },
  10853. right: {
  10854. type: 'Identifier',
  10855. name: 'c',
  10856. range: [12, 13],
  10857. loc: {
  10858. start: { line: 1, column: 12 },
  10859. end: { line: 1, column: 13 }
  10860. }
  10861. },
  10862. range: [0, 13],
  10863. loc: {
  10864. start: { line: 1, column: 0 },
  10865. end: { line: 1, column: 13 }
  10866. }
  10867. },
  10868. range: [0, 13],
  10869. loc: {
  10870. start: { line: 1, column: 0 },
  10871. end: { line: 1, column: 13 }
  10872. }
  10873. },
  10874. '[{ a, b }, ...c] = d': {
  10875. type: 'ExpressionStatement',
  10876. expression: {
  10877. type: 'AssignmentExpression',
  10878. operator: '=',
  10879. left: {
  10880. type: 'ArrayPattern',
  10881. elements: [{
  10882. type: 'ObjectPattern',
  10883. properties: [{
  10884. type: 'Property',
  10885. key: {
  10886. type: 'Identifier',
  10887. name: 'a',
  10888. range: [3, 4],
  10889. loc: {
  10890. start: { line: 1, column: 3 },
  10891. end: { line: 1, column: 4 }
  10892. }
  10893. },
  10894. value: {
  10895. type: 'Identifier',
  10896. name: 'a',
  10897. range: [3, 4],
  10898. loc: {
  10899. start: { line: 1, column: 3 },
  10900. end: { line: 1, column: 4 }
  10901. }
  10902. },
  10903. kind: 'init',
  10904. method: false,
  10905. shorthand: true,
  10906. range: [3, 4],
  10907. loc: {
  10908. start: { line: 1, column: 3 },
  10909. end: { line: 1, column: 4 }
  10910. }
  10911. }, {
  10912. type: 'Property',
  10913. key: {
  10914. type: 'Identifier',
  10915. name: 'b',
  10916. range: [6, 7],
  10917. loc: {
  10918. start: { line: 1, column: 6 },
  10919. end: { line: 1, column: 7 }
  10920. }
  10921. },
  10922. value: {
  10923. type: 'Identifier',
  10924. name: 'b',
  10925. range: [6, 7],
  10926. loc: {
  10927. start: { line: 1, column: 6 },
  10928. end: { line: 1, column: 7 }
  10929. }
  10930. },
  10931. kind: 'init',
  10932. method: false,
  10933. shorthand: true,
  10934. range: [6, 7],
  10935. loc: {
  10936. start: { line: 1, column: 6 },
  10937. end: { line: 1, column: 7 }
  10938. }
  10939. }],
  10940. range: [1, 9],
  10941. loc: {
  10942. start: { line: 1, column: 1 },
  10943. end: { line: 1, column: 9 }
  10944. }
  10945. }, {
  10946. type: 'SpreadElement',
  10947. argument: {
  10948. type: 'Identifier',
  10949. name: 'c',
  10950. range: [14, 15],
  10951. loc: {
  10952. start: { line: 1, column: 14 },
  10953. end: { line: 1, column: 15 }
  10954. }
  10955. },
  10956. range: [11, 15],
  10957. loc: {
  10958. start: { line: 1, column: 11 },
  10959. end: { line: 1, column: 15 }
  10960. }
  10961. }],
  10962. range: [0, 16],
  10963. loc: {
  10964. start: { line: 1, column: 0 },
  10965. end: { line: 1, column: 16 }
  10966. }
  10967. },
  10968. right: {
  10969. type: 'Identifier',
  10970. name: 'd',
  10971. range: [19, 20],
  10972. loc: {
  10973. start: { line: 1, column: 19 },
  10974. end: { line: 1, column: 20 }
  10975. }
  10976. },
  10977. range: [0, 20],
  10978. loc: {
  10979. start: { line: 1, column: 0 },
  10980. end: { line: 1, column: 20 }
  10981. }
  10982. },
  10983. range: [0, 20],
  10984. loc: {
  10985. start: { line: 1, column: 0 },
  10986. end: { line: 1, column: 20 }
  10987. }
  10988. },
  10989. '[a, ...[b, c]] = d': {
  10990. type: 'ExpressionStatement',
  10991. expression: {
  10992. type: 'AssignmentExpression',
  10993. operator: '=',
  10994. left: {
  10995. type: 'ArrayPattern',
  10996. elements: [{
  10997. type: 'Identifier',
  10998. name: 'a',
  10999. range: [1, 2],
  11000. loc: {
  11001. start: { line: 1, column: 1 },
  11002. end: { line: 1, column: 2 }
  11003. }
  11004. }, {
  11005. type: 'SpreadElement',
  11006. argument: {
  11007. type: 'ArrayPattern',
  11008. elements: [{
  11009. type: 'Identifier',
  11010. name: 'b',
  11011. range: [8, 9],
  11012. loc: {
  11013. start: { line: 1, column: 8 },
  11014. end: { line: 1, column: 9 }
  11015. }
  11016. }, {
  11017. type: 'Identifier',
  11018. name: 'c',
  11019. range: [11, 12],
  11020. loc: {
  11021. start: { line: 1, column: 11 },
  11022. end: { line: 1, column: 12 }
  11023. }
  11024. }],
  11025. range: [7, 13],
  11026. loc: {
  11027. start: { line: 1, column: 7 },
  11028. end: { line: 1, column: 13 }
  11029. }
  11030. },
  11031. range: [4, 13],
  11032. loc: {
  11033. start: { line: 1, column: 4 },
  11034. end: { line: 1, column: 13 }
  11035. }
  11036. }],
  11037. range: [0, 14],
  11038. loc: {
  11039. start: { line: 1, column: 0 },
  11040. end: { line: 1, column: 14 }
  11041. }
  11042. },
  11043. right: {
  11044. type: 'Identifier',
  11045. name: 'd',
  11046. range: [17, 18],
  11047. loc: {
  11048. start: { line: 1, column: 17 },
  11049. end: { line: 1, column: 18 }
  11050. }
  11051. },
  11052. range: [0, 18],
  11053. loc: {
  11054. start: { line: 1, column: 0 },
  11055. end: { line: 1, column: 18 }
  11056. }
  11057. },
  11058. range: [0, 18],
  11059. loc: {
  11060. start: { line: 1, column: 0 },
  11061. end: { line: 1, column: 18 }
  11062. }
  11063. },
  11064. 'var [...a] = b': {
  11065. type: 'VariableDeclaration',
  11066. declarations: [{
  11067. type: 'VariableDeclarator',
  11068. id: {
  11069. type: 'ArrayPattern',
  11070. elements: [{
  11071. type: 'SpreadElement',
  11072. argument: {
  11073. type: 'Identifier',
  11074. name: 'a',
  11075. range: [8, 9],
  11076. loc: {
  11077. start: { line: 1, column: 8 },
  11078. end: { line: 1, column: 9 }
  11079. }
  11080. },
  11081. range: [5, 9],
  11082. loc: {
  11083. start: { line: 1, column: 5 },
  11084. end: { line: 1, column: 9 }
  11085. }
  11086. }],
  11087. range: [4, 10],
  11088. loc: {
  11089. start: { line: 1, column: 4 },
  11090. end: { line: 1, column: 10 }
  11091. }
  11092. },
  11093. init: {
  11094. type: 'Identifier',
  11095. name: 'b',
  11096. range: [13, 14],
  11097. loc: {
  11098. start: { line: 1, column: 13 },
  11099. end: { line: 1, column: 14 }
  11100. }
  11101. },
  11102. range: [4, 14],
  11103. loc: {
  11104. start: { line: 1, column: 4 },
  11105. end: { line: 1, column: 14 }
  11106. }
  11107. }],
  11108. kind: 'var',
  11109. range: [0, 14],
  11110. loc: {
  11111. start: { line: 1, column: 0 },
  11112. end: { line: 1, column: 14 }
  11113. }
  11114. },
  11115. 'var [a, ...b] = c': {
  11116. type: 'VariableDeclaration',
  11117. declarations: [{
  11118. type: 'VariableDeclarator',
  11119. id: {
  11120. type: 'ArrayPattern',
  11121. elements: [{
  11122. type: 'Identifier',
  11123. name: 'a',
  11124. range: [5, 6],
  11125. loc: {
  11126. start: { line: 1, column: 5 },
  11127. end: { line: 1, column: 6 }
  11128. }
  11129. }, {
  11130. type: 'SpreadElement',
  11131. argument: {
  11132. type: 'Identifier',
  11133. name: 'b',
  11134. range: [11, 12],
  11135. loc: {
  11136. start: { line: 1, column: 11 },
  11137. end: { line: 1, column: 12 }
  11138. }
  11139. },
  11140. range: [8, 12],
  11141. loc: {
  11142. start: { line: 1, column: 8 },
  11143. end: { line: 1, column: 12 }
  11144. }
  11145. }],
  11146. range: [4, 13],
  11147. loc: {
  11148. start: { line: 1, column: 4 },
  11149. end: { line: 1, column: 13 }
  11150. }
  11151. },
  11152. init: {
  11153. type: 'Identifier',
  11154. name: 'c',
  11155. range: [16, 17],
  11156. loc: {
  11157. start: { line: 1, column: 16 },
  11158. end: { line: 1, column: 17 }
  11159. }
  11160. },
  11161. range: [4, 17],
  11162. loc: {
  11163. start: { line: 1, column: 4 },
  11164. end: { line: 1, column: 17 }
  11165. }
  11166. }],
  11167. kind: 'var',
  11168. range: [0, 17],
  11169. loc: {
  11170. start: { line: 1, column: 0 },
  11171. end: { line: 1, column: 17 }
  11172. }
  11173. },
  11174. 'var [{ a, b }, ...c] = d': {
  11175. type: 'VariableDeclaration',
  11176. declarations: [{
  11177. type: 'VariableDeclarator',
  11178. id: {
  11179. type: 'ArrayPattern',
  11180. elements: [{
  11181. type: 'ObjectPattern',
  11182. properties: [{
  11183. type: 'Property',
  11184. key: {
  11185. type: 'Identifier',
  11186. name: 'a',
  11187. range: [7, 8],
  11188. loc: {
  11189. start: { line: 1, column: 7 },
  11190. end: { line: 1, column: 8 }
  11191. }
  11192. },
  11193. value: {
  11194. type: 'Identifier',
  11195. name: 'a',
  11196. range: [7, 8],
  11197. loc: {
  11198. start: { line: 1, column: 7 },
  11199. end: { line: 1, column: 8 }
  11200. }
  11201. },
  11202. kind: 'init',
  11203. method: false,
  11204. shorthand: true,
  11205. range: [7, 8],
  11206. loc: {
  11207. start: { line: 1, column: 7 },
  11208. end: { line: 1, column: 8 }
  11209. }
  11210. }, {
  11211. type: 'Property',
  11212. key: {
  11213. type: 'Identifier',
  11214. name: 'b',
  11215. range: [10, 11],
  11216. loc: {
  11217. start: { line: 1, column: 10 },
  11218. end: { line: 1, column: 11 }
  11219. }
  11220. },
  11221. value: {
  11222. type: 'Identifier',
  11223. name: 'b',
  11224. range: [10, 11],
  11225. loc: {
  11226. start: { line: 1, column: 10 },
  11227. end: { line: 1, column: 11 }
  11228. }
  11229. },
  11230. kind: 'init',
  11231. method: false,
  11232. shorthand: true,
  11233. range: [10, 11],
  11234. loc: {
  11235. start: { line: 1, column: 10 },
  11236. end: { line: 1, column: 11 }
  11237. }
  11238. }],
  11239. range: [5, 13],
  11240. loc: {
  11241. start: { line: 1, column: 5 },
  11242. end: { line: 1, column: 13 }
  11243. }
  11244. }, {
  11245. type: 'SpreadElement',
  11246. argument: {
  11247. type: 'Identifier',
  11248. name: 'c',
  11249. range: [18, 19],
  11250. loc: {
  11251. start: { line: 1, column: 18 },
  11252. end: { line: 1, column: 19 }
  11253. }
  11254. },
  11255. range: [15, 19],
  11256. loc: {
  11257. start: { line: 1, column: 15 },
  11258. end: { line: 1, column: 19 }
  11259. }
  11260. }],
  11261. range: [4, 20],
  11262. loc: {
  11263. start: { line: 1, column: 4 },
  11264. end: { line: 1, column: 20 }
  11265. }
  11266. },
  11267. init: {
  11268. type: 'Identifier',
  11269. name: 'd',
  11270. range: [23, 24],
  11271. loc: {
  11272. start: { line: 1, column: 23 },
  11273. end: { line: 1, column: 24 }
  11274. }
  11275. },
  11276. range: [4, 24],
  11277. loc: {
  11278. start: { line: 1, column: 4 },
  11279. end: { line: 1, column: 24 }
  11280. }
  11281. }],
  11282. kind: 'var',
  11283. range: [0, 24],
  11284. loc: {
  11285. start: { line: 1, column: 0 },
  11286. end: { line: 1, column: 24 }
  11287. }
  11288. },
  11289. 'var [a, ...[b, c]] = d': {
  11290. type: 'VariableDeclaration',
  11291. declarations: [{
  11292. type: 'VariableDeclarator',
  11293. id: {
  11294. type: 'ArrayPattern',
  11295. elements: [{
  11296. type: 'Identifier',
  11297. name: 'a',
  11298. range: [5, 6],
  11299. loc: {
  11300. start: { line: 1, column: 5 },
  11301. end: { line: 1, column: 6 }
  11302. }
  11303. }, {
  11304. type: 'SpreadElement',
  11305. argument: {
  11306. type: 'ArrayPattern',
  11307. elements: [{
  11308. type: 'Identifier',
  11309. name: 'b',
  11310. range: [12, 13],
  11311. loc: {
  11312. start: { line: 1, column: 12 },
  11313. end: { line: 1, column: 13 }
  11314. }
  11315. }, {
  11316. type: 'Identifier',
  11317. name: 'c',
  11318. range: [15, 16],
  11319. loc: {
  11320. start: { line: 1, column: 15 },
  11321. end: { line: 1, column: 16 }
  11322. }
  11323. }],
  11324. range: [11, 17],
  11325. loc: {
  11326. start: { line: 1, column: 11 },
  11327. end: { line: 1, column: 17 }
  11328. }
  11329. },
  11330. range: [8, 17],
  11331. loc: {
  11332. start: { line: 1, column: 8 },
  11333. end: { line: 1, column: 17 }
  11334. }
  11335. }],
  11336. range: [4, 18],
  11337. loc: {
  11338. start: { line: 1, column: 4 },
  11339. end: { line: 1, column: 18 }
  11340. }
  11341. },
  11342. init: {
  11343. type: 'Identifier',
  11344. name: 'd',
  11345. range: [21, 22],
  11346. loc: {
  11347. start: { line: 1, column: 21 },
  11348. end: { line: 1, column: 22 }
  11349. }
  11350. },
  11351. range: [4, 22],
  11352. loc: {
  11353. start: { line: 1, column: 4 },
  11354. end: { line: 1, column: 22 }
  11355. }
  11356. }],
  11357. kind: 'var',
  11358. range: [0, 22],
  11359. loc: {
  11360. start: { line: 1, column: 0 },
  11361. end: { line: 1, column: 22 }
  11362. }
  11363. },
  11364. 'func(...a)': {
  11365. type: 'ExpressionStatement',
  11366. expression: {
  11367. type: 'CallExpression',
  11368. callee: {
  11369. type: 'Identifier',
  11370. name: 'func',
  11371. range: [0, 4],
  11372. loc: {
  11373. start: { line: 1, column: 0 },
  11374. end: { line: 1, column: 4 }
  11375. }
  11376. },
  11377. 'arguments': [{
  11378. type: 'SpreadElement',
  11379. argument: {
  11380. type: 'Identifier',
  11381. name: 'a',
  11382. range: [8, 9],
  11383. loc: {
  11384. start: { line: 1, column: 8 },
  11385. end: { line: 1, column: 9 }
  11386. }
  11387. },
  11388. range: [5, 9],
  11389. loc: {
  11390. start: { line: 1, column: 5 },
  11391. end: { line: 1, column: 9 }
  11392. }
  11393. }],
  11394. range: [0, 10],
  11395. loc: {
  11396. start: { line: 1, column: 0 },
  11397. end: { line: 1, column: 10 }
  11398. }
  11399. },
  11400. range: [0, 10],
  11401. loc: {
  11402. start: { line: 1, column: 0 },
  11403. end: { line: 1, column: 10 }
  11404. }
  11405. },
  11406. 'func(a, ...b)': {
  11407. type: 'ExpressionStatement',
  11408. expression: {
  11409. type: 'CallExpression',
  11410. callee: {
  11411. type: 'Identifier',
  11412. name: 'func',
  11413. range: [0, 4],
  11414. loc: {
  11415. start: { line: 1, column: 0 },
  11416. end: { line: 1, column: 4 }
  11417. }
  11418. },
  11419. 'arguments': [{
  11420. type: 'Identifier',
  11421. name: 'a',
  11422. range: [5, 6],
  11423. loc: {
  11424. start: { line: 1, column: 5 },
  11425. end: { line: 1, column: 6 }
  11426. }
  11427. }, {
  11428. type: 'SpreadElement',
  11429. argument: {
  11430. type: 'Identifier',
  11431. name: 'b',
  11432. range: [11, 12],
  11433. loc: {
  11434. start: { line: 1, column: 11 },
  11435. end: { line: 1, column: 12 }
  11436. }
  11437. },
  11438. range: [8, 12],
  11439. loc: {
  11440. start: { line: 1, column: 8 },
  11441. end: { line: 1, column: 12 }
  11442. }
  11443. }],
  11444. range: [0, 13],
  11445. loc: {
  11446. start: { line: 1, column: 0 },
  11447. end: { line: 1, column: 13 }
  11448. }
  11449. },
  11450. range: [0, 13],
  11451. loc: {
  11452. start: { line: 1, column: 0 },
  11453. end: { line: 1, column: 13 }
  11454. }
  11455. }
  11456. },
  11457. 'Harmony Invalid syntax': {
  11458. '0o': {
  11459. index: 2,
  11460. lineNumber: 1,
  11461. column: 3,
  11462. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11463. },
  11464. '0o1a': {
  11465. index: 3,
  11466. lineNumber: 1,
  11467. column: 4,
  11468. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11469. },
  11470. '0o9': {
  11471. index: 2,
  11472. lineNumber: 1,
  11473. column: 3,
  11474. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11475. },
  11476. '0o18': {
  11477. index: 3,
  11478. lineNumber: 1,
  11479. column: 4,
  11480. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11481. },
  11482. '0O': {
  11483. index: 2,
  11484. lineNumber: 1,
  11485. column: 3,
  11486. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11487. },
  11488. '0O1a': {
  11489. index: 3,
  11490. lineNumber: 1,
  11491. column: 4,
  11492. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11493. },
  11494. '0O9': {
  11495. index: 2,
  11496. lineNumber: 1,
  11497. column: 3,
  11498. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11499. },
  11500. '0O18': {
  11501. index: 3,
  11502. lineNumber: 1,
  11503. column: 4,
  11504. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11505. },
  11506. '0b': {
  11507. index: 2,
  11508. lineNumber: 1,
  11509. column: 3,
  11510. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11511. },
  11512. '0b1a': {
  11513. index: 3,
  11514. lineNumber: 1,
  11515. column: 4,
  11516. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11517. },
  11518. '0b9': {
  11519. index: 2,
  11520. lineNumber: 1,
  11521. column: 3,
  11522. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11523. },
  11524. '0b18': {
  11525. index: 3,
  11526. lineNumber: 1,
  11527. column: 4,
  11528. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11529. },
  11530. '0b12': {
  11531. index: 3,
  11532. lineNumber: 1,
  11533. column: 4,
  11534. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11535. },
  11536. '0B': {
  11537. index: 2,
  11538. lineNumber: 1,
  11539. column: 3,
  11540. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11541. },
  11542. '0B1a': {
  11543. index: 3,
  11544. lineNumber: 1,
  11545. column: 4,
  11546. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11547. },
  11548. '0B9': {
  11549. index: 2,
  11550. lineNumber: 1,
  11551. column: 3,
  11552. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11553. },
  11554. '0B18': {
  11555. index: 3,
  11556. lineNumber: 1,
  11557. column: 4,
  11558. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11559. },
  11560. '0B12': {
  11561. index: 3,
  11562. lineNumber: 1,
  11563. column: 4,
  11564. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11565. },
  11566. '"\\u{110000}"': {
  11567. index: 11,
  11568. lineNumber: 1,
  11569. column: 12,
  11570. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11571. },
  11572. '"\\u{}"': {
  11573. index: 4,
  11574. lineNumber: 1,
  11575. column: 5,
  11576. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11577. },
  11578. '"\\u{FFFF"': {
  11579. index: 9,
  11580. lineNumber: 1,
  11581. column: 10,
  11582. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11583. },
  11584. '"\\u{FFZ}"': {
  11585. index: 7,
  11586. lineNumber: 1,
  11587. column: 8,
  11588. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11589. },
  11590. '[v] += ary': {
  11591. index: 3,
  11592. lineNumber: 1,
  11593. column: 4,
  11594. message: 'Error: Line 1: Invalid left-hand side in assignment'
  11595. },
  11596. '[2] = 42': {
  11597. index: 3,
  11598. lineNumber: 1,
  11599. column: 4,
  11600. message: 'Error: Line 1: Invalid left-hand side in assignment'
  11601. },
  11602. '({ obj:20 }) = 42': {
  11603. index: 12,
  11604. lineNumber: 1,
  11605. column: 13,
  11606. message: 'Error: Line 1: Invalid left-hand side in assignment'
  11607. },
  11608. '( { get x() {} } ) = 0': {
  11609. index: 18,
  11610. lineNumber: 1,
  11611. column: 19,
  11612. message: 'Error: Line 1: Invalid left-hand side in assignment'
  11613. },
  11614. 'x \n is y': {
  11615. index: 7,
  11616. lineNumber: 2,
  11617. column: 5,
  11618. message: 'Error: Line 2: Unexpected identifier'
  11619. },
  11620. 'x \n isnt y': {
  11621. index: 9,
  11622. lineNumber: 2,
  11623. column: 7,
  11624. message: 'Error: Line 2: Unexpected identifier'
  11625. },
  11626. 'function default() {}': {
  11627. index: 9,
  11628. lineNumber: 1,
  11629. column: 10,
  11630. message: 'Error: Line 1: Unexpected token default'
  11631. },
  11632. 'function hello() {\'use strict\'; ({ i: 10, s(eval) { } }); }': {
  11633. index: 44,
  11634. lineNumber: 1,
  11635. column: 45,
  11636. message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode'
  11637. },
  11638. 'function a() { "use strict"; ({ b(t, t) { } }); }': {
  11639. index: 37,
  11640. lineNumber: 1,
  11641. column: 38,
  11642. message: 'Error: Line 1: Strict mode function may not have duplicate parameter names'
  11643. },
  11644. 'var super': {
  11645. index: 4,
  11646. lineNumber: 1,
  11647. column: 5,
  11648. message: 'Error: Line 1: Unexpected reserved word'
  11649. },
  11650. 'var default': {
  11651. index: 4,
  11652. lineNumber: 1,
  11653. column: 5,
  11654. message: 'Error: Line 1: Unexpected token default'
  11655. },
  11656. 'let default': {
  11657. index: 4,
  11658. lineNumber: 1,
  11659. column: 5,
  11660. message: 'Error: Line 1: Unexpected token default'
  11661. },
  11662. 'const default': {
  11663. index: 6,
  11664. lineNumber: 1,
  11665. column: 7,
  11666. message: 'Error: Line 1: Unexpected token default'
  11667. },
  11668. '({ v: eval }) = obj': {
  11669. index: 13,
  11670. lineNumber: 1,
  11671. column: 14,
  11672. message: 'Error: Line 1: Invalid left-hand side in assignment'
  11673. },
  11674. '({ v: arguments }) = obj': {
  11675. index: 18,
  11676. lineNumber: 1,
  11677. column: 19,
  11678. message: 'Error: Line 1: Invalid left-hand side in assignment'
  11679. },
  11680. 'for (var i = function() { return 10 in [] } in list) process(x);': {
  11681. index: 44,
  11682. lineNumber: 1,
  11683. column: 45,
  11684. message: 'Error: Line 1: Unexpected token in'
  11685. },
  11686. 'for (let x = 42 in list) process(x);': {
  11687. index: 16,
  11688. lineNumber: 1,
  11689. column: 17,
  11690. message: 'Error: Line 1: Unexpected token in'
  11691. },
  11692. 'for (let x = 42 of list) process(x);': {
  11693. index: 16,
  11694. lineNumber: 1,
  11695. column: 17,
  11696. message: 'Error: Line 1: Unexpected identifier'
  11697. },
  11698. 'module\n"crypto" {}': {
  11699. index: 6,
  11700. lineNumber: 1,
  11701. column: 7,
  11702. message: 'Error: Line 1: Illegal newline after module'
  11703. },
  11704. 'module foo from bar': {
  11705. index: 19,
  11706. lineNumber: 1,
  11707. column: 20,
  11708. message: 'Error: Line 1: Invalid module specifier'
  11709. },
  11710. 'module 42': {
  11711. index: 7,
  11712. lineNumber: 1,
  11713. column: 8,
  11714. message: 'Error: Line 1: Unexpected number'
  11715. },
  11716. 'module foo bar': {
  11717. index: 11,
  11718. lineNumber: 1,
  11719. column: 12,
  11720. message: 'Error: Line 1: Unexpected identifier'
  11721. },
  11722. 'module "crypto" { module "e" {} }': {
  11723. index: 17,
  11724. lineNumber: 1,
  11725. column: 18,
  11726. message: 'Error: Line 1: Module declaration can not be nested'
  11727. },
  11728. 'module "x" { export * from foo }': {
  11729. index: 30,
  11730. lineNumber: 1,
  11731. column: 31,
  11732. message: 'Error: Line 1: Invalid module specifier'
  11733. },
  11734. 'import foo': {
  11735. index: 10,
  11736. lineNumber: 1,
  11737. column: 11,
  11738. message: 'Error: Line 1: Missing from after import'
  11739. },
  11740. 'import { foo, bar }': {
  11741. index: 19,
  11742. lineNumber: 1,
  11743. column: 20,
  11744. message: 'Error: Line 1: Missing from after import'
  11745. },
  11746. 'import foo from bar': {
  11747. index: 19,
  11748. lineNumber: 1,
  11749. column: 20,
  11750. message: 'Error: Line 1: Invalid module specifier'
  11751. },
  11752. '((a)) => 42': {
  11753. index: 6,
  11754. lineNumber: 1,
  11755. column: 7,
  11756. message: 'Error: Line 1: Unexpected token =>'
  11757. },
  11758. '(a, (b)) => 42': {
  11759. index: 9,
  11760. lineNumber: 1,
  11761. column: 10,
  11762. message: 'Error: Line 1: Unexpected token =>'
  11763. },
  11764. '"use strict"; (eval = 10) => 42': {
  11765. index: 15,
  11766. lineNumber: 1,
  11767. column: 16,
  11768. message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode'
  11769. },
  11770. // strict mode, using eval when IsSimpleParameterList is true
  11771. '"use strict"; eval => 42': {
  11772. index: 24,
  11773. lineNumber: 1,
  11774. column: 25,
  11775. message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode'
  11776. },
  11777. // strict mode, using arguments when IsSimpleParameterList is true
  11778. '"use strict"; arguments => 42': {
  11779. index: 29,
  11780. lineNumber: 1,
  11781. column: 30,
  11782. message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode'
  11783. },
  11784. // strict mode, using eval when IsSimpleParameterList is true
  11785. '"use strict"; (eval, a) => 42': {
  11786. index: 29,
  11787. lineNumber: 1,
  11788. column: 30,
  11789. message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode'
  11790. },
  11791. // strict mode, using arguments when IsSimpleParameterList is true
  11792. '"use strict"; (arguments, a) => 42': {
  11793. index: 34,
  11794. lineNumber: 1,
  11795. column: 35,
  11796. message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode'
  11797. },
  11798. // strict mode, using eval when IsSimpleParameterList is false
  11799. '"use strict"; (eval, a = 10) => 42': {
  11800. index: 34,
  11801. lineNumber: 1,
  11802. column: 35,
  11803. message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode'
  11804. },
  11805. '(a, a) => 42': {
  11806. index: 6,
  11807. lineNumber: 1,
  11808. column: 7,
  11809. message: 'Error: Line 1: Strict mode function may not have duplicate parameter names'
  11810. },
  11811. '"use strict"; (a, a) => 42': {
  11812. index: 20,
  11813. lineNumber: 1,
  11814. column: 21,
  11815. message: 'Error: Line 1: Strict mode function may not have duplicate parameter names'
  11816. },
  11817. '"use strict"; (a) => 00': {
  11818. index: 21,
  11819. lineNumber: 1,
  11820. column: 22,
  11821. message: 'Error: Line 1: Octal literals are not allowed in strict mode.'
  11822. },
  11823. '() <= 42': {
  11824. index: 3,
  11825. lineNumber: 1,
  11826. column: 4,
  11827. message: 'Error: Line 1: Unexpected token <='
  11828. },
  11829. '(10) => 00': {
  11830. index: 5,
  11831. lineNumber: 1,
  11832. column: 6,
  11833. message: 'Error: Line 1: Unexpected token =>'
  11834. },
  11835. '(10, 20) => 00': {
  11836. index: 9,
  11837. lineNumber: 1,
  11838. column: 10,
  11839. message: 'Error: Line 1: Unexpected token =>'
  11840. },
  11841. 'yield v': {
  11842. index: 5,
  11843. lineNumber: 1,
  11844. column: 6,
  11845. message: 'Error: Line 1: Illegal yield expression'
  11846. },
  11847. 'yield 10': {
  11848. index: 5,
  11849. lineNumber: 1,
  11850. column: 6,
  11851. message: 'Error: Line 1: Illegal yield expression'
  11852. },
  11853. 'yield* 10': {
  11854. index: 5,
  11855. lineNumber: 1,
  11856. column: 6,
  11857. message: 'Error: Line 1: Illegal yield expression'
  11858. },
  11859. 'e => yield* 10': {
  11860. index: 10,
  11861. lineNumber: 1,
  11862. column: 11,
  11863. message: 'Error: Line 1: Illegal yield expression'
  11864. },
  11865. '(function () { yield 10 })': {
  11866. index: 20,
  11867. lineNumber: 1,
  11868. column: 21,
  11869. message: 'Error: Line 1: Illegal yield expression'
  11870. },
  11871. '(function () { yield* 10 })': {
  11872. index: 20,
  11873. lineNumber: 1,
  11874. column: 21,
  11875. message: 'Error: Line 1: Illegal yield expression'
  11876. },
  11877. '(function* () { })': {
  11878. index: 17,
  11879. lineNumber: 1,
  11880. column: 18,
  11881. message: 'Error: Line 1: Missing yield in generator'
  11882. },
  11883. 'function* test () { }': {
  11884. index: 21,
  11885. lineNumber: 1,
  11886. column: 22,
  11887. message: 'Error: Line 1: Missing yield in generator'
  11888. },
  11889. 'var obj = { *test() { } }': {
  11890. index: 23,
  11891. lineNumber: 1,
  11892. column: 24,
  11893. message: 'Error: Line 1: Missing yield in generator'
  11894. },
  11895. 'var obj = { *test** }': {
  11896. index: 17,
  11897. lineNumber: 1,
  11898. column: 18,
  11899. message: 'Error: Line 1: Unexpected token *'
  11900. },
  11901. 'class A extends yield B { }': {
  11902. index: 21,
  11903. lineNumber: 1,
  11904. column: 22,
  11905. message: 'Error: Line 1: Illegal yield expression'
  11906. },
  11907. 'class default': {
  11908. index: 6,
  11909. lineNumber: 1,
  11910. column: 7,
  11911. message: 'Error: Line 1: Unexpected token default'
  11912. },
  11913. '`test': {
  11914. index: 5,
  11915. lineNumber: 1,
  11916. column: 6,
  11917. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11918. },
  11919. 'switch `test`': {
  11920. index: 7,
  11921. lineNumber: 1,
  11922. column: 8,
  11923. message: 'Error: Line 1: Unexpected quasi test'
  11924. },
  11925. '`hello ${10 `test`': {
  11926. index: 18,
  11927. lineNumber: 1,
  11928. column: 19,
  11929. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11930. },
  11931. '`hello ${10;test`': {
  11932. index: 11,
  11933. lineNumber: 1,
  11934. column: 12,
  11935. message: 'Error: Line 1: Unexpected token ILLEGAL'
  11936. },
  11937. 'function a() 1 // expression closure is not supported': {
  11938. index: 13,
  11939. lineNumber: 1,
  11940. column: 14,
  11941. message: 'Error: Line 1: Unexpected number'
  11942. },
  11943. '[a,b if (a)] // (a,b)': {
  11944. index: 4,
  11945. lineNumber: 1,
  11946. column: 5,
  11947. message: 'Error: Line 1: Comprehension Error'
  11948. },
  11949. 'for each (let x in {}) {};': {
  11950. index: 3,
  11951. lineNumber: 1,
  11952. column: 4,
  11953. message: 'Error: Line 1: Each is not supported'
  11954. },
  11955. '[x for (let x in [])]': {
  11956. index: 20,
  11957. lineNumber: 1,
  11958. column: 21,
  11959. message: 'Error: Line 1: Comprehension Error'
  11960. },
  11961. '[x for (const x in [])]': {
  11962. index: 22,
  11963. lineNumber: 1,
  11964. column: 23,
  11965. message: 'Error: Line 1: Comprehension Error'
  11966. },
  11967. '[x for (var x in [])]': {
  11968. index: 20,
  11969. lineNumber: 1,
  11970. column: 21,
  11971. message: 'Error: Line 1: Comprehension Error'
  11972. },
  11973. '[a,b for (a in [])] // (a,b) ': {
  11974. index: 4,
  11975. lineNumber: 1,
  11976. column: 5,
  11977. message: 'Error: Line 1: Comprehension Error'
  11978. },
  11979. '[x if (x)] // block required': {
  11980. index: 10,
  11981. lineNumber: 1,
  11982. column: 11,
  11983. message: 'Error: Line 1: Comprehension must have at least one block'
  11984. },
  11985. 'var a = [x if (x)]': {
  11986. index: 18,
  11987. lineNumber: 1,
  11988. column: 19,
  11989. message: 'Error: Line 1: Comprehension must have at least one block'
  11990. },
  11991. '[for (x in [])] // no espression': {
  11992. index: 15,
  11993. lineNumber: 1,
  11994. column: 16,
  11995. message: 'Error: Line 1: Comprehension Error'
  11996. },
  11997. '({ "chance" }) = obj': {
  11998. index: 12,
  11999. lineNumber: 1,
  12000. column: 13,
  12001. message: 'Error: Line 1: Unexpected token }'
  12002. },
  12003. '({ 42 }) = obj': {
  12004. index: 6,
  12005. lineNumber: 1,
  12006. column: 7,
  12007. message: 'Error: Line 1: Unexpected token }'
  12008. },
  12009. 'function f(a, ...b, c)': {
  12010. index: 18,
  12011. lineNumber: 1,
  12012. column: 19,
  12013. message: 'Error: Line 1: Rest parameter must be final parameter of an argument list'
  12014. },
  12015. 'function f(a, ...b = 0)': {
  12016. index: 19,
  12017. lineNumber: 1,
  12018. column: 20,
  12019. message: 'Error: Line 1: Rest parameter can not have a default value'
  12020. },
  12021. 'function x(...{ a }){}': {
  12022. index: 14,
  12023. lineNumber: 1,
  12024. column: 15,
  12025. message: 'Error: Line 1: Invalid rest parameter'
  12026. },
  12027. '"use strict"; function x(a, { a }){}': {
  12028. index: 36,
  12029. lineNumber: 1,
  12030. column: 37,
  12031. message: 'Error: Line 1: Strict mode function may not have duplicate parameter names'
  12032. },
  12033. '"use strict"; function x({ b: { a } }, [{ b: { a } }]){}': {
  12034. index: 56,
  12035. lineNumber: 1,
  12036. column: 57,
  12037. message: 'Error: Line 1: Strict mode function may not have duplicate parameter names'
  12038. },
  12039. '"use strict"; function x(a, ...[a]){}': {
  12040. index: 37,
  12041. lineNumber: 1,
  12042. column: 38,
  12043. message: 'Error: Line 1: Strict mode function may not have duplicate parameter names'
  12044. },
  12045. '(...a, b) => {}': {
  12046. index: 5,
  12047. lineNumber: 1,
  12048. column: 6,
  12049. message: 'Error: Line 1: Rest parameter must be final parameter of an argument list'
  12050. },
  12051. '([ 5 ]) => {}': {
  12052. index: 7,
  12053. lineNumber: 1,
  12054. column: 8,
  12055. message: 'Error: Line 1: Invalid left-hand side in formals list'
  12056. },
  12057. '({ 5 }) => {}': {
  12058. index: 5,
  12059. lineNumber: 1,
  12060. column: 6,
  12061. message: 'Error: Line 1: Unexpected token }'
  12062. },
  12063. '(...[ 5 ]) => {}': {
  12064. index: 9,
  12065. lineNumber: 1,
  12066. column: 10,
  12067. message: 'Error: Line 1: Invalid left-hand side in formals list'
  12068. },
  12069. '[...{ a }] = b': {
  12070. index: 10,
  12071. lineNumber: 1,
  12072. column: 11,
  12073. message: 'Error: Line 1: Invalid spread argument'
  12074. },
  12075. '[...a, b] = c': {
  12076. index: 5,
  12077. lineNumber: 1,
  12078. column: 6,
  12079. message: 'Error: Line 1: Spread must be the final element of an element list'
  12080. },
  12081. 'func(...a, b)': {
  12082. index: 9,
  12083. lineNumber: 1,
  12084. column: 10,
  12085. message: 'Error: Line 1: Spread must be the final element of an element list'
  12086. },
  12087. '({ t(eval) { "use strict"; } });': {
  12088. index: 5,
  12089. lineNumber: 1,
  12090. column: 6,
  12091. message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode'
  12092. },
  12093. '"use strict"; `${test}\\02`;': {
  12094. index: 21,
  12095. lineNumber: 1,
  12096. column: 22,
  12097. message: 'Error: Line 1: Octal literals are not allowed in strict mode.'
  12098. },
  12099. '[...a, ] = b': {
  12100. index: 5,
  12101. lineNumber: 1,
  12102. column: 6,
  12103. message: 'Error: Line 1: Spread must be the final element of an element list'
  12104. },
  12105. 'if (b,...a, );': {
  12106. index: 10,
  12107. lineNumber: 1,
  12108. column: 11,
  12109. message: 'Error: Line 1: Spread must be the final element of an element list'
  12110. },
  12111. '(b, ...a)': {
  12112. index: 8,
  12113. lineNumber: 1,
  12114. column: 9,
  12115. message: 'Error: Line 1: Illegal spread element'
  12116. },
  12117. 'module "Universe" { ; ; ': {
  12118. index: 26,
  12119. lineNumber: 1,
  12120. column: 27,
  12121. message: 'Error: Line 1: Unexpected end of input'
  12122. },
  12123. 'switch (cond) { case 10: let a = 20; ': {
  12124. index: 37,
  12125. lineNumber: 1,
  12126. column: 38,
  12127. message: 'Error: Line 1: Unexpected end of input'
  12128. },
  12129. '"use strict"; (eval) => 42': {
  12130. index: 26,
  12131. lineNumber: 1,
  12132. column: 27,
  12133. message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode'
  12134. },
  12135. '(eval) => { "use strict"; 42 }': {
  12136. index: 30,
  12137. lineNumber: 1,
  12138. column: 31,
  12139. message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode'
  12140. },
  12141. '({ get test() { } }) => 42': {
  12142. index: 20,
  12143. lineNumber: 1,
  12144. column: 21,
  12145. message: 'Error: Line 1: Invalid left-hand side in formals list'
  12146. }
  12147. }
  12148. };
  12149. // Merge both test fixtures.
  12150. (function () {
  12151. 'use strict';
  12152. var i, fixtures;
  12153. for (i in harmonyTestFixture) {
  12154. if (harmonyTestFixture.hasOwnProperty(i)) {
  12155. fixtures = harmonyTestFixture[i];
  12156. if (i !== 'Syntax' && testFixture.hasOwnProperty(i)) {
  12157. throw new Error('Harmony test should not replace existing test for ' + i);
  12158. }
  12159. testFixture[i] = fixtures;
  12160. }
  12161. }
  12162. }());