From 3a89ee84efb3e9724daebe7c696bd5e6ff9f794f Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 5 Oct 2015 16:40:43 +0100 Subject: [PATCH] update babylon tests --- .../block-trailing-comment/expected.json | 18 +- .../comment-within-condition/expected.json | 30 +- .../expected.json | 32 +- .../surrounding-call-comments/expected.json | 30 +- .../expected.json | 30 +- .../surrounding-return-comments/expected.json | 30 +- .../surrounding-throw-comments/expected.json | 36 +- .../expected.json | 39 +- .../expected.json | 48 +-- .../switch-fallthrough-comment/expected.json | 45 +-- .../expected.json | 34 +- .../expected.json | 45 +-- .../switch-no-default-comment/expected.json | 23 +- .../regex-after-block/expected.json | 14 +- .../core/uncategorised/10/expected.json | 11 +- .../core/uncategorised/100/expected.json | 17 +- .../core/uncategorised/101/expected.json | 17 +- .../core/uncategorised/102/expected.json | 7 +- .../core/uncategorised/103/expected.json | 7 +- .../core/uncategorised/104/expected.json | 7 +- .../core/uncategorised/105/expected.json | 7 +- .../core/uncategorised/106/expected.json | 7 +- .../core/uncategorised/107/expected.json | 7 +- .../core/uncategorised/108/expected.json | 7 +- .../core/uncategorised/11/expected.json | 11 +- .../core/uncategorised/116/expected.json | 7 +- .../core/uncategorised/118/expected.json | 7 +- .../core/uncategorised/12/expected.json | 27 +- .../core/uncategorised/124/expected.json | 11 +- .../core/uncategorised/125/expected.json | 11 +- .../core/uncategorised/126/expected.json | 35 +- .../core/uncategorised/127/expected.json | 11 +- .../core/uncategorised/13/expected.json | 27 +- .../core/uncategorised/197/expected.json | 19 +- .../core/uncategorised/198/expected.json | 19 +- .../core/uncategorised/199/expected.json | 11 +- .../core/uncategorised/200/expected.json | 11 +- .../core/uncategorised/201/expected.json | 11 +- .../core/uncategorised/202/expected.json | 11 +- .../core/uncategorised/203/expected.json | 11 +- .../core/uncategorised/204/expected.json | 11 +- .../core/uncategorised/205/expected.json | 11 +- .../core/uncategorised/206/expected.json | 11 +- .../core/uncategorised/207/expected.json | 11 +- .../core/uncategorised/208/expected.json | 11 +- .../core/uncategorised/209/expected.json | 11 +- .../core/uncategorised/210/expected.json | 11 +- .../core/uncategorised/211/expected.json | 11 +- .../core/uncategorised/212/expected.json | 11 +- .../core/uncategorised/218/expected.json | 11 +- .../core/uncategorised/219/expected.json | 19 +- .../core/uncategorised/22/expected.json | 11 +- .../core/uncategorised/220/expected.json | 27 +- .../core/uncategorised/229/expected.json | 10 +- .../core/uncategorised/23/expected.json | 11 +- .../core/uncategorised/230/expected.json | 11 +- .../core/uncategorised/232/expected.json | 7 +- .../core/uncategorised/233/expected.json | 7 +- .../core/uncategorised/234/expected.json | 14 +- .../core/uncategorised/235/expected.json | 17 +- .../core/uncategorised/236/expected.json | 7 +- .../core/uncategorised/237/expected.json | 14 +- .../core/uncategorised/24/expected.json | 11 +- .../core/uncategorised/240/expected.json | 11 +- .../core/uncategorised/241/expected.json | 11 +- .../core/uncategorised/242/expected.json | 19 +- .../core/uncategorised/243/expected.json | 19 +- .../core/uncategorised/244/expected.json | 19 +- .../core/uncategorised/245/expected.json | 19 +- .../core/uncategorised/25/expected.json | 11 +- .../core/uncategorised/250/expected.json | 10 +- .../core/uncategorised/251/expected.json | 10 +- .../core/uncategorised/252/expected.json | 10 +- .../core/uncategorised/253/expected.json | 10 +- .../core/uncategorised/254/expected.json | 10 +- .../core/uncategorised/255/expected.json | 10 +- .../core/uncategorised/256/expected.json | 10 +- .../core/uncategorised/259/expected.json | 10 +- .../core/uncategorised/26/expected.json | 11 +- .../core/uncategorised/260/expected.json | 10 +- .../core/uncategorised/261/expected.json | 10 +- .../core/uncategorised/262/expected.json | 10 +- .../core/uncategorised/269/expected.json | 11 +- .../core/uncategorised/27/expected.json | 19 +- .../core/uncategorised/270/expected.json | 11 +- .../core/uncategorised/272/expected.json | 7 +- .../core/uncategorised/275/expected.json | 11 +- .../core/uncategorised/28/expected.json | 19 +- .../core/uncategorised/288/expected.json | 10 +- .../core/uncategorised/289/expected.json | 21 +- .../core/uncategorised/299/expected.json | 10 +- .../core/uncategorised/3/expected.json | 11 +- .../core/uncategorised/302/expected.json | 29 +- .../core/uncategorised/303/expected.json | 22 +- .../core/uncategorised/304/expected.json | 10 +- .../core/uncategorised/305/expected.json | 28 +- .../core/uncategorised/306/expected.json | 28 +- .../core/uncategorised/307/expected.json | 10 +- .../core/uncategorised/308/expected.json | 28 +- .../core/uncategorised/309/expected.json | 28 +- .../core/uncategorised/310/expected.json | 10 +- .../core/uncategorised/311/expected.json | 42 +- .../core/uncategorised/312/expected.json | 42 +- .../core/uncategorised/314/expected.json | 38 +- .../core/uncategorised/315/expected.json | 38 +- .../core/uncategorised/317/expected.json | 7 +- .../core/uncategorised/318/expected.json | 34 +- .../core/uncategorised/319/expected.json | 19 +- .../core/uncategorised/320/expected.json | 19 +- .../core/uncategorised/322/expected.json | 17 +- .../core/uncategorised/323/expected.json | 19 +- .../core/uncategorised/324/expected.json | 15 +- .../core/uncategorised/341/expected.json | 10 +- .../core/uncategorised/342/expected.json | 35 +- .../core/uncategorised/343/expected.json | 23 +- .../core/uncategorised/344/expected.json | 70 ++-- .../core/uncategorised/35/expected.json | 14 +- .../core/uncategorised/36/expected.json | 14 +- .../core/uncategorised/4/expected.json | 7 +- .../core/uncategorised/42/expected.json | 14 +- .../core/uncategorised/43/expected.json | 14 +- .../core/uncategorised/44/expected.json | 11 +- .../core/uncategorised/45/expected.json | 11 +- .../core/uncategorised/46/expected.json | 21 +- .../core/uncategorised/466/expected.json | 186 +++++++++ .../core/uncategorised/467/expected.json | 184 +++++++++ .../core/uncategorised/468/expected.json | 186 +++++++++ .../core/uncategorised/469/expected.json | 186 +++++++++ .../core/uncategorised/47/expected.json | 33 +- .../core/uncategorised/470/expected.json | 201 ++++++++++ .../core/uncategorised/471/expected.json | 201 ++++++++++ .../core/uncategorised/472/expected.json | 184 +++++++++ .../core/uncategorised/473/expected.json | 184 +++++++++ .../core/uncategorised/474/expected.json | 167 ++++++++ .../core/uncategorised/475/expected.json | 167 ++++++++ .../core/uncategorised/476/expected.json | 167 ++++++++ .../core/uncategorised/477/expected.json | 167 ++++++++ .../core/uncategorised/478/expected.json | 167 ++++++++ .../core/uncategorised/479/expected.json | 167 ++++++++ .../core/uncategorised/48/expected.json | 33 +- .../core/uncategorised/480/expected.json | 167 ++++++++ .../core/uncategorised/481/expected.json | 167 ++++++++ .../core/uncategorised/482/expected.json | 170 ++++++++ .../core/uncategorised/483/expected.json | 170 ++++++++ .../core/uncategorised/486/expected.json | 204 ++++++++++ .../core/uncategorised/487/expected.json | 204 ++++++++++ .../core/uncategorised/49/expected.json | 21 +- .../core/uncategorised/490/expected.json | 240 +++++++++++ .../core/uncategorised/492/expected.json | 295 ++++++++++++++ .../core/uncategorised/493/expected.json | 242 +++++++++++ .../core/uncategorised/494/expected.json | 257 ++++++++++++ .../uncategorised/497}/expected.json | 184 ++++----- .../core/uncategorised/498/expected.json | 187 +++++++++ .../core/uncategorised/499/expected.json | 150 +++++++ .../core/uncategorised/5/expected.json | 7 +- .../core/uncategorised/50/expected.json | 21 +- .../core/uncategorised/500/expected.json | 152 +++++++ .../core/uncategorised/501/expected.json | 209 ++++++++++ .../core/uncategorised/502/expected.json | 209 ++++++++++ .../core/uncategorised/503/expected.json | 203 ++++++++++ .../core/uncategorised/504/expected.json | 169 ++++++++ .../core/uncategorised/505/expected.json | 169 ++++++++ .../core/uncategorised/506/expected.json | 169 ++++++++ .../core/uncategorised/507/expected.json | 169 ++++++++ .../core/uncategorised/508/expected.json | 169 ++++++++ .../core/uncategorised/509/expected.json | 169 ++++++++ .../core/uncategorised/51/expected.json | 21 +- .../core/uncategorised/510/expected.json | 169 ++++++++ .../core/uncategorised/513/expected.json | 118 ++++++ .../core/uncategorised/514/expected.json | 151 +++++++ .../core/uncategorised/517/expected.json | 218 ++++++++++ .../core/uncategorised/518/expected.json | 169 ++++++++ .../core/uncategorised/519/expected.json | 221 ++++++++++ .../core/uncategorised/52/expected.json | 21 +- .../core/uncategorised/522/expected.json | 270 +++++++++++++ .../core/uncategorised/527/expected.json | 11 +- .../core/uncategorised/528/expected.json | 19 +- .../core/uncategorised/529/expected.json | 27 +- .../core/uncategorised/53/expected.json | 21 +- .../core/uncategorised/530/expected.json | 11 +- .../core/uncategorised/531/expected.json | 19 +- .../core/uncategorised/533/expected.json | 11 +- .../core/uncategorised/534/expected.json | 19 +- .../core/uncategorised/535/expected.json | 27 +- .../core/uncategorised/537/expected.json | 11 +- .../core/uncategorised/538/expected.json | 29 +- .../core/uncategorised/54/expected.json | 21 +- .../core/uncategorised/540/expected.json | 18 +- .../core/uncategorised/541/expected.json | 10 +- .../core/uncategorised/55/expected.json | 21 +- .../core/uncategorised/56/expected.json | 21 +- .../core/uncategorised/57/expected.json | 27 +- .../core/uncategorised/58/expected.json | 27 +- .../core/uncategorised/59/expected.json | 21 +- .../core/uncategorised/6/expected.json | 31 +- .../core/uncategorised/60/expected.json | 27 +- .../core/uncategorised/61/expected.json | 27 +- .../core/uncategorised/62/expected.json | 21 +- .../core/uncategorised/63/expected.json | 33 +- .../core/uncategorised/64/expected.json | 32 +- .../core/uncategorised/65/expected.json | 23 +- .../core/uncategorised/66/expected.json | 11 +- .../core/uncategorised/67/expected.json | 11 +- .../core/uncategorised/68/expected.json | 11 +- .../core/uncategorised/69/expected.json | 11 +- .../core/uncategorised/70/expected.json | 11 +- .../core/uncategorised/71/expected.json | 11 +- .../core/uncategorised/72/expected.json | 11 +- .../core/uncategorised/73/expected.json | 11 +- .../core/uncategorised/74/expected.json | 11 +- .../core/uncategorised/75/expected.json | 11 +- .../core/uncategorised/76/expected.json | 11 +- .../core/uncategorised/77/expected.json | 11 +- .../core/uncategorised/78/expected.json | 11 +- .../core/uncategorised/79/expected.json | 11 +- .../core/uncategorised/80/expected.json | 11 +- .../core/uncategorised/81/expected.json | 11 +- .../core/uncategorised/82/expected.json | 11 +- .../core/uncategorised/83/expected.json | 11 +- .../core/uncategorised/84/expected.json | 11 +- .../core/uncategorised/85/expected.json | 15 +- .../core/uncategorised/86/expected.json | 17 +- .../core/uncategorised/87/expected.json | 17 +- .../core/uncategorised/88/expected.json | 17 +- .../core/uncategorised/89/expected.json | 17 +- .../core/uncategorised/9/expected.json | 11 +- .../core/uncategorised/90/expected.json | 17 +- .../core/uncategorised/91/expected.json | 17 +- .../core/uncategorised/92/expected.json | 17 +- .../core/uncategorised/93/expected.json | 17 +- .../core/uncategorised/94/expected.json | 17 +- .../core/uncategorised/95/expected.json | 17 +- .../core/uncategorised/96/expected.json | 17 +- .../core/uncategorised/97/expected.json | 17 +- .../core/uncategorised/98/expected.json | 17 +- .../core/uncategorised/99/expected.json | 17 +- .../migrated_0002/expected.json | 15 +- .../migrated_0003/expected.json | 22 +- .../migrated_0004/expected.json | 10 +- .../migrated_0005/expected.json | 28 +- .../migrated_0006/expected.json | 28 +- .../migrated_0007/expected.json | 10 +- .../migrated_0008/expected.json | 28 +- .../migrated_0009/expected.json | 28 +- .../migrated_0010/expected.json | 10 +- .../migrated_0011/expected.json | 28 +- .../migrated_0012/expected.json | 28 +- .../migrated_0014/expected.json | 24 +- .../migrated_0015/expected.json | 24 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 14 +- .../migrated_0002/expected.json | 30 +- .../dupe-param/expected.json | 151 +++++++ .../empty-param/expected.json | 18 +- .../migrated_0004/expected.json | 10 +- .../migrated_0005/expected.json | 21 +- .../migrated_0012/expected.json | 10 +- .../migrated_0014/expected.json | 22 +- .../migrated_0002/expected.json | 14 +- .../migrated_0003/expected.json | 30 +- .../migrated_0000/expected.json | 77 ++-- .../migrated_0001/expected.json | 77 ++-- .../array-binding-pattern-01/expected.json | 11 +- .../array-binding-pattern-02/expected.json | 11 +- .../array-binding-pattern-03/expected.json | 11 +- .../array-binding-pattern-empty/expected.json | 11 +- .../elision/expected.json | 11 +- .../dupe-param-1/expected.json | 168 ++++++++ .../dupe-param-2/expected.json | 183 +++++++++ .../dupe-param-3/expected.json | 235 +++++++++++ .../elision/expected.json | 11 +- .../empty-pattern-var/expected.json | 11 +- .../es2015-array-pattern/hole/expected.json | 11 +- .../nested-pattern/expected.json | 11 +- .../patterned-catch/expected.json | 25 +- .../es2015-array-pattern/rest/expected.json | 11 +- .../tailing-hold/expected.json | 11 +- .../with-default-catch-param/expected.json | 17 +- .../with-default-fn/expected.json | 14 +- .../with-object-pattern/expected.json | 11 +- .../expected.json | 11 +- .../arrow-with-only-rest/expected.json | 11 +- .../options.json | 2 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0003/expected.json | 11 +- .../migrated_0004/expected.json | 14 +- .../migrated_0005/expected.json | 15 +- .../migrated_0006/expected.json | 14 +- .../migrated_0007/expected.json | 14 +- .../migrated_0008/expected.json | 11 +- .../migrated_0009/expected.json | 11 +- .../migrated_0010/expected.json | 11 +- .../migrated_0011/expected.json | 11 +- .../migrated_0012/expected.json | 11 +- .../migrated_0013/expected.json | 19 +- .../migrated_0014/expected.json | 19 +- .../migrated_0015/expected.json | 7 +- .../migrated_0016/expected.json | 11 +- .../migrated_0017/expected.json | 11 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0003/expected.json | 11 +- .../migrated_0004/expected.json | 11 +- .../migrated_0005/expected.json | 11 +- .../es2015-class/migrated_0001/expected.json | 11 +- .../es2015-class/migrated_0016/expected.json | 11 +- .../es2015-class/migrated_0019/expected.json | 25 +- .../es2015-class/migrated_0021/expected.json | 14 +- .../es2015-class/migrated_0022/expected.json | 7 +- .../es2015-class/migrated_0023/expected.json | 7 +- .../es2015-class/migrated_0024/expected.json | 15 +- .../es2015-class/migrated_0025/expected.json | 15 +- .../migrated_0000/expected.json | 14 +- .../migrated_0001/expected.json | 14 +- .../migrated_0002/expected.json | 14 +- .../dup-assignment/expected.json | 11 +- .../elision/expected.json | 11 +- .../member-expr-in-rest/expected.json | 19 +- .../nested-assignment/expected.json | 27 +- .../nested-cover-grammar/expected.json | 11 +- .../simple-assignment/expected.json | 11 +- .../expected.json | 15 +- .../nested-cover-grammar/expected.json | 19 +- .../object-pattern-assignment/expected.json | 15 +- .../export-const-number/expected.json | 11 +- .../export-default-class/expected.json | 5 +- .../export-default-expression/expected.json | 23 +- .../export-default-function/expected.json | 8 +- .../export-default-number/expected.json | 11 +- .../export-default-object/expected.json | 11 +- .../export-from-batch/expected.json | 11 +- .../export-from-default/expected.json | 11 +- .../expected.json | 11 +- .../expected.json | 11 +- .../expected.json | 11 +- .../export-from-specifier/expected.json | 11 +- .../export-from-specifiers/expected.json | 11 +- .../export-function-declaration/expected.json | 10 +- .../export-let-number/expected.json | 11 +- .../export-var-number/expected.json | 11 +- .../expected.json | 14 +- .../expected.json | 14 +- .../expected.json | 10 +- .../expected.json | 10 +- .../expected.json | 10 +- .../expected.json | 18 +- .../generator-expression/expected.json | 10 +- .../expected.json | 10 +- .../expected.json | 18 +- .../expected.json | 18 +- .../expected.json | 18 +- .../generator-method-with-yield/expected.json | 10 +- .../generator-method/expected.json | 10 +- .../module_await/expected.json | 11 +- .../valid_await/expected.json | 7 +- .../expected.json | 11 +- .../expected.json | 11 +- .../import-default-as/expected.json | 11 +- .../import-default/expected.json | 11 +- .../import-jquery/expected.json | 11 +- .../import-module/expected.json | 11 +- .../import-named-as-specifier/expected.json | 11 +- .../import-named-as-specifiers/expected.json | 11 +- .../import-named-empty/expected.json | 11 +- .../import-named-specifier/expected.json | 11 +- .../expected.json | 11 +- .../import-named-specifiers/expected.json | 11 +- .../import-namespace-specifier/expected.json | 11 +- .../import-null-as-nil/expected.json | 11 +- .../migrated_0000/expected.json | 19 +- .../migrated_0002/expected.json | 14 +- .../options.json | 4 +- .../options.json | 4 +- .../options.json | 4 +- .../options.json | 4 +- .../invalid-proto-shorthands/options.json | 4 +- .../expected.json | 13 +- .../proto-identifier-getter/expected.json | 10 +- .../proto-identifier-method/expected.json | 10 +- .../proto-identifier-setter/expected.json | 10 +- .../proto-literal-getter-setter/expected.json | 21 +- .../proto-literal-getter/expected.json | 18 +- .../proto-literal-method/expected.json | 18 +- .../proto-literal-setter/expected.json | 18 +- .../elision/expected.json | 11 +- .../empty-for-lex/expected.json | 11 +- .../empty-lexical/expected.json | 11 +- .../empty-var/expected.json | 11 +- .../nested/expected.json | 11 +- .../properties/expected.json | 27 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 81 ++-- .../migrated_0003/expected.json | 11 +- .../migrated_0004/expected.json | 11 +- .../migrated_0005/expected.json | 11 +- .../migrated_0006/expected.json | 81 ++-- .../call-spread-number/expected.json | 11 +- .../new-spread-number/expected.json | 11 +- .../super_computed/expected.json | 14 +- .../escape-sequences/expected.json | 11 +- .../line-terminators/expected.json | 11 +- .../literal-escape-sequences/expected.json | 11 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../expected.json | 150 +++++++ .../expected.json | 136 +++++++ .../expected.json | 184 +++++++++ .../expected.json | 149 +++++++ .../expected.json | 135 +++++++ .../expected.json | 134 +++++++ .../expected.json | 150 +++++++ .../expected.json | 117 ++++++ .../yield-array-pattern/expected.json | 7 +- .../yield-arrow-parameter-name/expected.json | 11 +- .../expected.json | 10 +- .../yield-function-expression/expected.json | 10 +- .../yield-generator-method/expected.json | 10 +- .../yield-lexical-declaration/expected.json | 11 +- .../es2015-yield/yield-method/expected.json | 10 +- .../expected.json | 70 ++-- .../yield-strict-method/expected.json | 77 ++-- .../migrated_0002/expected.json | 19 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0003/expected.json | 11 +- .../migrated_0004/expected.json | 11 +- .../migrated_0005/expected.json | 11 +- .../migrated_0006/expected.json | 11 +- .../migrated_0007/expected.json | 11 +- .../migrated_0008/expected.json | 11 +- .../migrated_0009/expected.json | 11 +- .../migrated_0010/expected.json | 11 +- .../migrated_0011/expected.json | 11 +- .../migrated_0012/expected.json | 11 +- .../migrated_0013/expected.json | 11 +- .../migrated_0000/expected.json | 19 +- .../migrated_0001/expected.json | 19 +- .../migrated_0002/expected.json | 29 +- .../migrated_0000/expected.json | 31 +- .../migrated_0001/expected.json | 29 +- .../migrated_0007/expected.json | 7 +- .../migrated_0009/expected.json | 7 +- .../migrated_0015/expected.json | 11 +- .../migrated_0016/expected.json | 11 +- .../migrated_0017/expected.json | 35 +- .../migrated_0018/expected.json | 11 +- .../migrated_0087}/expected.json | 196 +++++---- .../migrated_0088/expected.json | 136 +++++++ .../migrated_0089/expected.json | 136 +++++++ .../migrated_0090/expected.json | 152 +++++++ .../migrated_0091/expected.json | 152 +++++++ .../migrated_0094/expected.json | 136 +++++++ .../migrated_0100/expected.json | 136 +++++++ .../migrated_0183/expected.json | 186 +++++++++ .../migrated_0184/expected.json | 184 +++++++++ .../migrated_0185/expected.json | 186 +++++++++ .../migrated_0186/expected.json | 186 +++++++++ .../migrated_0187/expected.json | 201 ++++++++++ .../migrated_0188/expected.json | 201 ++++++++++ .../migrated_0189/expected.json | 184 +++++++++ .../migrated_0190/expected.json | 184 +++++++++ .../migrated_0191/expected.json | 167 ++++++++ .../migrated_0192/expected.json | 167 ++++++++ .../migrated_0193/expected.json | 167 ++++++++ .../migrated_0194/expected.json | 167 ++++++++ .../migrated_0195/expected.json | 167 ++++++++ .../migrated_0196/expected.json | 167 ++++++++ .../migrated_0197/expected.json | 167 ++++++++ .../migrated_0198/expected.json | 167 ++++++++ .../migrated_0199/expected.json | 170 ++++++++ .../migrated_0200/expected.json | 170 ++++++++ .../migrated_0203/expected.json | 204 ++++++++++ .../migrated_0204/expected.json | 204 ++++++++++ .../migrated_0207/expected.json | 240 +++++++++++ .../migrated_0209/expected.json | 295 ++++++++++++++ .../migrated_0210/expected.json | 242 +++++++++++ .../migrated_0211/expected.json | 257 ++++++++++++ .../migrated_0214/expected.json | 187 +++++++++ .../migrated_0215/expected.json | 187 +++++++++ .../invalid-syntax/migrated_0216/options.json | 4 +- .../migrated_0217/expected.json | 150 +++++++ .../migrated_0218/expected.json | 152 +++++++ .../migrated_0219/expected.json | 209 ++++++++++ .../migrated_0220/expected.json | 209 ++++++++++ .../invalid-syntax/migrated_0221/options.json | 4 +- .../invalid-syntax/migrated_0222/options.json | 4 +- .../migrated_0223/expected.json | 203 ++++++++++ .../migrated_0224/expected.json | 169 ++++++++ .../migrated_0225/expected.json | 169 ++++++++ .../migrated_0226/expected.json | 169 ++++++++ .../migrated_0227/expected.json | 169 ++++++++ .../migrated_0228/expected.json | 169 ++++++++ .../migrated_0229/expected.json | 169 ++++++++ .../migrated_0230/expected.json | 169 ++++++++ .../migrated_0231/expected.json | 169 ++++++++ .../migrated_0239/expected.json | 118 ++++++ .../migrated_0240/expected.json | 151 +++++++ .../migrated_0243/expected.json | 218 ++++++++++ .../migrated_0244/expected.json | 169 ++++++++ .../migrated_0245/expected.json | 221 ++++++++++ .../migrated_0249/expected.json | 151 +++++++ .../invalid-syntax/migrated_0270/options.json | 4 +- .../invalid-syntax/migrated_0271/options.json | 4 +- .../invalid-syntax/migrated_0278/options.json | 4 +- .../migrated_0000/expected.json | 10 +- .../migrated_0001/expected.json | 10 +- .../migrated_0002/expected.json | 10 +- .../migrated_0003/expected.json | 10 +- .../migrated_0000/expected.json | 10 +- .../migrated_0001/expected.json | 10 +- .../migrated_0002/expected.json | 10 +- .../migrated_0003/expected.json | 10 +- .../migrated_0004/expected.json | 10 +- .../migrated_0002/expected.json | 11 +- .../migrated_0003/expected.json | 11 +- .../migrated_0004/expected.json | 11 +- .../migrated_0005/expected.json | 11 +- .../statement-if/migrated_0001/expected.json | 10 +- .../statement-if/migrated_0002/expected.json | 11 +- .../statement-if/migrated_0005/expected.json | 7 +- .../statement-if/migrated_0006/expected.json | 7 +- .../migrated_0000/expected.json | 7 +- .../migrated_0001/expected.json | 7 +- .../migrated_0002/expected.json | 14 +- .../migrated_0003/expected.json | 17 +- .../migrated_0004/expected.json | 7 +- .../migrated_0005/expected.json | 7 +- .../migrated_0006/expected.json | 7 +- .../migrated_0007/expected.json | 14 +- .../migrated_0010/expected.json | 11 +- .../migrated_0011/expected.json | 11 +- .../migrated_0012/expected.json | 11 +- .../migrated_0013/expected.json | 19 +- .../migrated_0014/expected.json | 19 +- .../migrated_0015/expected.json | 19 +- .../migrated_0016/expected.json | 19 +- .../migrated_0019/actual.js | 1 - .../migrated_0022/actual.js | 1 - .../migrated_0022/expected.json | 241 ----------- .../migrated_0023/actual.js | 1 - .../migrated_0023/expected.json | 278 ------------- .../migrated_0025/expected.json | 11 +- .../migrated_0001/expected.json | 7 +- .../migrated_0000/expected.json | 10 +- .../migrated_0001/expected.json | 10 +- .../migrated_0002/expected.json | 10 +- .../migrated_0003/expected.json | 10 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0003/expected.json | 19 +- .../migrated_0004/expected.json | 27 +- .../experimental/async-functions/options.json | 4 +- .../async-functions/pattern/expected.json | 11 +- .../uncategorised/10/expected.json | 5 +- .../uncategorised/10/options.json | 4 +- .../uncategorised/11/expected.json | 12 +- .../uncategorised/11/options.json | 4 +- .../uncategorised/12/options.json | 4 +- .../uncategorised/13/options.json | 4 +- .../uncategorised/14/expected.json | 7 +- .../uncategorised/14/options.json | 4 +- .../uncategorised/15/options.json | 4 +- .../uncategorised/16/options.json | 4 +- .../uncategorised/17/expected.json | 7 +- .../uncategorised/17/options.json | 4 +- .../uncategorised/18/options.json | 4 +- .../uncategorised/19/expected.json | 13 +- .../uncategorised/19/options.json | 4 +- .../uncategorised/20/options.json | 4 +- .../uncategorised/21/expected.json | 14 +- .../uncategorised/21/options.json | 4 +- .../uncategorised/22/options.json | 4 +- .../uncategorised/23/options.json | 4 +- .../uncategorised/24/options.json | 4 +- .../uncategorised/25/options.json | 4 +- .../uncategorised/26/expected.json | 19 +- .../uncategorised/26/options.json | 4 +- .../uncategorised/27/options.json | 4 +- .../uncategorised/28/expected.json | 19 +- .../uncategorised/28/options.json | 4 +- .../uncategorised/29/expected.json | 7 +- .../uncategorised/29/options.json | 4 +- .../uncategorised/3/expected.json | 11 +- .../experimental/uncategorised/3/options.json | 4 +- .../uncategorised/30/expected.json | 11 +- .../uncategorised/30/options.json | 4 +- .../uncategorised/31/expected.json | 6 +- .../uncategorised/31/options.json | 4 +- .../uncategorised/32/options.json | 4 +- .../uncategorised/33/options.json | 4 +- .../uncategorised/34/options.json | 4 +- .../uncategorised/35/options.json | 4 +- .../uncategorised/36/options.json | 4 +- .../uncategorised/37/options.json | 4 +- .../uncategorised/38/options.json | 4 +- .../uncategorised/39/expected.json | 11 +- .../uncategorised/39/options.json | 4 +- .../uncategorised/4/expected.json | 19 +- .../experimental/uncategorised/4/options.json | 4 +- .../uncategorised/40/options.json | 4 +- .../uncategorised/41/options.json | 4 +- .../uncategorised/42/options.json | 4 +- .../uncategorised/43/expected.json | 11 +- .../uncategorised/43/options.json | 4 +- .../uncategorised/44/options.json | 4 +- .../uncategorised/45/options.json | 4 +- .../uncategorised/46/expected.json | 11 +- .../uncategorised/46/options.json | 4 +- .../uncategorised/47/expected.json | 11 +- .../uncategorised/47/options.json | 8 +- .../uncategorised/48/expected.json | 11 +- .../uncategorised/48/options.json | 8 +- .../uncategorised/49/expected.json | 11 +- .../uncategorised/49/options.json | 4 +- .../uncategorised/5/expected.json | 31 +- .../experimental/uncategorised/5/options.json | 4 +- .../uncategorised/50/expected.json | 11 +- .../uncategorised/50/options.json | 4 +- .../uncategorised/51/expected.json | 11 +- .../uncategorised/51/options.json | 4 +- .../uncategorised/52/expected.json | 11 +- .../uncategorised/52/options.json | 4 +- .../uncategorised/53/expected.json | 11 +- .../uncategorised/53/options.json | 4 +- .../uncategorised/54/expected.json | 11 +- .../uncategorised/54/options.json | 4 +- .../uncategorised/55/expected.json | 19 +- .../uncategorised/55/options.json | 4 +- .../uncategorised/56/options.json | 4 +- .../uncategorised/57/options.json | 4 +- .../uncategorised/58/expected.json | 11 +- .../uncategorised/58/options.json | 4 +- .../uncategorised/59/options.json | 4 +- .../uncategorised/6/expected.json | 27 +- .../experimental/uncategorised/6/options.json | 4 +- .../uncategorised/60/options.json | 4 +- .../uncategorised/61/options.json | 4 +- .../uncategorised/62/options.json | 4 +- .../uncategorised/7/expected.json | 31 +- .../experimental/uncategorised/7/options.json | 4 +- .../uncategorised/8/expected.json | 27 +- .../experimental/uncategorised/8/options.json | 4 +- .../uncategorised/9/expected.json | 5 +- .../experimental/uncategorised/9/options.json | 4 +- .../flow/bounded-polymorphism/2/expected.json | 10 +- .../flow/declare-module/2/expected.json | 11 +- .../literal-types/number-binary/expected.json | 12 +- .../literal-types/number-float/expected.json | 12 +- .../number-integer/expected.json | 12 +- .../number-octal-2/expected.json | 12 +- .../literal-types/number-octal/expected.json | 12 +- .../literal-types/string-double/expected.json | 16 +- .../literal-types/string-single/expected.json | 16 +- .../babylon/test/fixtures/flow/options.json | 3 +- .../flow/regression/issue-2083/expected.json | 35 +- .../test/fixtures/flow/tuples/3/expected.json | 11 +- .../test/fixtures/flow/tuples/4/expected.json | 19 +- .../flow/type-annotations/1/expected.json | 10 +- .../flow/type-annotations/10/expected.json | 10 +- .../flow/type-annotations/11/expected.json | 10 +- .../flow/type-annotations/12/expected.json | 10 +- .../flow/type-annotations/13/expected.json | 10 +- .../flow/type-annotations/14/expected.json | 10 +- .../flow/type-annotations/15/expected.json | 10 +- .../flow/type-annotations/16/expected.json | 10 +- .../flow/type-annotations/17/expected.json | 10 +- .../flow/type-annotations/18/expected.json | 10 +- .../flow/type-annotations/19/expected.json | 10 +- .../flow/type-annotations/2/expected.json | 10 +- .../flow/type-annotations/20/expected.json | 10 +- .../flow/type-annotations/21/expected.json | 10 +- .../flow/type-annotations/22/expected.json | 10 +- .../flow/type-annotations/23/expected.json | 10 +- .../flow/type-annotations/24/expected.json | 10 +- .../flow/type-annotations/26/expected.json | 15 +- .../flow/type-annotations/27/expected.json | 10 +- .../flow/type-annotations/28/expected.json | 10 +- .../flow/type-annotations/29/expected.json | 10 +- .../flow/type-annotations/3/expected.json | 10 +- .../flow/type-annotations/4/expected.json | 10 +- .../flow/type-annotations/44/expected.json | 27 +- .../flow/type-annotations/5/expected.json | 10 +- .../flow/type-annotations/50/expected.json | 15 +- .../flow/type-annotations/51/expected.json | 15 +- .../flow/type-annotations/52/expected.json | 10 +- .../flow/type-annotations/55/expected.json | 11 +- .../flow/type-annotations/56/expected.json | 10 +- .../flow/type-annotations/6/expected.json | 10 +- .../flow/type-annotations/60/expected.json | 11 +- .../flow/type-annotations/61/expected.json | 11 +- .../flow/type-annotations/62/expected.json | 11 +- .../flow/type-annotations/63/expected.json | 10 +- .../flow/type-annotations/64/expected.json | 10 +- .../flow/type-annotations/65/expected.json | 10 +- .../flow/type-annotations/66/expected.json | 14 +- .../flow/type-annotations/67/expected.json | 7 +- .../flow/type-annotations/68/expected.json | 11 +- .../flow/type-annotations/7/expected.json | 10 +- .../flow/type-annotations/72/expected.json | 11 +- .../flow/type-annotations/73/expected.json | 15 +- .../flow/type-annotations/74/expected.json | 19 +- .../flow/type-annotations/78/expected.json | 10 +- .../flow/type-annotations/79/expected.json | 14 +- .../flow/type-annotations/8/expected.json | 10 +- .../flow/type-annotations/80/expected.json | 11 +- .../flow/type-annotations/89/expected.json | 11 +- .../flow/type-annotations/9/expected.json | 10 +- .../flow/type-annotations/90/expected.json | 11 +- .../flow/type-annotations/91/expected.json | 11 +- .../flow/type-annotations/92/expected.json | 11 +- .../flow/type-annotations/93/expected.json | 11 +- .../flow/type-annotations/94/expected.json | 11 +- .../flow/type-annotations/95/expected.json | 11 +- .../flow/type-annotations/96/expected.json | 11 +- .../flow/type-annotations/97/expected.json | 11 +- .../type-exports/specifier-from/expected.json | 11 +- .../fixtures/flow/typecasts/1/expected.json | 10 +- .../fixtures/flow/typecasts/2/expected.json | 23 +- .../fixtures/flow/typecasts/3/expected.json | 16 +- .../fixtures/flow/typecasts/4/expected.json | 18 +- .../call-expression/expected.json | 11 +- .../expected.json | 12 +- .../expected.json | 10 +- .../harmony/uncategorised/1/expected.json | 17 +- .../harmony/uncategorised/10/expected.json | 11 +- .../harmony/uncategorised/100/expected.json | 13 +- .../harmony/uncategorised/101/expected.json | 13 +- .../harmony/uncategorised/106/expected.json | 18 +- .../harmony/uncategorised/109/options.json | 3 + .../harmony/uncategorised/11/expected.json | 11 +- .../harmony/uncategorised/12/expected.json | 11 +- .../harmony/uncategorised/123/expected.json | 77 ++-- .../harmony/uncategorised/124/expected.json | 14 +- .../harmony/uncategorised/13/expected.json | 11 +- .../harmony/uncategorised/130/expected.json | 77 ++-- .../harmony/uncategorised/14/expected.json | 11 +- .../harmony/uncategorised/141/expected.json | 15 +- .../harmony/uncategorised/142/expected.json | 31 +- .../harmony/uncategorised/143/expected.json | 13 +- .../harmony/uncategorised/144/expected.json | 23 +- .../harmony/uncategorised/145/expected.json | 16 +- .../harmony/uncategorised/146/expected.json | 13 +- .../harmony/uncategorised/15/expected.json | 11 +- .../harmony/uncategorised/152/expected.json | 14 +- .../harmony/uncategorised/153/expected.json | 14 +- .../harmony/uncategorised/154/expected.json | 14 +- .../harmony/uncategorised/155/expected.json | 18 +- .../harmony/uncategorised/156/expected.json | 18 +- .../harmony/uncategorised/157/expected.json | 18 +- .../harmony/uncategorised/158/expected.json | 18 +- .../harmony/uncategorised/159/expected.json | 14 +- .../harmony/uncategorised/16/expected.json | 11 +- .../harmony/uncategorised/160/expected.json | 14 +- .../harmony/uncategorised/161/expected.json | 14 +- .../harmony/uncategorised/162/expected.json | 14 +- .../harmony/uncategorised/167/options.json | 3 + .../harmony/uncategorised/168/options.json | 3 + .../harmony/uncategorised/169/expected.json | 13 +- .../harmony/uncategorised/17/expected.json | 11 +- .../harmony/uncategorised/170/expected.json | 13 +- .../harmony/uncategorised/171/options.json | 3 + .../harmony/uncategorised/172/options.json | 3 + .../harmony/uncategorised/173/expected.json | 13 +- .../harmony/uncategorised/174/options.json | 3 + .../harmony/uncategorised/175/options.json | 3 + .../harmony/uncategorised/180/options.json | 3 + .../harmony/uncategorised/181/options.json | 3 + .../harmony/uncategorised/195/expected.json | 7 +- .../harmony/uncategorised/196/expected.json | 7 +- .../harmony/uncategorised/197/expected.json | 10 +- .../harmony/uncategorised/2/expected.json | 17 +- .../harmony/uncategorised/227/expected.json | 295 ++++++++++++++ .../harmony/uncategorised/228/expected.json | 258 ++++++++++++ .../harmony/uncategorised/242/expected.json | 169 ++++++++ .../harmony/uncategorised/243/expected.json | 136 +++++++ .../harmony/uncategorised/244/expected.json | 136 +++++++ .../harmony/uncategorised/245/expected.json | 152 +++++++ .../harmony/uncategorised/246/expected.json | 152 +++++++ .../harmony/uncategorised/247/expected.json | 185 +++++++++ .../harmony/uncategorised/249/expected.json | 136 +++++++ .../harmony/uncategorised/256/expected.json | 11 +- .../harmony/uncategorised/257/expected.json | 11 +- .../harmony/uncategorised/259/expected.json | 18 +- .../harmony/uncategorised/26/expected.json | 22 +- .../harmony/uncategorised/269/actual.js | 1 - .../harmony/uncategorised/269/options.json | 6 - .../harmony/uncategorised/27/expected.json | 19 +- .../harmony/uncategorised/270/actual.js | 1 - .../harmony/uncategorised/270/options.json | 6 - .../harmony/uncategorised/271/actual.js | 1 - .../harmony/uncategorised/271/options.json | 6 - .../harmony/uncategorised/272/actual.js | 1 - .../harmony/uncategorised/272/options.json | 6 - .../harmony/uncategorised/274/actual.js | 1 - .../harmony/uncategorised/274/options.json | 6 - .../harmony/uncategorised/28/expected.json | 11 +- .../harmony/uncategorised/280/expected.json | 203 ++++++++++ .../harmony/uncategorised/281/expected.json | 376 ++++++++++++++++++ .../harmony/uncategorised/282/actual.js | 1 - .../harmony/uncategorised/282/options.json | 3 - .../harmony/uncategorised/286/options.json | 4 +- .../harmony/uncategorised/29/expected.json | 11 +- .../harmony/uncategorised/296/expected.json | 136 +++++++ .../harmony/uncategorised/3/expected.json | 11 +- .../harmony/uncategorised/30/expected.json | 11 +- .../harmony/uncategorised/300/expected.json | 14 +- .../harmony/uncategorised/301/expected.json | 11 +- .../harmony/uncategorised/307/expected.json | 15 +- .../harmony/uncategorised/308/expected.json | 11 +- .../harmony/uncategorised/309/expected.json | 11 +- .../harmony/uncategorised/31/expected.json | 11 +- .../harmony/uncategorised/310/expected.json | 11 +- .../harmony/uncategorised/317/expected.json | 23 +- .../harmony/uncategorised/318/expected.json | 11 +- .../harmony/uncategorised/319/expected.json | 11 +- .../harmony/uncategorised/32/expected.json | 14 +- .../harmony/uncategorised/320/expected.json | 11 +- .../harmony/uncategorised/322/expected.json | 11 +- .../harmony/uncategorised/33/expected.json | 15 +- .../harmony/uncategorised/332/expected.json | 162 ++++++++ .../harmony/uncategorised/333/expected.json | 216 ++++++++++ .../harmony/uncategorised/338/expected.json | 10 +- .../harmony/uncategorised/34/expected.json | 14 +- .../harmony/uncategorised/35/expected.json | 14 +- .../harmony/uncategorised/353/options.json | 3 + .../harmony/uncategorised/36/expected.json | 11 +- .../harmony/uncategorised/39/expected.json | 11 +- .../harmony/uncategorised/4/expected.json | 11 +- .../harmony/uncategorised/40/expected.json | 11 +- .../harmony/uncategorised/41/expected.json | 11 +- .../harmony/uncategorised/42/expected.json | 11 +- .../harmony/uncategorised/43/expected.json | 11 +- .../harmony/uncategorised/44/expected.json | 19 +- .../harmony/uncategorised/45/expected.json | 19 +- .../harmony/uncategorised/46/expected.json | 10 +- .../harmony/uncategorised/47/expected.json | 11 +- .../harmony/uncategorised/48/expected.json | 14 +- .../harmony/uncategorised/5/expected.json | 81 ++-- .../harmony/uncategorised/54/expected.json | 14 +- .../harmony/uncategorised/57/actual.js | 1 - .../harmony/uncategorised/57/options.json | 5 - .../harmony/uncategorised/58/actual.js | 1 - .../harmony/uncategorised/58/expected.json | 225 ----------- .../harmony/uncategorised/58/options.json | 5 - .../harmony/uncategorised/59/actual.js | 1 - .../harmony/uncategorised/59/expected.json | 225 ----------- .../harmony/uncategorised/59/options.json | 5 - .../harmony/uncategorised/6/expected.json | 11 +- .../harmony/uncategorised/60/actual.js | 1 - .../harmony/uncategorised/60/expected.json | 363 ----------------- .../harmony/uncategorised/60/options.json | 5 - .../harmony/uncategorised/7/expected.json | 11 +- .../harmony/uncategorised/79/expected.json | 11 +- .../harmony/uncategorised/8/expected.json | 11 +- .../harmony/uncategorised/80/expected.json | 11 +- .../harmony/uncategorised/82/expected.json | 8 +- .../harmony/uncategorised/85/expected.json | 11 +- .../harmony/uncategorised/9/expected.json | 81 ++-- .../harmony/uncategorised/90/expected.json | 11 +- .../harmony/uncategorised/91/expected.json | 11 +- .../harmony/uncategorised/92/expected.json | 11 +- .../harmony/uncategorised/93/expected.json | 11 +- .../harmony/uncategorised/94/expected.json | 11 +- .../harmony/uncategorised/95/expected.json | 11 +- .../harmony/uncategorised/97/expected.json | 11 +- .../harmony/uncategorised/98/expected.json | 11 +- .../harmony/uncategorised/99/expected.json | 13 +- .../test/fixtures/jsx/basic/10/expected.json | 21 +- .../test/fixtures/jsx/basic/11/expected.json | 8 +- .../test/fixtures/jsx/basic/12/expected.json | 8 +- .../test/fixtures/jsx/basic/13/expected.json | 12 +- .../test/fixtures/jsx/basic/16/expected.json | 10 +- .../test/fixtures/jsx/basic/18/expected.json | 8 +- .../test/fixtures/jsx/basic/19/expected.json | 13 +- .../test/fixtures/jsx/basic/3/expected.json | 18 +- .../test/fixtures/jsx/basic/4/expected.json | 26 +- .../test/fixtures/jsx/basic/7/expected.json | 13 +- .../babylon/test/fixtures/jsx/options.json | 2 +- .../fixtures/jsx/regression/1/expected.json | 23 +- .../fixtures/jsx/regression/4/expected.json | 8 +- .../fixtures/jsx/regression/6/expected.json | 8 +- .../fixtures/jsx/regression/7/expected.json | 8 +- .../jsx/regression/issue-2083/expected.json | 11 +- .../jsx/regression/issue-2114/expected.json | 8 +- 892 files changed, 28000 insertions(+), 5962 deletions(-) create mode 100644 packages/babylon/test/fixtures/core/uncategorised/466/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/467/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/468/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/469/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/470/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/471/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/472/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/473/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/474/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/475/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/476/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/477/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/478/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/479/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/480/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/481/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/482/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/483/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/486/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/487/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/490/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/492/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/493/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/494/expected.json rename packages/babylon/test/fixtures/{esprima/statement-iteration/migrated_0019 => core/uncategorised/497}/expected.json (50%) create mode 100644 packages/babylon/test/fixtures/core/uncategorised/498/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/499/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/500/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/501/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/502/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/503/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/504/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/505/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/506/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/507/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/508/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/509/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/510/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/513/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/514/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/517/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/518/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/519/expected.json create mode 100644 packages/babylon/test/fixtures/core/uncategorised/522/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/declaration-function/dupe-param/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/expected.json rename packages/babylon/test/fixtures/{harmony/uncategorised/57 => esprima/invalid-syntax/migrated_0087}/expected.json (50%) create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0088/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0089/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0090/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0091/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0094/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0100/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0183/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0184/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0185/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0186/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0187/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0188/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0189/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0190/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0191/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0192/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0193/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0194/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0195/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0196/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0197/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0198/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0199/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0200/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0203/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0204/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0207/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0209/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0210/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0211/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0214/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0215/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0217/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0218/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0219/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0220/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0223/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0224/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0225/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0226/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0227/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0228/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0229/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0230/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0231/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0239/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0240/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0243/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0244/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0245/expected.json create mode 100644 packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0249/expected.json delete mode 100644 packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0019/actual.js delete mode 100644 packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0022/actual.js delete mode 100644 packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0022/expected.json delete mode 100644 packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0023/actual.js delete mode 100644 packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0023/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/109/options.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/167/options.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/168/options.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/171/options.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/172/options.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/174/options.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/175/options.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/180/options.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/181/options.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/227/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/228/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/242/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/243/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/244/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/245/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/246/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/247/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/249/expected.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/269/actual.js delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/269/options.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/270/actual.js delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/270/options.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/271/actual.js delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/271/options.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/272/actual.js delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/272/options.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/274/actual.js delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/274/options.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/280/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/281/expected.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/282/actual.js delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/282/options.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/296/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/332/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/333/expected.json create mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/353/options.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/57/actual.js delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/57/options.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/58/actual.js delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/58/expected.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/58/options.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/59/actual.js delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/59/expected.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/59/options.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/60/actual.js delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/60/expected.json delete mode 100644 packages/babylon/test/fixtures/harmony/uncategorised/60/options.json diff --git a/packages/babylon/test/fixtures/comments/basic/block-trailing-comment/expected.json b/packages/babylon/test/fixtures/comments/basic/block-trailing-comment/expected.json index e6e6b73fc4..f8f5e28599 100755 --- a/packages/babylon/test/fixtures/comments/basic/block-trailing-comment/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/block-trailing-comment/expected.json @@ -104,17 +104,15 @@ "line": 3, "column": 13 } - }, - "range": [ - 15, - 24 - ] + } } ] } - ] + ], + "directives": [] } - ] + ], + "directives": [] }, "comments": [ { @@ -131,11 +129,7 @@ "line": 3, "column": 13 } - }, - "range": [ - 15, - 24 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/comment-within-condition/expected.json b/packages/babylon/test/fixtures/comments/basic/comment-within-condition/expected.json index 3affb6e924..695fa34b10 100755 --- a/packages/babylon/test/fixtures/comments/basic/comment-within-condition/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/comment-within-condition/expected.json @@ -72,11 +72,7 @@ "line": 2, "column": 13 } - }, - "range": [ - 14, - 23 - ] + } } ] }, @@ -94,7 +90,8 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] }, "alternate": null, "leadingComments": [ @@ -112,15 +109,12 @@ "line": 1, "column": 9 } - }, - "range": [ - 0, - 9 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -137,11 +131,7 @@ "line": 1, "column": 9 } - }, - "range": [ - 0, - 9 - ] + } }, { "type": "CommentBlock", @@ -157,11 +147,7 @@ "line": 2, "column": 13 } - }, - "range": [ - 14, - 23 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/export-default-anonymous-class/expected.json b/packages/babylon/test/fixtures/comments/basic/export-default-anonymous-class/expected.json index fc2086aeee..3599105db1 100755 --- a/packages/babylon/test/fixtures/comments/basic/export-default-anonymous-class/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/export-default-anonymous-class/expected.json @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "ClassExpression", + "type": "ClassDeclaration", "start": 51, "end": 121, "loc": { @@ -139,7 +139,8 @@ "column": 5 } }, - "body": [] + "body": [], + "directives": [] } }, "leadingComments": [ @@ -157,11 +158,7 @@ "line": 7, "column": 7 } - }, - "range": [ - 63, - 98 - ] + } } ] } @@ -185,15 +182,12 @@ "line": 3, "column": 3 } - }, - "range": [ - 0, - 35 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -210,11 +204,7 @@ "line": 3, "column": 3 } - }, - "range": [ - 0, - 35 - ] + } }, { "type": "CommentBlock", @@ -230,11 +220,7 @@ "line": 7, "column": 7 } - }, - "range": [ - 63, - 98 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/surrounding-call-comments/expected.json b/packages/babylon/test/fixtures/comments/basic/surrounding-call-comments/expected.json index 2b2736473b..1b90fb89f0 100755 --- a/packages/babylon/test/fixtures/comments/basic/surrounding-call-comments/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/surrounding-call-comments/expected.json @@ -139,11 +139,7 @@ "line": 2, "column": 16 } - }, - "range": [ - 19, - 31 - ] + } } ], "trailingComments": [ @@ -161,18 +157,16 @@ "line": 4, "column": 15 } - }, - "range": [ - 47, - 58 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -189,11 +183,7 @@ "line": 2, "column": 16 } - }, - "range": [ - 19, - 31 - ] + } }, { "type": "CommentBlock", @@ -209,11 +199,7 @@ "line": 4, "column": 15 } - }, - "range": [ - 47, - 58 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/surrounding-debugger-comments/expected.json b/packages/babylon/test/fixtures/comments/basic/surrounding-debugger-comments/expected.json index 8eb698f9f3..76143585ee 100755 --- a/packages/babylon/test/fixtures/comments/basic/surrounding-debugger-comments/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/surrounding-debugger-comments/expected.json @@ -105,11 +105,7 @@ "line": 2, "column": 16 } - }, - "range": [ - 19, - 31 - ] + } } ], "trailingComments": [ @@ -127,18 +123,16 @@ "line": 4, "column": 15 } - }, - "range": [ - 50, - 61 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -155,11 +149,7 @@ "line": 2, "column": 16 } - }, - "range": [ - 19, - 31 - ] + } }, { "type": "CommentBlock", @@ -175,11 +165,7 @@ "line": 4, "column": 15 } - }, - "range": [ - 50, - 61 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/surrounding-return-comments/expected.json b/packages/babylon/test/fixtures/comments/basic/surrounding-return-comments/expected.json index 48dbc2e395..5ce003f2c5 100755 --- a/packages/babylon/test/fixtures/comments/basic/surrounding-return-comments/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/surrounding-return-comments/expected.json @@ -106,11 +106,7 @@ "line": 2, "column": 16 } - }, - "range": [ - 19, - 31 - ] + } } ], "trailingComments": [ @@ -128,18 +124,16 @@ "line": 4, "column": 15 } - }, - "range": [ - 48, - 59 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -156,11 +150,7 @@ "line": 2, "column": 16 } - }, - "range": [ - 19, - 31 - ] + } }, { "type": "CommentBlock", @@ -176,11 +166,7 @@ "line": 4, "column": 15 } - }, - "range": [ - 48, - 59 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/surrounding-throw-comments/expected.json b/packages/babylon/test/fixtures/comments/basic/surrounding-throw-comments/expected.json index 41527785fb..30e63041bc 100755 --- a/packages/babylon/test/fixtures/comments/basic/surrounding-throw-comments/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/surrounding-throw-comments/expected.json @@ -104,9 +104,11 @@ "column": 12 } }, + "extra": { + "rawValue": 55, + "raw": "55" + }, "value": 55, - "rawValue": 55, - "raw": "55", "leadingComments": null }, "leadingComments": [ @@ -124,11 +126,7 @@ "line": 2, "column": 16 } - }, - "range": [ - 19, - 31 - ] + } } ], "trailingComments": [ @@ -146,18 +144,16 @@ "line": 4, "column": 15 } - }, - "range": [ - 50, - 61 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -174,11 +170,7 @@ "line": 2, "column": 16 } - }, - "range": [ - 19, - 31 - ] + } }, { "type": "CommentBlock", @@ -194,11 +186,7 @@ "line": 4, "column": 15 } - }, - "range": [ - 50, - 61 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json b/packages/babylon/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json index 9d9f17495b..d2805cc6ab 100755 --- a/packages/babylon/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json @@ -105,8 +105,6 @@ } }, "value": true, - "rawValue": true, - "raw": "true", "leadingComments": null }, "body": { @@ -124,6 +122,7 @@ } }, "body": [], + "directives": [], "leadingComments": null, "trailingComments": null }, @@ -142,11 +141,7 @@ "line": 1, "column": 29 } - }, - "range": [ - 15, - 29 - ] + } } ], "trailingComments": [ @@ -164,11 +159,7 @@ "line": 1, "column": 56 } - }, - "range": [ - 47, - 56 - ] + } } ] }, @@ -238,18 +229,16 @@ "line": 1, "column": 56 } - }, - "range": [ - 47, - 56 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -266,11 +255,7 @@ "line": 1, "column": 29 } - }, - "range": [ - 15, - 29 - ] + } }, { "type": "CommentBlock", @@ -286,11 +271,7 @@ "line": 1, "column": 56 } - }, - "range": [ - 47, - 56 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json b/packages/babylon/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json index 1258711857..579ef06c90 100755 --- a/packages/babylon/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json @@ -153,9 +153,11 @@ "column": 14 } }, + "extra": { + "rawValue": 1, + "raw": "1" + }, "value": 1, - "rawValue": 1, - "raw": "1", "leadingComments": null }, "leadingComments": [ @@ -173,11 +175,7 @@ "line": 3, "column": 14 } - }, - "range": [ - 46, - 52 - ] + } } ], "trailingComments": [ @@ -195,11 +193,7 @@ "line": 5, "column": 28 } - }, - "range": [ - 81, - 97 - ] + } } ] }, @@ -280,9 +274,11 @@ "column": 14 } }, + "extra": { + "rawValue": 2, + "raw": "2" + }, "value": 2, - "rawValue": 2, - "raw": "2", "leadingComments": null }, "leadingComments": [ @@ -300,20 +296,18 @@ "line": 5, "column": 28 } - }, - "range": [ - 81, - 97 - ] + } } ] } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -330,11 +324,7 @@ "line": 3, "column": 14 } - }, - "range": [ - 46, - 52 - ] + } }, { "type": "CommentLine", @@ -350,11 +340,7 @@ "line": 5, "column": 28 } - }, - "range": [ - 81, - 97 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json b/packages/babylon/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json index 73e33512ba..444961e833 100755 --- a/packages/babylon/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json @@ -88,9 +88,11 @@ "column": 10 } }, + "extra": { + "rawValue": 1, + "raw": "1" + }, "value": 1, - "rawValue": 1, - "raw": "1", "leadingComments": null }, "leadingComments": [ @@ -108,11 +110,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 18, - 24 - ] + } } ], "trailingComments": [ @@ -130,11 +128,7 @@ "line": 4, "column": 24 } - }, - "range": [ - 45, - 61 - ] + } } ] }, @@ -215,9 +209,11 @@ "column": 10 } }, + "extra": { + "rawValue": 2, + "raw": "2" + }, "value": 2, - "rawValue": 2, - "raw": "2", "leadingComments": null }, "leadingComments": [ @@ -235,17 +231,14 @@ "line": 4, "column": 24 } - }, - "range": [ - 45, - 61 - ] + } } ] } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -262,11 +255,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 18, - 24 - ] + } }, { "type": "CommentLine", @@ -282,11 +271,7 @@ "line": 4, "column": 24 } - }, - "range": [ - 45, - 61 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json b/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json index 24a358f0e2..09580d701c 100755 --- a/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json @@ -170,9 +170,11 @@ "column": 14 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } }, { @@ -223,9 +225,11 @@ "column": 14 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "trailingComments": [ { @@ -242,20 +246,18 @@ "line": 7, "column": 20 } - }, - "range": [ - 113, - 125 - ] + } } ] } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -272,11 +274,7 @@ "line": 7, "column": 20 } - }, - "range": [ - 113, - 125 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json b/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json index c3f7926916..2b830fd901 100755 --- a/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json @@ -514,9 +514,11 @@ "column": 78 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } }, "computed": true @@ -540,9 +542,11 @@ "column": 37 } }, - "value": "SequenceExpression", - "rawValue": "SequenceExpression", - "raw": "\"SequenceExpression\"" + "extra": { + "rawValue": "SequenceExpression", + "raw": "\"SequenceExpression\"" + }, + "value": "SequenceExpression" }, "trailingComments": [ { @@ -559,11 +563,7 @@ "line": 7, "column": 25 } - }, - "range": [ - 232, - 245 - ] + } } ] } @@ -598,8 +598,6 @@ } }, "value": false, - "rawValue": false, - "raw": "false", "leadingComments": null }, "leadingComments": [ @@ -617,23 +615,22 @@ "line": 7, "column": 25 } - }, - "range": [ - 232, - 245 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } } } - ] + ], + "directives": [] }, "comments": [ { @@ -650,11 +647,7 @@ "line": 7, "column": 25 } - }, - "range": [ - 232, - 245 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment/expected.json b/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment/expected.json index 79727f2aa4..0a65969bf1 100755 --- a/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment/expected.json +++ b/packages/babylon/test/fixtures/comments/basic/switch-no-default-comment/expected.json @@ -107,9 +107,11 @@ "column": 10 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "trailingComments": [ { @@ -126,17 +128,14 @@ "line": 4, "column": 16 } - }, - "range": [ - 44, - 56 - ] + } } ] } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -153,11 +152,7 @@ "line": 4, "column": 16 } - }, - "range": [ - 44, - 56 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/categorized/regex-after-block/expected.json b/packages/babylon/test/fixtures/core/categorized/regex-after-block/expected.json index 9abc79800a..545b21ce2e 100644 --- a/packages/babylon/test/fixtures/core/categorized/regex-after-block/expected.json +++ b/packages/babylon/test/fixtures/core/categorized/regex-after-block/expected.json @@ -56,9 +56,7 @@ "column": 8 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "consequent": { "type": "BlockStatement", @@ -74,7 +72,8 @@ "column": 1 } }, - "body": [] + "body": [], + "directives": [] }, "alternate": null }, @@ -106,11 +105,14 @@ "column": 5 } }, - "raw": "/foo/", + "extra": { + "raw": "/foo/" + }, "pattern": "foo", "flags": "" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/10/expected.json b/packages/babylon/test/fixtures/core/uncategorised/10/expected.json index da404948f1..d10391f23b 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/10/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/10/expected.json @@ -102,14 +102,17 @@ "column": 8 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } ] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/100/expected.json b/packages/babylon/test/fixtures/core/uncategorised/100/expected.json index 4b7d0df83e..4b1cc3a85b 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/100/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/100/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 14, "loc": { @@ -42,8 +43,8 @@ "column": 6 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 14, "loc": { @@ -56,9 +57,11 @@ "column": 6 } }, - "value": "Helloworld", - "rawValue": "Helloworld", - "raw": "\"Hello\\\nworld\"" + "value": "Hello\\\nworld", + "extra": { + "raw": "\"Hello\\\nworld\"", + "rawValue": "Hello\\\nworld" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/101/expected.json b/packages/babylon/test/fixtures/core/uncategorised/101/expected.json index 5255b7b53d..aade1ae44b 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/101/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/101/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 14, "loc": { @@ -42,8 +43,8 @@ "column": 14 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 14, "loc": { @@ -56,9 +57,11 @@ "column": 14 } }, - "value": "Hello\u0001World", - "rawValue": "Hello\u0001World", - "raw": "\"Hello\\1World\"" + "value": "Hello\\1World", + "extra": { + "raw": "\"Hello\\1World\"", + "rawValue": "Hello\\1World" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/102/expected.json b/packages/babylon/test/fixtures/core/uncategorised/102/expected.json index 6146d006c2..46f8894ef5 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/102/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/102/expected.json @@ -87,7 +87,9 @@ "column": 16 } }, - "raw": "/[a-z]/i", + "extra": { + "raw": "/[a-z]/i" + }, "pattern": "[a-z]", "flags": "i" } @@ -95,6 +97,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/103/expected.json b/packages/babylon/test/fixtures/core/uncategorised/103/expected.json index e5403147fe..c44951e7c8 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/103/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/103/expected.json @@ -87,7 +87,9 @@ "column": 16 } }, - "raw": "/[x-z]/i", + "extra": { + "raw": "/[x-z]/i" + }, "pattern": "[x-z]", "flags": "i" } @@ -95,6 +97,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/104/expected.json b/packages/babylon/test/fixtures/core/uncategorised/104/expected.json index f998864e01..08a395e815 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/104/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/104/expected.json @@ -87,7 +87,9 @@ "column": 16 } }, - "raw": "/[a-c]/i", + "extra": { + "raw": "/[a-c]/i" + }, "pattern": "[a-c]", "flags": "i" } @@ -95,6 +97,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/105/expected.json b/packages/babylon/test/fixtures/core/uncategorised/105/expected.json index 4119341722..45afd2c5db 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/105/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/105/expected.json @@ -87,7 +87,9 @@ "column": 17 } }, - "raw": "/[P QR]/i", + "extra": { + "raw": "/[P QR]/i" + }, "pattern": "[P QR]", "flags": "i" } @@ -95,6 +97,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/106/expected.json b/packages/babylon/test/fixtures/core/uncategorised/106/expected.json index 323385e36b..80c40e93c1 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/106/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/106/expected.json @@ -87,7 +87,9 @@ "column": 18 } }, - "raw": "/foo\\/bar/", + "extra": { + "raw": "/foo\\/bar/" + }, "pattern": "foo\\/bar", "flags": "" } @@ -95,6 +97,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/107/expected.json b/packages/babylon/test/fixtures/core/uncategorised/107/expected.json index b973814034..c2c4cdcbb1 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/107/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/107/expected.json @@ -87,7 +87,9 @@ "column": 21 } }, - "raw": "/=([^=\\s])+/g", + "extra": { + "raw": "/=([^=\\s])+/g" + }, "pattern": "=([^=\\s])+", "flags": "g" } @@ -95,6 +97,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/108/expected.json b/packages/babylon/test/fixtures/core/uncategorised/108/expected.json index 533ad1b064..726e72aa5b 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/108/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/108/expected.json @@ -87,7 +87,9 @@ "column": 22 } }, - "raw": "/[P QR]/\\u0067", + "extra": { + "raw": "/[P QR]/\\u0067" + }, "pattern": "[P QR]", "flags": "g" } @@ -95,6 +97,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/11/expected.json b/packages/babylon/test/fixtures/core/uncategorised/11/expected.json index e011780af1..4c7a7a3493 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/11/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/11/expected.json @@ -104,14 +104,17 @@ "column": 11 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } ] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/116/expected.json b/packages/babylon/test/fixtures/core/uncategorised/116/expected.json index b353ef2c83..5e0c9c3c30 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/116/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/116/expected.json @@ -101,7 +101,9 @@ "name": "foo" }, "arguments": [], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "property": { "type": "Identifier", @@ -124,6 +126,7 @@ "arguments": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/118/expected.json b/packages/babylon/test/fixtures/core/uncategorised/118/expected.json index 6105d2841a..2a92530d73 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/118/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/118/expected.json @@ -71,11 +71,14 @@ } }, "name": "foo", - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "arguments": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/12/expected.json b/packages/babylon/test/fixtures/core/uncategorised/12/expected.json index 90a2413a90..5405d8164c 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/12/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/12/expected.json @@ -102,9 +102,11 @@ "column": 7 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, { "type": "NumberLiteral", @@ -120,9 +122,11 @@ "column": 10 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, { "type": "NumberLiteral", @@ -138,14 +142,17 @@ "column": 13 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } ] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/124/expected.json b/packages/babylon/test/fixtures/core/uncategorised/124/expected.json index f26ab8b935..ec68a20ef6 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/124/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/124/expected.json @@ -100,9 +100,11 @@ "column": 11 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "computed": true }, @@ -125,6 +127,7 @@ "computed": false } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/125/expected.json b/packages/babylon/test/fixtures/core/uncategorised/125/expected.json index 624c7b81b9..a7a9ccf384 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/125/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/125/expected.json @@ -101,9 +101,11 @@ "column": 11 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } ] }, @@ -126,6 +128,7 @@ "computed": false } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/126/expected.json b/packages/babylon/test/fixtures/core/uncategorised/126/expected.json index 23d090fedc..c94c04107e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/126/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/126/expected.json @@ -129,9 +129,11 @@ "column": 11 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } ] }, @@ -168,9 +170,11 @@ "column": 24 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 }, { "type": "NumberLiteral", @@ -186,9 +190,11 @@ "column": 27 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 }, { "type": "NumberLiteral", @@ -204,9 +210,11 @@ "column": 31 } }, - "value": 77, - "rawValue": 77, - "raw": "77" + "extra": { + "rawValue": 77, + "raw": "77" + }, + "value": 77 } ] }, @@ -229,6 +237,7 @@ "computed": false } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/127/expected.json b/packages/babylon/test/fixtures/core/uncategorised/127/expected.json index 080068549b..b7649d92f8 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/127/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/127/expected.json @@ -183,13 +183,16 @@ "column": 44 } }, - "value": 2014, - "rawValue": 2014, - "raw": "2014" + "extra": { + "rawValue": 2014, + "raw": "2014" + }, + "value": 2014 } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/13/expected.json b/packages/babylon/test/fixtures/core/uncategorised/13/expected.json index 9bc040d735..f8e8558451 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/13/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/13/expected.json @@ -102,9 +102,11 @@ "column": 7 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, { "type": "NumberLiteral", @@ -120,9 +122,11 @@ "column": 10 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, null, { @@ -139,14 +143,17 @@ "column": 14 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } ] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/197/expected.json b/packages/babylon/test/fixtures/core/uncategorised/197/expected.json index 9252297ac7..0ae6562f5f 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/197/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/197/expected.json @@ -86,9 +86,11 @@ "column": 5 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "alternate": { "type": "NumberLiteral", @@ -104,12 +106,15 @@ "column": 9 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/198/expected.json b/packages/babylon/test/fixtures/core/uncategorised/198/expected.json index 6d0cf5e9ff..5f5e161e69 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/198/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/198/expected.json @@ -118,9 +118,11 @@ "column": 10 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "alternate": { "type": "NumberLiteral", @@ -136,12 +138,15 @@ "column": 14 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/199/expected.json b/packages/babylon/test/fixtures/core/uncategorised/199/expected.json index 886a4c91ba..c55cb13771 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/199/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/199/expected.json @@ -87,12 +87,15 @@ "column": 6 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/200/expected.json b/packages/babylon/test/fixtures/core/uncategorised/200/expected.json index 087953e749..ccef73317a 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/200/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/200/expected.json @@ -87,12 +87,15 @@ "column": 9 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/201/expected.json b/packages/babylon/test/fixtures/core/uncategorised/201/expected.json index c40cefe77a..90279da775 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/201/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/201/expected.json @@ -87,12 +87,15 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/202/expected.json b/packages/babylon/test/fixtures/core/uncategorised/202/expected.json index 77c0b3f6fd..8c50cdf2f0 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/202/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/202/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/203/expected.json b/packages/babylon/test/fixtures/core/uncategorised/203/expected.json index 3ea5616140..6c210fd1b6 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/203/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/203/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/204/expected.json b/packages/babylon/test/fixtures/core/uncategorised/204/expected.json index 3bb965131c..2c333b70e1 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/204/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/204/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/205/expected.json b/packages/babylon/test/fixtures/core/uncategorised/205/expected.json index 623bec2d65..53c21fe4d6 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/205/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/205/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/206/expected.json b/packages/babylon/test/fixtures/core/uncategorised/206/expected.json index 169b55b357..abc4cb0406 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/206/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/206/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/207/expected.json b/packages/babylon/test/fixtures/core/uncategorised/207/expected.json index 395bbc5959..3c8c2893e8 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/207/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/207/expected.json @@ -87,12 +87,15 @@ "column": 8 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/208/expected.json b/packages/babylon/test/fixtures/core/uncategorised/208/expected.json index f2baaf2d7c..cfa8f98dfa 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/208/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/208/expected.json @@ -87,12 +87,15 @@ "column": 8 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/209/expected.json b/packages/babylon/test/fixtures/core/uncategorised/209/expected.json index 63767ff44b..ff6f9db71d 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/209/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/209/expected.json @@ -87,12 +87,15 @@ "column": 9 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/210/expected.json b/packages/babylon/test/fixtures/core/uncategorised/210/expected.json index 22bf53cf58..3719a7fafe 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/210/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/210/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/211/expected.json b/packages/babylon/test/fixtures/core/uncategorised/211/expected.json index 52cfe31685..84a3e7d56e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/211/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/211/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/212/expected.json b/packages/babylon/test/fixtures/core/uncategorised/212/expected.json index 0cb0e23497..456765cc37 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/212/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/212/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/218/expected.json b/packages/babylon/test/fixtures/core/uncategorised/218/expected.json index 746c634e18..1050401744 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/218/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/218/expected.json @@ -87,14 +87,17 @@ "column": 10 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/219/expected.json b/packages/babylon/test/fixtures/core/uncategorised/219/expected.json index e88bd0e0af..a1ed3e4b37 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/219/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/219/expected.json @@ -87,9 +87,11 @@ "column": 13 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, { @@ -136,14 +138,17 @@ "column": 29 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/22/expected.json b/packages/babylon/test/fixtures/core/uncategorised/22/expected.json index 6798856802..0ea258d194 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/22/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/22/expected.json @@ -135,9 +135,11 @@ "column": 16 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/220/expected.json b/packages/babylon/test/fixtures/core/uncategorised/220/expected.json index f0f1cc157c..db6e0fba4c 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/220/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/220/expected.json @@ -87,9 +87,11 @@ "column": 10 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -136,9 +138,11 @@ "column": 17 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -185,14 +189,17 @@ "column": 27 } }, - "value": 1977, - "rawValue": 1977, - "raw": "1977" + "extra": { + "rawValue": 1977, + "raw": "1977" + }, + "value": 1977 } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/229/expected.json b/packages/babylon/test/fixtures/core/uncategorised/229/expected.json index 97e2c0b335..640c5691c2 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/229/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/229/expected.json @@ -104,13 +104,17 @@ "column": 26 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } }, "alternate": null } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/23/expected.json b/packages/babylon/test/fixtures/core/uncategorised/23/expected.json index 7d1d29919f..6000da8339 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/23/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/23/expected.json @@ -135,9 +135,11 @@ "column": 12 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/230/expected.json b/packages/babylon/test/fixtures/core/uncategorised/230/expected.json index 086e802703..02fd006838 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/230/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/230/expected.json @@ -117,9 +117,11 @@ "column": 22 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], @@ -127,6 +129,7 @@ }, "alternate": null } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/232/expected.json b/packages/babylon/test/fixtures/core/uncategorised/232/expected.json index 298c6ed2b8..52f64a4d6b 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/232/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/232/expected.json @@ -103,11 +103,10 @@ "column": 22 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/233/expected.json b/packages/babylon/test/fixtures/core/uncategorised/233/expected.json index cf9db0e4fd..04998adb58 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/233/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/233/expected.json @@ -103,11 +103,10 @@ "column": 22 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/234/expected.json b/packages/babylon/test/fixtures/core/uncategorised/234/expected.json index 3bd687b08d..8e9ac0c09e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/234/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/234/expected.json @@ -153,7 +153,8 @@ } } } - ] + ], + "directives": [] }, "test": { "type": "BinaryExpression", @@ -200,12 +201,15 @@ "column": 30 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/235/expected.json b/packages/babylon/test/fixtures/core/uncategorised/235/expected.json index 5f92a264ce..e012c017fe 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/235/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/235/expected.json @@ -71,7 +71,8 @@ "column": 8 } }, - "body": [] + "body": [], + "directives": [] }, "test": { "type": "BooleanLiteral", @@ -87,9 +88,7 @@ "column": 21 } }, - "value": false, - "rawValue": false, - "raw": "false" + "value": false } }, { @@ -120,13 +119,13 @@ "column": 28 } }, - "value": false, - "rawValue": false, - "raw": "false" + "value": false } } - ] + ], + "directives": [] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/236/expected.json b/packages/babylon/test/fixtures/core/uncategorised/236/expected.json index b68c4e6106..b154f386f7 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/236/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/236/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "ExpressionStatement", @@ -108,6 +106,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/237/expected.json b/packages/babylon/test/fixtures/core/uncategorised/237/expected.json index c7381370ab..0ca7f0f400 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/237/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/237/expected.json @@ -87,9 +87,11 @@ "column": 13 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } }, "body": { @@ -203,9 +205,11 @@ } } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/24/expected.json b/packages/babylon/test/fixtures/core/uncategorised/24/expected.json index 80a4774e20..a958d6780e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/24/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/24/expected.json @@ -135,9 +135,11 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/240/expected.json b/packages/babylon/test/fixtures/core/uncategorised/240/expected.json index f45ca7088d..3b790cdecf 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/240/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/240/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": null, @@ -110,6 +112,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/241/expected.json b/packages/babylon/test/fixtures/core/uncategorised/241/expected.json index 6640f73295..e7c1db4ec7 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/241/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/241/expected.json @@ -101,9 +101,11 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], @@ -127,6 +129,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/242/expected.json b/packages/babylon/test/fixtures/core/uncategorised/242/expected.json index 61391fdd9f..eacbe24384 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/242/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/242/expected.json @@ -101,9 +101,11 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, { @@ -150,9 +152,11 @@ "column": 20 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -176,6 +180,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/243/expected.json b/packages/babylon/test/fixtures/core/uncategorised/243/expected.json index fb76721dce..7f485aaf19 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/243/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/243/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -137,9 +139,11 @@ "column": 17 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, "update": null, @@ -159,6 +163,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/244/expected.json b/packages/babylon/test/fixtures/core/uncategorised/244/expected.json index f826f885de..0c6bf2a092 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/244/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/244/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -137,9 +139,11 @@ "column": 17 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, "update": { @@ -191,6 +195,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/245/expected.json b/packages/babylon/test/fixtures/core/uncategorised/245/expected.json index 16f684a226..586cbf67f5 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/245/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/245/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -137,9 +139,11 @@ "column": 17 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, "update": { @@ -240,6 +244,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/25/expected.json b/packages/babylon/test/fixtures/core/uncategorised/25/expected.json index a6a31f5362..d4911b1226 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/25/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/25/expected.json @@ -135,9 +135,11 @@ "column": 15 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/250/expected.json b/packages/babylon/test/fixtures/core/uncategorised/250/expected.json index 40763456b0..16edee2512 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/250/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/250/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -91,9 +89,11 @@ }, "label": null } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/251/expected.json b/packages/babylon/test/fixtures/core/uncategorised/251/expected.json index bfea074cf1..d58d0ffa9a 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/251/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/251/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -91,9 +89,11 @@ }, "label": null } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/252/expected.json b/packages/babylon/test/fixtures/core/uncategorised/252/expected.json index f43031468c..3d3611769c 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/252/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/252/expected.json @@ -70,9 +70,7 @@ "column": 17 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "done" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "done" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/253/expected.json b/packages/babylon/test/fixtures/core/uncategorised/253/expected.json index 3b684f46cb..e2eede95cf 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/253/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/253/expected.json @@ -70,9 +70,7 @@ "column": 17 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "done" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "done" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/254/expected.json b/packages/babylon/test/fixtures/core/uncategorised/254/expected.json index 15042df691..e27a473406 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/254/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/254/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -91,9 +89,11 @@ }, "label": null } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/255/expected.json b/packages/babylon/test/fixtures/core/uncategorised/255/expected.json index be48009734..930203bdfe 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/255/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/255/expected.json @@ -70,9 +70,7 @@ "column": 17 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "done" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "done" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/256/expected.json b/packages/babylon/test/fixtures/core/uncategorised/256/expected.json index 6c31c586d6..207d4cf4c5 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/256/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/256/expected.json @@ -70,9 +70,7 @@ "column": 17 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "done" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "done" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/259/expected.json b/packages/babylon/test/fixtures/core/uncategorised/259/expected.json index 3f86692dc7..3811851cf2 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/259/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/259/expected.json @@ -91,11 +91,15 @@ }, "argument": null } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/26/expected.json b/packages/babylon/test/fixtures/core/uncategorised/26/expected.json index e516e972e9..61e13ba2b5 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/26/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/26/expected.json @@ -135,9 +135,11 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/260/expected.json b/packages/babylon/test/fixtures/core/uncategorised/260/expected.json index f66370e4d6..cfc30f8e34 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/260/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/260/expected.json @@ -91,11 +91,15 @@ }, "argument": null } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/261/expected.json b/packages/babylon/test/fixtures/core/uncategorised/261/expected.json index 864565296e..7e253235fc 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/261/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/261/expected.json @@ -106,11 +106,15 @@ "name": "x" } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/262/expected.json b/packages/babylon/test/fixtures/core/uncategorised/262/expected.json index 9c0041eb71..d4f71c39ad 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/262/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/262/expected.json @@ -138,11 +138,15 @@ } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/269/expected.json b/packages/babylon/test/fixtures/core/uncategorised/269/expected.json index 9758d61707..6251d143ae 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/269/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/269/expected.json @@ -152,13 +152,16 @@ "column": 25 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/27/expected.json b/packages/babylon/test/fixtures/core/uncategorised/27/expected.json index 96a8fd0d09..e7f3c00497 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/27/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/27/expected.json @@ -119,9 +119,11 @@ "column": 14 } }, - "value": "answer", - "rawValue": "answer", - "raw": "\"answer\"" + "extra": { + "rawValue": "answer", + "raw": "\"answer\"" + }, + "value": "answer" }, "value": { "type": "NumberLiteral", @@ -137,9 +139,11 @@ "column": 18 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -147,6 +151,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/270/expected.json b/packages/babylon/test/fixtures/core/uncategorised/270/expected.json index 7400509d5f..96908f65a6 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/270/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/270/expected.json @@ -152,9 +152,11 @@ "column": 25 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, { @@ -193,6 +195,7 @@ } ] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/272/expected.json b/packages/babylon/test/fixtures/core/uncategorised/272/expected.json index c4f9e0e386..5157602658 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/272/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/272/expected.json @@ -70,9 +70,7 @@ "column": 18 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BreakStatement", @@ -123,6 +121,7 @@ "name": "start" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/275/expected.json b/packages/babylon/test/fixtures/core/uncategorised/275/expected.json index dc9afaed76..0ddcce0c63 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/275/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/275/expected.json @@ -104,15 +104,18 @@ "column": 24 } }, - "value": "Error", - "rawValue": "Error", - "raw": "\"Error\"" + "extra": { + "rawValue": "Error", + "raw": "\"Error\"" + }, + "value": "Error" }, "kind": "init" } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/28/expected.json b/packages/babylon/test/fixtures/core/uncategorised/28/expected.json index d754d81e2b..d7de811e96 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/28/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/28/expected.json @@ -135,9 +135,11 @@ "column": 10 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "kind": "init" }, @@ -188,9 +190,11 @@ "column": 16 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "kind": "init" } @@ -198,6 +202,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/288/expected.json b/packages/babylon/test/fixtures/core/uncategorised/288/expected.json index 246b6b5a20..a9c517251e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/288/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/288/expected.json @@ -122,11 +122,15 @@ "column": 24 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/289/expected.json b/packages/babylon/test/fixtures/core/uncategorised/289/expected.json index f5013969f2..5924cefb02 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/289/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/289/expected.json @@ -123,9 +123,10 @@ "column": 51 } }, - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 37, "end": 49, "loc": { @@ -138,8 +139,8 @@ "column": 49 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 37, "end": 49, "loc": { @@ -153,16 +154,20 @@ } }, "value": "use strict", - "rawValue": "use strict", - "raw": "\"use strict\"" + "extra": { + "raw": "\"use strict\"", + "rawValue": "use strict" + } } } ] } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/299/expected.json b/packages/babylon/test/fixtures/core/uncategorised/299/expected.json index 4841a07e51..fac0f4b32c 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/299/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/299/expected.json @@ -74,11 +74,15 @@ "column": 13 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/3/expected.json b/packages/babylon/test/fixtures/core/uncategorised/3/expected.json index 778ef2fe98..1c7de0b706 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/3/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/3/expected.json @@ -56,11 +56,14 @@ "column": 6 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/302/expected.json b/packages/babylon/test/fixtures/core/uncategorised/302/expected.json index 668b5a1ccc..b80d317427 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/302/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/302/expected.json @@ -91,17 +91,32 @@ "line": 1, "column": 19 } - }, - "range": [ - 6, - 19 - ] + } } ] } ], "kind": "var" } - ] - } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": " comment ", + "start": 6, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/303/expected.json b/packages/babylon/test/fixtures/core/uncategorised/303/expected.json index b3c4b6a133..607612e873 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/303/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/303/expected.json @@ -102,9 +102,11 @@ "column": 12 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -151,9 +153,11 @@ "column": 19 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } ], @@ -190,8 +194,10 @@ "name": "z" } } - ] + ], + "directives": [] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/304/expected.json b/packages/babylon/test/fixtures/core/uncategorised/304/expected.json index 253be28d97..1c02f6ef66 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/304/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/304/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -122,9 +120,11 @@ "name": "there" } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/305/expected.json b/packages/babylon/test/fixtures/core/uncategorised/305/expected.json index 567f02ad8f..675fe056a3 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/305/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/305/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -106,11 +104,7 @@ "line": 1, "column": 34 } - }, - "range": [ - 24, - 34 - ] + } } ] }, @@ -160,18 +154,16 @@ "line": 1, "column": 34 } - }, - "range": [ - 24, - 34 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 1, "column": 34 } - }, - "range": [ - 24, - 34 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/306/expected.json b/packages/babylon/test/fixtures/core/uncategorised/306/expected.json index b094efe11f..dfef6b5c50 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/306/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/306/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -106,11 +104,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 24, - 47 - ] + } } ] }, @@ -160,18 +154,16 @@ "line": 2, "column": 10 } - }, - "range": [ - 24, - 47 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 24, - 47 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/307/expected.json b/packages/babylon/test/fixtures/core/uncategorised/307/expected.json index be91d94441..2b8d9fef9f 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/307/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/307/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -122,9 +120,11 @@ "name": "there" } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/308/expected.json b/packages/babylon/test/fixtures/core/uncategorised/308/expected.json index 2fc3f311ee..21c911cbbc 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/308/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/308/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -106,11 +104,7 @@ "line": 1, "column": 31 } - }, - "range": [ - 21, - 31 - ] + } } ] }, @@ -160,18 +154,16 @@ "line": 1, "column": 31 } - }, - "range": [ - 21, - 31 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 1, "column": 31 } - }, - "range": [ - 21, - 31 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/309/expected.json b/packages/babylon/test/fixtures/core/uncategorised/309/expected.json index 6720b43723..55ac6a29a8 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/309/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/309/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -106,11 +104,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 21, - 44 - ] + } } ] }, @@ -160,18 +154,16 @@ "line": 2, "column": 10 } - }, - "range": [ - 21, - 44 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 21, - 44 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/310/expected.json b/packages/babylon/test/fixtures/core/uncategorised/310/expected.json index 9098864a2b..7d4c8d5bb6 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/310/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/310/expected.json @@ -122,11 +122,15 @@ "name": "x" } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/311/expected.json b/packages/babylon/test/fixtures/core/uncategorised/311/expected.json index f9a8a99635..f0cf8a4b53 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/311/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/311/expected.json @@ -106,11 +106,7 @@ "line": 1, "column": 30 } - }, - "range": [ - 20, - 30 - ] + } } ] }, @@ -160,19 +156,37 @@ "line": 1, "column": 30 } - }, - "range": [ - 20, - 30 - ] + } } ] } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": " Comment", + "start": 20, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 30 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/312/expected.json b/packages/babylon/test/fixtures/core/uncategorised/312/expected.json index 217daeda72..975bfdf605 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/312/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/312/expected.json @@ -106,11 +106,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 19, - 42 - ] + } } ] }, @@ -160,19 +156,37 @@ "line": 2, "column": 10 } - }, - "range": [ - 19, - 42 - ] + } } ] } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": " Multiline\nComment ", + "start": 19, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/314/expected.json b/packages/babylon/test/fixtures/core/uncategorised/314/expected.json index d0361e267d..1340d70360 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/314/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/314/expected.json @@ -90,11 +90,7 @@ "line": 1, "column": 23 } - }, - "range": [ - 13, - 23 - ] + } } ] }, @@ -144,16 +140,32 @@ "line": 1, "column": 23 } - }, - "range": [ - 13, - 23 - ] + } } ] } - ] + ], + "directives": [] } - ] - } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": " Comment", + "start": 13, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 23 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/315/expected.json b/packages/babylon/test/fixtures/core/uncategorised/315/expected.json index 51f1550026..fcf481f414 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/315/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/315/expected.json @@ -90,11 +90,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 13, - 36 - ] + } } ] }, @@ -144,16 +140,32 @@ "line": 2, "column": 10 } - }, - "range": [ - 13, - 36 - ] + } } ] } - ] + ], + "directives": [] } - ] - } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": " Multiline\nComment ", + "start": 13, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/317/expected.json b/packages/babylon/test/fixtures/core/uncategorised/317/expected.json index 77f0623dd0..96b5884573 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/317/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/317/expected.json @@ -70,9 +70,7 @@ "column": 13 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "consequent": { "type": "BreakStatement", @@ -124,6 +122,7 @@ "name": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/318/expected.json b/packages/babylon/test/fixtures/core/uncategorised/318/expected.json index a9f877830b..1fda36e9a7 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/318/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/318/expected.json @@ -88,9 +88,10 @@ "column": 1 } }, - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 16, "end": 29, "loc": { @@ -103,8 +104,8 @@ "column": 14 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 16, "end": 28, "loc": { @@ -118,12 +119,14 @@ } }, "value": "use strict", - "rawValue": "use strict", - "raw": "'use strict'" + "extra": { + "raw": "'use strict'", + "rawValue": "use strict" + } } }, { - "type": "ExpressionStatement", + "type": "Directive", "start": 31, "end": 35, "loc": { @@ -136,8 +139,8 @@ "column": 5 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 31, "end": 34, "loc": { @@ -151,17 +154,22 @@ } }, "value": "\u0000", - "rawValue": "\u0000", - "raw": "'\u0000'" + "extra": { + "raw": "'\u0000'", + "rawValue": "\u0000" + } } } ] } }, "arguments": [], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/319/expected.json b/packages/babylon/test/fixtures/core/uncategorised/319/expected.json index c8465306e7..61133f8ac6 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/319/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/319/expected.json @@ -84,9 +84,11 @@ "column": 4 } }, - "value": 123, - "rawValue": 123, - "raw": "123." + "extra": { + "rawValue": 123, + "raw": "123." + }, + "value": 123 }, "property": { "type": "Identifier", @@ -121,13 +123,16 @@ "column": 16 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/320/expected.json b/packages/babylon/test/fixtures/core/uncategorised/320/expected.json index dfcf159a6b..da052c6d87 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/320/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/320/expected.json @@ -70,9 +70,11 @@ "column": 4 } }, - "value": 123, - "rawValue": 123, - "raw": "123." + "extra": { + "rawValue": 123, + "raw": "123." + }, + "value": 123 }, "operator": "+", "right": { @@ -89,12 +91,15 @@ "column": 6 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/322/expected.json b/packages/babylon/test/fixtures/core/uncategorised/322/expected.json index 312ab26090..16ba69aff9 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/322/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/322/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 10, "loc": { @@ -42,8 +43,8 @@ "column": 10 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 10, "loc": { @@ -56,9 +57,11 @@ "column": 10 } }, - "value": "a&b", - "rawValue": "a&b", - "raw": "'a\\u0026b'" + "value": "a\\u0026b", + "extra": { + "raw": "'a\\u0026b'", + "rawValue": "a\\u0026b" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/323/expected.json b/packages/babylon/test/fixtures/core/uncategorised/323/expected.json index a3669a1658..583c34687b 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/323/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/323/expected.json @@ -70,9 +70,11 @@ "column": 7 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } }, "label": { @@ -134,9 +136,11 @@ "column": 16 } }, - "value": 20, - "rawValue": 20, - "raw": "20" + "extra": { + "rawValue": 20, + "raw": "20" + }, + "value": 20 } }, "label": { @@ -156,6 +160,7 @@ "name": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/324/expected.json b/packages/babylon/test/fixtures/core/uncategorised/324/expected.json index 5409838244..41b1dcbac8 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/324/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/324/expected.json @@ -56,9 +56,11 @@ "column": 4 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "consequent": { "type": "ExpressionStatement", @@ -88,13 +90,16 @@ "column": 12 } }, - "raw": "/ foo/", + "extra": { + "raw": "/ foo/" + }, "pattern": " foo", "flags": "" } }, "alternate": null } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/341/expected.json b/packages/babylon/test/fixtures/core/uncategorised/341/expected.json index 599c268bdf..487553a051 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/341/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/341/expected.json @@ -42,7 +42,8 @@ "column": 2 } }, - "body": [] + "body": [], + "directives": [] }, { "type": "ExpressionStatement", @@ -72,11 +73,14 @@ "column": 5 } }, - "raw": "/=/", + "extra": { + "raw": "/=/" + }, "pattern": "=", "flags": "" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/342/expected.json b/packages/babylon/test/fixtures/core/uncategorised/342/expected.json index 4e26603533..418f936ff6 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/342/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/342/expected.json @@ -87,11 +87,7 @@ "line": 1, "column": 11 } - }, - "range": [ - 4, - 11 - ] + } } ] }, @@ -126,16 +122,31 @@ "line": 1, "column": 11 } - }, - "range": [ - 4, - 11 - ] + } } ] } } } - ] - } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": "bar", + "start": 4, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 11 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/343/expected.json b/packages/babylon/test/fixtures/core/uncategorised/343/expected.json index 16ef7df684..d2ed65cb86 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/343/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/343/expected.json @@ -135,9 +135,11 @@ "column": 10 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } }, @@ -156,15 +158,12 @@ "line": 2, "column": 12 } - }, - "range": [ - 13, - 24 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -181,11 +180,7 @@ "line": 2, "column": 12 } - }, - "range": [ - 13, - 24 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/344/expected.json b/packages/babylon/test/fixtures/core/uncategorised/344/expected.json index c8acee55d3..827aebf2db 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/344/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/344/expected.json @@ -28,39 +28,6 @@ }, "sourceType": "script", "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "expression": { - "type": "StringLiteral", - "start": 0, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "value": "use strict", - "rawValue": "use strict", - "raw": "'use strict'" - } - }, { "type": "ExpressionStatement", "start": 14, @@ -140,6 +107,43 @@ "arguments": [] } } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": "use strict", + "extra": { + "raw": "'use strict'", + "rawValue": "use strict" + } + } + } ] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/35/expected.json b/packages/babylon/test/fixtures/core/uncategorised/35/expected.json index 929aaebf51..da3ec9be77 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/35/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/35/expected.json @@ -119,9 +119,11 @@ "column": 17 } }, - "value": "undef", - "rawValue": "undef", - "raw": "\"undef\"" + "extra": { + "rawValue": "undef", + "raw": "\"undef\"" + }, + "value": "undef" }, "kind": "get", "value": { @@ -156,7 +158,8 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -164,6 +167,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/36/expected.json b/packages/babylon/test/fixtures/core/uncategorised/36/expected.json index 2249562b63..a7cfe82d4d 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/36/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/36/expected.json @@ -119,9 +119,11 @@ "column": 12 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "get", "value": { @@ -156,7 +158,8 @@ "column": 17 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -164,6 +167,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/4/expected.json b/packages/babylon/test/fixtures/core/uncategorised/4/expected.json index cfa64792cf..850ccec0d7 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/4/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/4/expected.json @@ -56,11 +56,14 @@ "column": 8 } }, - "raw": "/foobar/", + "extra": { + "raw": "/foobar/" + }, "pattern": "foobar", "flags": "" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/42/expected.json b/packages/babylon/test/fixtures/core/uncategorised/42/expected.json index e1c3ca9d7e..359994f749 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/42/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/42/expected.json @@ -119,9 +119,11 @@ "column": 16 } }, - "value": "null", - "rawValue": "null", - "raw": "\"null\"" + "extra": { + "rawValue": "null", + "raw": "\"null\"" + }, + "value": "null" }, "kind": "set", "value": { @@ -237,7 +239,8 @@ } } } - ] + ], + "directives": [] } } } @@ -245,6 +248,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/43/expected.json b/packages/babylon/test/fixtures/core/uncategorised/43/expected.json index 831c152d07..40439f6021 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/43/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/43/expected.json @@ -119,9 +119,11 @@ "column": 12 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "set", "value": { @@ -237,7 +239,8 @@ } } } - ] + ], + "directives": [] } } } @@ -245,6 +248,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/44/expected.json b/packages/babylon/test/fixtures/core/uncategorised/44/expected.json index 22361a57aa..717aa6f7e7 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/44/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/44/expected.json @@ -135,9 +135,11 @@ "column": 13 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/45/expected.json b/packages/babylon/test/fixtures/core/uncategorised/45/expected.json index 96f2955db3..01d280ce5b 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/45/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/45/expected.json @@ -135,9 +135,11 @@ "column": 13 } }, - "value": 43, - "rawValue": 43, - "raw": "43" + "extra": { + "rawValue": 43, + "raw": "43" + }, + "value": 43 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/46/expected.json b/packages/babylon/test/fixtures/core/uncategorised/46/expected.json index dd2e0291b4..777ab9a74e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/46/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/46/expected.json @@ -56,9 +56,11 @@ "column": 22 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 1, "column": 19 } - }, - "range": [ - 0, - 19 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 1, "column": 19 } - }, - "range": [ - 0, - 19 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/466/expected.json b/packages/babylon/test/fixtures/core/uncategorised/466/expected.json new file mode 100644 index 0000000000..4888c9e77c --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/466/expected.json @@ -0,0 +1,186 @@ +{ + "type": "File", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "expression": { + "type": "CallExpression", + "start": 1, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "callee": { + "type": "FunctionExpression", + "start": 1, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 29, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "expression": { + "type": "UnaryExpression", + "start": 29, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "operator": "delete", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 36, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "name": "i" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 15, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 15, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + }, + "arguments": [], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/467/expected.json b/packages/babylon/test/fixtures/core/uncategorised/467/expected.json new file mode 100644 index 0000000000..b5c7e063e3 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/467/expected.json @@ -0,0 +1,184 @@ +{ + "type": "File", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "expression": { + "type": "CallExpression", + "start": 1, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "callee": { + "type": "FunctionExpression", + "start": 1, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "body": [ + { + "type": "WithStatement", + "start": 29, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "object": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "i" + }, + "body": { + "type": "EmptyStatement", + "start": 37, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 38 + } + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 15, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 15, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + }, + "arguments": [], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/468/expected.json b/packages/babylon/test/fixtures/core/uncategorised/468/expected.json new file mode 100644 index 0000000000..c791058a75 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/468/expected.json @@ -0,0 +1,186 @@ +{ + "type": "File", + "start": 0, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 32, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 36, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "id": { + "type": "Identifier", + "start": 36, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "name": "eval" + }, + "init": { + "type": "NumberLiteral", + "start": 43, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 43 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/469/expected.json b/packages/babylon/test/fixtures/core/uncategorised/469/expected.json new file mode 100644 index 0000000000..d516032ff0 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/469/expected.json @@ -0,0 +1,186 @@ +{ + "type": "File", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 32, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 36, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "id": { + "type": "Identifier", + "start": 36, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "name": "arguments" + }, + "init": { + "type": "NumberLiteral", + "start": 48, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/47/expected.json b/packages/babylon/test/fixtures/core/uncategorised/47/expected.json index 850a6eaa47..0955aa94d2 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/47/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/47/expected.json @@ -56,9 +56,11 @@ "column": 2 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null, "trailingComments": null }, @@ -77,11 +79,7 @@ "line": 1, "column": 10 } - }, - "range": [ - 3, - 10 - ] + } }, { "type": "CommentBlock", @@ -97,15 +95,12 @@ "line": 1, "column": 21 } - }, - "range": [ - 11, - 21 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -122,11 +117,7 @@ "line": 1, "column": 10 } - }, - "range": [ - 3, - 10 - ] + } }, { "type": "CommentBlock", @@ -142,11 +133,7 @@ "line": 1, "column": 21 } - }, - "range": [ - 11, - 21 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/470/expected.json b/packages/babylon/test/fixtures/core/uncategorised/470/expected.json new file mode 100644 index 0000000000..25732f3422 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/470/expected.json @@ -0,0 +1,201 @@ +{ + "type": "File", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 32, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "block": { + "type": "BlockStatement", + "start": 36, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 40, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "param": { + "type": "Identifier", + "start": 47, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "name": "eval" + }, + "body": { + "type": "BlockStatement", + "start": 53, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 53 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "body": [], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/471/expected.json b/packages/babylon/test/fixtures/core/uncategorised/471/expected.json new file mode 100644 index 0000000000..14e6af099e --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/471/expected.json @@ -0,0 +1,201 @@ +{ + "type": "File", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 32, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "block": { + "type": "BlockStatement", + "start": 36, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 40, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "param": { + "type": "Identifier", + "start": 47, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "name": "arguments" + }, + "body": { + "type": "BlockStatement", + "start": 58, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 58 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "body": [], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/472/expected.json b/packages/babylon/test/fixtures/core/uncategorised/472/expected.json new file mode 100644 index 0000000000..5df2fc7306 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/472/expected.json @@ -0,0 +1,184 @@ +{ + "type": "File", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 32, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 32, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "eval" + }, + "right": { + "type": "NumberLiteral", + "start": 39, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/473/expected.json b/packages/babylon/test/fixtures/core/uncategorised/473/expected.json new file mode 100644 index 0000000000..936555ec42 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/473/expected.json @@ -0,0 +1,184 @@ +{ + "type": "File", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 32, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 32, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "name": "arguments" + }, + "right": { + "type": "NumberLiteral", + "start": 44, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 44 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/474/expected.json b/packages/babylon/test/fixtures/core/uncategorised/474/expected.json new file mode 100644 index 0000000000..4a54d8d316 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/474/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "operator": "++", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 34, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "name": "eval" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/475/expected.json b/packages/babylon/test/fixtures/core/uncategorised/475/expected.json new file mode 100644 index 0000000000..0be9956ee7 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/475/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "operator": "--", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 34, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "name": "eval" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/476/expected.json b/packages/babylon/test/fixtures/core/uncategorised/476/expected.json new file mode 100644 index 0000000000..3d5a3384b2 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/476/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "operator": "++", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 34, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "name": "arguments" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/477/expected.json b/packages/babylon/test/fixtures/core/uncategorised/477/expected.json new file mode 100644 index 0000000000..a129e39f7e --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/477/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "operator": "--", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 34, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "name": "arguments" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/478/expected.json b/packages/babylon/test/fixtures/core/uncategorised/478/expected.json new file mode 100644 index 0000000000..7c98807107 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/478/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "operator": "++", + "prefix": false, + "argument": { + "type": "Identifier", + "start": 32, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "eval" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/479/expected.json b/packages/babylon/test/fixtures/core/uncategorised/479/expected.json new file mode 100644 index 0000000000..7db69736d2 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/479/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "operator": "--", + "prefix": false, + "argument": { + "type": "Identifier", + "start": 32, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "eval" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/48/expected.json b/packages/babylon/test/fixtures/core/uncategorised/48/expected.json index 128dc0844c..df6c839351 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/48/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/48/expected.json @@ -56,9 +56,11 @@ "column": 2 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null, "trailingComments": null }, @@ -77,11 +79,7 @@ "line": 1, "column": 10 } - }, - "range": [ - 3, - 10 - ] + } }, { "type": "CommentBlock", @@ -97,15 +95,12 @@ "line": 1, "column": 21 } - }, - "range": [ - 11, - 21 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -122,11 +117,7 @@ "line": 1, "column": 10 } - }, - "range": [ - 3, - 10 - ] + } }, { "type": "CommentBlock", @@ -142,11 +133,7 @@ "line": 1, "column": 21 } - }, - "range": [ - 11, - 21 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/480/expected.json b/packages/babylon/test/fixtures/core/uncategorised/480/expected.json new file mode 100644 index 0000000000..029e95d4fd --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/480/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "operator": "++", + "prefix": false, + "argument": { + "type": "Identifier", + "start": 32, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "name": "arguments" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/481/expected.json b/packages/babylon/test/fixtures/core/uncategorised/481/expected.json new file mode 100644 index 0000000000..fc9fb9e66f --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/481/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "operator": "--", + "prefix": false, + "argument": { + "type": "Identifier", + "start": 32, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "name": "arguments" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/482/expected.json b/packages/babylon/test/fixtures/core/uncategorised/482/expected.json new file mode 100644 index 0000000000..416268fca0 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/482/expected.json @@ -0,0 +1,170 @@ +{ + "type": "File", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 32, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "id": { + "type": "Identifier", + "start": 41, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "name": "eval" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 48, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/483/expected.json b/packages/babylon/test/fixtures/core/uncategorised/483/expected.json new file mode 100644 index 0000000000..aeae082c8b --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/483/expected.json @@ -0,0 +1,170 @@ +{ + "type": "File", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 32, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "id": { + "type": "Identifier", + "start": 41, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "name": "arguments" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 53, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 53 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/486/expected.json b/packages/babylon/test/fixtures/core/uncategorised/486/expected.json new file mode 100644 index 0000000000..ae9e78153d --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/486/expected.json @@ -0,0 +1,204 @@ +{ + "type": "File", + "start": 0, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 55, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 55 + } + }, + "expression": { + "type": "CallExpression", + "start": 33, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "callee": { + "type": "FunctionExpression", + "start": 33, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "id": { + "type": "Identifier", + "start": 42, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "name": "eval" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 49, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 49 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "body": [], + "directives": [] + } + }, + "arguments": [], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/487/expected.json b/packages/babylon/test/fixtures/core/uncategorised/487/expected.json new file mode 100644 index 0000000000..dc709c3172 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/487/expected.json @@ -0,0 +1,204 @@ +{ + "type": "File", + "start": 0, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 62 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 62 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 62 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 62 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 60, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 60 + } + }, + "expression": { + "type": "CallExpression", + "start": 33, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "callee": { + "type": "FunctionExpression", + "start": 33, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "id": { + "type": "Identifier", + "start": 42, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "name": "arguments" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 54, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 54 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "body": [], + "directives": [] + } + }, + "arguments": [], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/49/expected.json b/packages/babylon/test/fixtures/core/uncategorised/49/expected.json index f60e121523..e9267064e8 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/49/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/49/expected.json @@ -56,9 +56,11 @@ "column": 13 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 5, "column": 10 } - }, - "range": [ - 0, - 41 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 5, "column": 10 } - }, - "range": [ - 0, - 41 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/490/expected.json b/packages/babylon/test/fixtures/core/uncategorised/490/expected.json new file mode 100644 index 0000000000..f6abe3ed03 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/490/expected.json @@ -0,0 +1,240 @@ +{ + "type": "File", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 33, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "properties": [ + { + "type": "Property", + "start": 35, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "s" + }, + "value": { + "type": "FunctionExpression", + "start": 38, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "id": { + "type": "Identifier", + "start": 47, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "name": "eval" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 54, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 54 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "body": [], + "directives": [] + } + }, + "kind": "init" + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/492/expected.json b/packages/babylon/test/fixtures/core/uncategorised/492/expected.json new file mode 100644 index 0000000000..c888aaf947 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/492/expected.json @@ -0,0 +1,295 @@ +{ + "type": "File", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 33, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "properties": [ + { + "type": "Property", + "start": 35, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "i" + }, + "value": { + "type": "NumberLiteral", + "start": 38, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 42, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 46, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 46 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "name": "s" + }, + "kind": "set", + "value": { + "type": "FunctionExpression", + "start": 47, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 48, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "name": "eval" + } + ], + "body": { + "type": "BlockStatement", + "start": 54, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 54 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "body": [], + "directives": [] + } + } + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/493/expected.json b/packages/babylon/test/fixtures/core/uncategorised/493/expected.json new file mode 100644 index 0000000000..bebdcad342 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/493/expected.json @@ -0,0 +1,242 @@ +{ + "type": "File", + "start": 0, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 33, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "properties": [ + { + "type": "Property", + "start": 35, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 39, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "name": "s" + }, + "kind": "set", + "value": { + "type": "FunctionExpression", + "start": 40, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 41, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "name": "eval" + } + ], + "body": { + "type": "BlockStatement", + "start": 47, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "body": [], + "directives": [] + } + } + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/494/expected.json b/packages/babylon/test/fixtures/core/uncategorised/494/expected.json new file mode 100644 index 0000000000..d098c6d058 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/494/expected.json @@ -0,0 +1,257 @@ +{ + "type": "File", + "start": 0, + "end": 64, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 64 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 64, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 64 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 64, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 64 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 64, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 64 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 62 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 33, + "end": 60, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 60 + } + }, + "properties": [ + { + "type": "Property", + "start": 35, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "s" + }, + "value": { + "type": "FunctionExpression", + "start": 38, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "id": { + "type": "Identifier", + "start": 47, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "name": "s" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 49, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 49 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "name": "eval" + } + ], + "body": { + "type": "BlockStatement", + "start": 55, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 55 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "body": [], + "directives": [] + } + }, + "kind": "init" + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0019/expected.json b/packages/babylon/test/fixtures/core/uncategorised/497/expected.json similarity index 50% rename from packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0019/expected.json rename to packages/babylon/test/fixtures/core/uncategorised/497/expected.json index 7b65e7a6c3..8425a41fb7 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0019/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/497/expected.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 36, + "end": 58, "loc": { "start": { "line": 1, @@ -9,13 +9,13 @@ }, "end": { "line": 1, - "column": 36 + "column": 58 } }, "program": { "type": "Program", "start": 0, - "end": 36, + "end": 58, "loc": { "start": { "line": 1, @@ -23,15 +23,15 @@ }, "end": { "line": 1, - "column": 36 + "column": 58 } }, "sourceType": "script", "body": [ { - "type": "ForInStatement", + "type": "FunctionDeclaration", "start": 0, - "end": 36, + "end": 58, "loc": { "start": { "line": 1, @@ -39,157 +39,149 @@ }, "end": { "line": 1, - "column": 36 + "column": 58 } }, - "left": { - "type": "VariableDeclaration", - "start": 5, - "end": 15, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, "loc": { "start": { "line": 1, - "column": 5 + "column": 9 }, "end": { "line": 1, - "column": 15 + "column": 14 } }, - "declarations": [ + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "body": [ { - "type": "VariableDeclarator", - "start": 9, - "end": 15, + "type": "FunctionDeclaration", + "start": 33, + "end": 56, "loc": { "start": { "line": 1, - "column": 9 + "column": 33 }, "end": { "line": 1, - "column": 15 + "column": 56 } }, "id": { "type": "Identifier", - "start": 9, - "end": 10, + "start": 42, + "end": 47, "loc": { "start": { "line": 1, - "column": 9 + "column": 42 }, "end": { "line": 1, - "column": 10 + "column": 47 } }, - "name": "x" + "name": "inner" }, - "init": { - "type": "Literal", - "start": 13, - "end": 15, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 48, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "name": "eval" + } + ], + "body": { + "type": "BlockStatement", + "start": 54, + "end": 56, "loc": { "start": { "line": 1, - "column": 13 + "column": 54 }, "end": { "line": 1, - "column": 15 + "column": 56 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "body": [], + "directives": [] } } ], - "kind": "var" - }, - "right": { - "type": "Identifier", - "start": 19, - "end": 23, - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 23 - } - }, - "name": "list" - }, - "body": { - "type": "ExpressionStatement", - "start": 25, - "end": 36, - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 36 - } - }, - "expression": { - "type": "CallExpression", - "start": 25, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 35 - } - }, - "callee": { - "type": "Identifier", - "start": 25, + "directives": [ + { + "type": "Directive", + "start": 19, "end": 32, "loc": { "start": { "line": 1, - "column": 25 + "column": 19 }, "end": { "line": 1, "column": 32 } }, - "name": "process" - }, - "arguments": [ - { - "type": "Identifier", - "start": 33, - "end": 34, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, "loc": { "start": { "line": 1, - "column": 33 + "column": 19 }, "end": { "line": 1, - "column": 34 + "column": 31 } }, - "name": "x" + "raw": "'use strict'", + "value": "use strict" } - ] - } + } + ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/498/expected.json b/packages/babylon/test/fixtures/core/uncategorised/498/expected.json new file mode 100644 index 0000000000..bab5d19160 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/498/expected.json @@ -0,0 +1,187 @@ +{ + "type": "File", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 33, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "id": { + "type": "Identifier", + "start": 42, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "name": "inner" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 48, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "name": "arguments" + } + ], + "body": { + "type": "BlockStatement", + "start": 59, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 59 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/499/expected.json b/packages/babylon/test/fixtures/core/uncategorised/499/expected.json new file mode 100644 index 0000000000..53489fbf1c --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/499/expected.json @@ -0,0 +1,150 @@ +{ + "type": "File", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "body": [], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + }, + { + "type": "Directive", + "start": 33, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "raw": "\"\\1\"", + "value": "\\1" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/5/expected.json b/packages/babylon/test/fixtures/core/uncategorised/5/expected.json index 00b6bbab99..9311593726 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/5/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/5/expected.json @@ -56,11 +56,14 @@ "column": 8 } }, - "raw": "/[a-z]/g", + "extra": { + "raw": "/[a-z]/g" + }, "pattern": "[a-z]", "flags": "g" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/50/expected.json b/packages/babylon/test/fixtures/core/uncategorised/50/expected.json index 1941345514..1bead36e26 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/50/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/50/expected.json @@ -56,9 +56,11 @@ "column": 6 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/500/expected.json b/packages/babylon/test/fixtures/core/uncategorised/500/expected.json new file mode 100644 index 0000000000..29875fff43 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/500/expected.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "expression": { + "type": "NumberLiteral", + "start": 33, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "value": 17, + "rawValue": 17, + "raw": "021" + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/501/expected.json b/packages/babylon/test/fixtures/core/uncategorised/501/expected.json new file mode 100644 index 0000000000..4e77a05f78 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/501/expected.json @@ -0,0 +1,209 @@ +{ + "type": "File", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 33, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 34, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "properties": [ + { + "type": "Property", + "start": 36, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "StringLiteral", + "start": 36, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "value": "\u0001", + "rawValue": "\u0001", + "raw": "\"\\1\"" + }, + "value": { + "type": "NumberLiteral", + "start": 42, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + }, + "kind": "init" + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/502/expected.json b/packages/babylon/test/fixtures/core/uncategorised/502/expected.json new file mode 100644 index 0000000000..346e059e5f --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/502/expected.json @@ -0,0 +1,209 @@ +{ + "type": "File", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 33, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 34, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "properties": [ + { + "type": "Property", + "start": 36, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "NumberLiteral", + "start": 36, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "value": 17, + "rawValue": 17, + "raw": "021" + }, + "value": { + "type": "NumberLiteral", + "start": 41, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + }, + "kind": "init" + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/503/expected.json b/packages/babylon/test/fixtures/core/uncategorised/503/expected.json new file mode 100644 index 0000000000..9f10388176 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/503/expected.json @@ -0,0 +1,203 @@ +{ + "type": "File", + "start": 0, + "end": 76, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 76 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 76, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 76 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 76, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 76 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 76, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 76 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 33, + "end": 74, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 74 + } + }, + "id": { + "type": "Identifier", + "start": 42, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "name": "inner" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 50, + "end": 74, + "loc": { + "start": { + "line": 1, + "column": 50 + }, + "end": { + "line": 1, + "column": 74 + } + }, + "body": [], + "directives": [ + { + "type": "Directive", + "start": 52, + "end": 72, + "loc": { + "start": { + "line": 1, + "column": 52 + }, + "end": { + "line": 1, + "column": 72 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 52, + "end": 71, + "loc": { + "start": { + "line": 1, + "column": 52 + }, + "end": { + "line": 1, + "column": 71 + } + }, + "raw": "\"octal directive\\1\"", + "value": "octal directive\\1" + } + } + ] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/504/expected.json b/packages/babylon/test/fixtures/core/uncategorised/504/expected.json new file mode 100644 index 0000000000..9e81efccd6 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/504/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "name": "implements" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/505/expected.json b/packages/babylon/test/fixtures/core/uncategorised/505/expected.json new file mode 100644 index 0000000000..09c95282b4 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/505/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "name": "interface" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/506/expected.json b/packages/babylon/test/fixtures/core/uncategorised/506/expected.json new file mode 100644 index 0000000000..b5b1bf5fba --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/506/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "name": "package" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/507/expected.json b/packages/babylon/test/fixtures/core/uncategorised/507/expected.json new file mode 100644 index 0000000000..bb397becf0 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/507/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "name": "private" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/508/expected.json b/packages/babylon/test/fixtures/core/uncategorised/508/expected.json new file mode 100644 index 0000000000..14ef8d4896 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/508/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "name": "protected" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/509/expected.json b/packages/babylon/test/fixtures/core/uncategorised/509/expected.json new file mode 100644 index 0000000000..e6e08fbf57 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/509/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "name": "public" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/51/expected.json b/packages/babylon/test/fixtures/core/uncategorised/51/expected.json index a6794f44ff..4ea801a13a 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/51/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/51/expected.json @@ -56,9 +56,11 @@ "column": 6 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/510/expected.json b/packages/babylon/test/fixtures/core/uncategorised/510/expected.json new file mode 100644 index 0000000000..a8f07d2a1b --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/510/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "name": "static" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/513/expected.json b/packages/babylon/test/fixtures/core/uncategorised/513/expected.json new file mode 100644 index 0000000000..e019755823 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/513/expected.json @@ -0,0 +1,118 @@ +{ + "type": "File", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 14, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "id": { + "type": "Identifier", + "start": 23, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "name": "static" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 32, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/514/expected.json b/packages/babylon/test/fixtures/core/uncategorised/514/expected.json new file mode 100644 index 0000000000..51085f798f --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/514/expected.json @@ -0,0 +1,151 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "name": "t" + }, + { + "type": "Identifier", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "name": "t" + } + ], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "body": [], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/517/expected.json b/packages/babylon/test/fixtures/core/uncategorised/517/expected.json new file mode 100644 index 0000000000..97c6620ab1 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/517/expected.json @@ -0,0 +1,218 @@ +{ + "type": "File", + "start": 0, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 29, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "id": { + "type": "Identifier", + "start": 38, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "name": "b" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 40, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "name": "t" + }, + { + "type": "Identifier", + "start": 43, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 43 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "name": "t" + } + ], + "body": { + "type": "BlockStatement", + "start": 46, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 46 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "body": [], + "directives": [] + } + }, + { + "type": "EmptyStatement", + "start": 49, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 49 + }, + "end": { + "line": 1, + "column": 50 + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 15, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 15, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/518/expected.json b/packages/babylon/test/fixtures/core/uncategorised/518/expected.json new file mode 100644 index 0000000000..6b5bcf5c66 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/518/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "expression": { + "type": "FunctionExpression", + "start": 1, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "id": { + "type": "Identifier", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "name": "t" + }, + { + "type": "Identifier", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "name": "t" + } + ], + "body": { + "type": "BlockStatement", + "start": 18, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "body": [], + "directives": [ + { + "type": "Directive", + "start": 20, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 20, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + }, + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/519/expected.json b/packages/babylon/test/fixtures/core/uncategorised/519/expected.json new file mode 100644 index 0000000000..636e4bc049 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/519/expected.json @@ -0,0 +1,221 @@ +{ + "type": "File", + "start": 0, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 29, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "expression": { + "type": "FunctionExpression", + "start": 30, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "id": { + "type": "Identifier", + "start": 39, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "name": "b" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 41, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "name": "t" + }, + { + "type": "Identifier", + "start": 44, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 44 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "name": "t" + } + ], + "body": { + "type": "BlockStatement", + "start": 47, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "body": [], + "directives": [] + }, + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 15, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 15, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/52/expected.json b/packages/babylon/test/fixtures/core/uncategorised/52/expected.json index 1941345514..1bead36e26 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/52/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/52/expected.json @@ -56,9 +56,11 @@ "column": 6 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/522/expected.json b/packages/babylon/test/fixtures/core/uncategorised/522/expected.json new file mode 100644 index 0000000000..45739cd1a5 --- /dev/null +++ b/packages/babylon/test/fixtures/core/uncategorised/522/expected.json @@ -0,0 +1,270 @@ +{ + "type": "File", + "start": 0, + "end": 69, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 69 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 69, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 69 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 13, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "id": { + "type": "Identifier", + "start": 22, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "name": "foo" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 27, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "body": [], + "directives": [ + { + "type": "Directive", + "start": 28, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 28, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + }, + { + "type": "FunctionDeclaration", + "start": 42, + "end": 69, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 69 + } + }, + "id": { + "type": "Identifier", + "start": 51, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 51 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "name": "bar" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 56, + "end": 69, + "loc": { + "start": { + "line": 1, + "column": 56 + }, + "end": { + "line": 1, + "column": 69 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 57, + "end": 68, + "loc": { + "start": { + "line": 1, + "column": 57 + }, + "end": { + "line": 1, + "column": 68 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 61, + "end": 68, + "loc": { + "start": { + "line": 1, + "column": 61 + }, + "end": { + "line": 1, + "column": 68 + } + }, + "id": { + "type": "Identifier", + "start": 61, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 61 + }, + "end": { + "line": 1, + "column": 62 + } + }, + "name": "v" + }, + "init": { + "type": "NumberLiteral", + "start": 65, + "end": 68, + "loc": { + "start": { + "line": 1, + "column": 65 + }, + "end": { + "line": 1, + "column": 68 + } + }, + "value": 13, + "rawValue": 13, + "raw": "015" + } + } + ], + "kind": "var" + } + ], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/527/expected.json b/packages/babylon/test/fixtures/core/uncategorised/527/expected.json index 966e0d2d6f..719450f6db 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/527/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/527/expected.json @@ -87,14 +87,17 @@ "column": 10 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/528/expected.json b/packages/babylon/test/fixtures/core/uncategorised/528/expected.json index fc6d35a712..d67d0ff9c0 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/528/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/528/expected.json @@ -87,9 +87,11 @@ "column": 13 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, { @@ -136,14 +138,17 @@ "column": 29 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/529/expected.json b/packages/babylon/test/fixtures/core/uncategorised/529/expected.json index bd5767e5df..97407a93a7 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/529/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/529/expected.json @@ -87,9 +87,11 @@ "column": 10 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -136,9 +138,11 @@ "column": 17 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -185,14 +189,17 @@ "column": 27 } }, - "value": 1977, - "rawValue": 1977, - "raw": "1977" + "extra": { + "rawValue": 1977, + "raw": "1977" + }, + "value": 1977 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/53/expected.json b/packages/babylon/test/fixtures/core/uncategorised/53/expected.json index 3b798c3d36..5ae353a2f6 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/53/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/53/expected.json @@ -56,9 +56,11 @@ "column": 6 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/530/expected.json b/packages/babylon/test/fixtures/core/uncategorised/530/expected.json index e10d00d731..c6da62d7c5 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/530/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/530/expected.json @@ -101,9 +101,11 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], @@ -127,6 +129,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/531/expected.json b/packages/babylon/test/fixtures/core/uncategorised/531/expected.json index 3d38c67b22..161b25fb1e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/531/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/531/expected.json @@ -101,9 +101,11 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, { @@ -150,9 +152,11 @@ "column": 20 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -176,6 +180,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/533/expected.json b/packages/babylon/test/fixtures/core/uncategorised/533/expected.json index dcf8a26650..4069780390 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/533/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/533/expected.json @@ -87,14 +87,17 @@ "column": 12 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "const" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/534/expected.json b/packages/babylon/test/fixtures/core/uncategorised/534/expected.json index 3a6addea10..a000184562 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/534/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/534/expected.json @@ -87,9 +87,11 @@ "column": 15 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, { @@ -136,14 +138,17 @@ "column": 31 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "const" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/535/expected.json b/packages/babylon/test/fixtures/core/uncategorised/535/expected.json index 15ba33cd4d..a40092b09d 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/535/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/535/expected.json @@ -87,9 +87,11 @@ "column": 12 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -136,9 +138,11 @@ "column": 19 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -185,14 +189,17 @@ "column": 29 } }, - "value": 1977, - "rawValue": 1977, - "raw": "1977" + "extra": { + "rawValue": 1977, + "raw": "1977" + }, + "value": 1977 } } ], "kind": "const" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/537/expected.json b/packages/babylon/test/fixtures/core/uncategorised/537/expected.json index 50fd4d6345..7ffb7b7416 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/537/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/537/expected.json @@ -101,9 +101,11 @@ "column": 15 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], @@ -127,6 +129,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/538/expected.json b/packages/babylon/test/fixtures/core/uncategorised/538/expected.json index d17094a6c6..5ba1ffd3fa 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/538/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/538/expected.json @@ -57,14 +57,29 @@ "line": 1, "column": 4 } - }, - "range": [ - 0, - 4 - ] + } } ] } - ] - } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": "", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/54/expected.json b/packages/babylon/test/fixtures/core/uncategorised/54/expected.json index 526710b150..b94af6a6f3 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/54/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/54/expected.json @@ -56,9 +56,11 @@ "column": 2 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 1, "column": 15 } - }, - "range": [ - 0, - 15 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 1, "column": 15 } - }, - "range": [ - 0, - 15 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/540/expected.json b/packages/babylon/test/fixtures/core/uncategorised/540/expected.json index 3b9f0e4448..5b46bc550d 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/540/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/540/expected.json @@ -88,7 +88,8 @@ "column": 15 } }, - "body": [] + "body": [], + "directives": [] } }, "operator": "/", @@ -106,13 +107,18 @@ "column": 19 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/541/expected.json b/packages/babylon/test/fixtures/core/uncategorised/541/expected.json index 93d8cd375b..f73e4e6988 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/541/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/541/expected.json @@ -75,7 +75,8 @@ "column": 15 } }, - "body": [] + "body": [], + "directives": [] } }, { @@ -106,11 +107,14 @@ "column": 21 } }, - "raw": "/ 1 /", + "extra": { + "raw": "/ 1 /" + }, "pattern": " 1 ", "flags": "" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/55/expected.json b/packages/babylon/test/fixtures/core/uncategorised/55/expected.json index b400dbe706..e8663de8a9 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/55/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/55/expected.json @@ -56,9 +56,11 @@ "column": 2 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null, "trailingComments": null }, @@ -77,15 +79,12 @@ "line": 1, "column": 18 } - }, - "range": [ - 3, - 18 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -102,11 +101,7 @@ "line": 1, "column": 18 } - }, - "range": [ - 3, - 18 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/56/expected.json b/packages/babylon/test/fixtures/core/uncategorised/56/expected.json index 337ed51862..8ba4e0ec1b 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/56/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/56/expected.json @@ -56,9 +56,11 @@ "column": 2 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 1, "column": 16 } - }, - "range": [ - 0, - 16 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 1, "column": 16 } - }, - "range": [ - 0, - 16 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/57/expected.json b/packages/babylon/test/fixtures/core/uncategorised/57/expected.json index 0966e60e5c..df3b3c2419 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/57/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/57/expected.json @@ -28,6 +28,7 @@ }, "sourceType": "script", "body": [], + "directives": [], "leadingComments": null, "innerComments": [ { @@ -44,12 +45,26 @@ "line": 1, "column": 16 } - }, - "range": [ - 0, - 16 - ] + } } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " Hello, world!", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/58/expected.json b/packages/babylon/test/fixtures/core/uncategorised/58/expected.json index fe87c3c143..b932885f57 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/58/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/58/expected.json @@ -28,6 +28,7 @@ }, "sourceType": "script", "body": [], + "directives": [], "leadingComments": null, "innerComments": [ { @@ -44,12 +45,26 @@ "line": 1, "column": 16 } - }, - "range": [ - 0, - 16 - ] + } } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " Hallo, world!", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/59/expected.json b/packages/babylon/test/fixtures/core/uncategorised/59/expected.json index 4ab335adab..87f7fb03ef 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/59/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/59/expected.json @@ -56,9 +56,11 @@ "column": 2 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 1, "column": 2 } - }, - "range": [ - 0, - 2 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 1, "column": 2 } - }, - "range": [ - 0, - 2 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/6/expected.json b/packages/babylon/test/fixtures/core/uncategorised/6/expected.json index deaf7c1729..44268abd43 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/6/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/6/expected.json @@ -84,9 +84,11 @@ "column": 2 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "operator": "+", "right": { @@ -103,11 +105,15 @@ "column": 6 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "operator": "*", "right": { @@ -124,12 +130,15 @@ "column": 12 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/60/expected.json b/packages/babylon/test/fixtures/core/uncategorised/60/expected.json index 665ffa4700..b58673ec8e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/60/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/60/expected.json @@ -28,6 +28,7 @@ }, "sourceType": "script", "body": [], + "directives": [], "leadingComments": null, "innerComments": [ { @@ -44,12 +45,26 @@ "line": 1, "column": 2 } - }, - "range": [ - 0, - 2 - ] + } } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": "", + "start": 0, + "end": 2, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/61/expected.json b/packages/babylon/test/fixtures/core/uncategorised/61/expected.json index 665ffa4700..b58673ec8e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/61/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/61/expected.json @@ -28,6 +28,7 @@ }, "sourceType": "script", "body": [], + "directives": [], "leadingComments": null, "innerComments": [ { @@ -44,12 +45,26 @@ "line": 1, "column": 2 } - }, - "range": [ - 0, - 2 - ] + } } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": "", + "start": 0, + "end": 2, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/62/expected.json b/packages/babylon/test/fixtures/core/uncategorised/62/expected.json index 3b0389e5d0..2cf6359c5d 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/62/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/62/expected.json @@ -56,9 +56,11 @@ "column": 6 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 1, "column": 4 } - }, - "range": [ - 0, - 4 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 1, "column": 4 } - }, - "range": [ - 0, - 4 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/63/expected.json b/packages/babylon/test/fixtures/core/uncategorised/63/expected.json index 291f749462..ddafd34d4b 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/63/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/63/expected.json @@ -56,9 +56,11 @@ "column": 2 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,11 +78,7 @@ "line": 1, "column": 16 } - }, - "range": [ - 0, - 16 - ] + } }, { "type": "CommentLine", @@ -96,15 +94,12 @@ "line": 3, "column": 18 } - }, - "range": [ - 18, - 36 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -121,11 +116,7 @@ "line": 1, "column": 16 } - }, - "range": [ - 0, - 16 - ] + } }, { "type": "CommentLine", @@ -141,11 +132,7 @@ "line": 3, "column": 18 } - }, - "range": [ - 18, - 36 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/64/expected.json b/packages/babylon/test/fixtures/core/uncategorised/64/expected.json index 4b8b974f5f..417e718ef6 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/64/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/64/expected.json @@ -136,18 +136,34 @@ "line": 1, "column": 24 } - }, - "range": [ - 9, - 24 - ] + } } ] } - ] + ], + "directives": [] }, "alternate": null } - ] - } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": " Some comment", + "start": 9, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 24 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/65/expected.json b/packages/babylon/test/fixtures/core/uncategorised/65/expected.json index 2d16fc17b9..346b21d465 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/65/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/65/expected.json @@ -137,11 +137,7 @@ "line": 1, "column": 40 } - }, - "range": [ - 27, - 40 - ] + } } ] } @@ -160,14 +156,17 @@ "column": 25 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -184,11 +183,7 @@ "line": 1, "column": 40 } - }, - "range": [ - 27, - 40 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/66/expected.json b/packages/babylon/test/fixtures/core/uncategorised/66/expected.json index ee7c3c8a44..d50639ea1d 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/66/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/66/expected.json @@ -56,11 +56,14 @@ "column": 1 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/67/expected.json b/packages/babylon/test/fixtures/core/uncategorised/67/expected.json index 4e90f25295..7bbd5d6e04 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/67/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/67/expected.json @@ -56,11 +56,14 @@ "column": 1 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/68/expected.json b/packages/babylon/test/fixtures/core/uncategorised/68/expected.json index 5c479ec64e..31f49f4d54 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/68/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/68/expected.json @@ -56,11 +56,14 @@ "column": 1 } }, - "value": 5, - "rawValue": 5, - "raw": "5" + "extra": { + "rawValue": 5, + "raw": "5" + }, + "value": 5 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/69/expected.json b/packages/babylon/test/fixtures/core/uncategorised/69/expected.json index 674c028642..d507dabac4 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/69/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/69/expected.json @@ -56,11 +56,14 @@ "column": 2 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/70/expected.json b/packages/babylon/test/fixtures/core/uncategorised/70/expected.json index d8fd4c0959..bc9495e7c4 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/70/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/70/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0.14, - "rawValue": 0.14, - "raw": ".14" + "extra": { + "rawValue": 0.14, + "raw": ".14" + }, + "value": 0.14 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/71/expected.json b/packages/babylon/test/fixtures/core/uncategorised/71/expected.json index c65f80bc71..f0d5e69680 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/71/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/71/expected.json @@ -56,11 +56,14 @@ "column": 7 } }, - "value": 3.14159, - "rawValue": 3.14159, - "raw": "3.14159" + "extra": { + "rawValue": 3.14159, + "raw": "3.14159" + }, + "value": 3.14159 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/72/expected.json b/packages/babylon/test/fixtures/core/uncategorised/72/expected.json index 6c9bd55f71..c60b1b41f8 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/72/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/72/expected.json @@ -56,11 +56,14 @@ "column": 14 } }, - "value": 6.02214179e+23, - "rawValue": 6.02214179e+23, - "raw": "6.02214179e+23" + "extra": { + "rawValue": 6.02214179e+23, + "raw": "6.02214179e+23" + }, + "value": 6.02214179e+23 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/73/expected.json b/packages/babylon/test/fixtures/core/uncategorised/73/expected.json index 8aa93e63cc..3c13fede57 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/73/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/73/expected.json @@ -56,11 +56,14 @@ "column": 15 } }, - "value": 1.49241783e-10, - "rawValue": 1.49241783e-10, - "raw": "1.492417830e-10" + "extra": { + "rawValue": 1.49241783e-10, + "raw": "1.492417830e-10" + }, + "value": 1.49241783e-10 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/74/expected.json b/packages/babylon/test/fixtures/core/uncategorised/74/expected.json index 532733a4dd..89c0277df0 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/74/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/74/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0x0" + "extra": { + "rawValue": 0, + "raw": "0x0" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/75/expected.json b/packages/babylon/test/fixtures/core/uncategorised/75/expected.json index 58b2f24c7a..ff1823f7ed 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/75/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/75/expected.json @@ -56,11 +56,14 @@ "column": 6 } }, - "value": 0, - "rawValue": 0, - "raw": "0e+100" + "extra": { + "rawValue": 0, + "raw": "0e+100" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/76/expected.json b/packages/babylon/test/fixtures/core/uncategorised/76/expected.json index ceaa8c3a17..6c610fe45d 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/76/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/76/expected.json @@ -56,11 +56,14 @@ "column": 5 } }, - "value": 2748, - "rawValue": 2748, - "raw": "0xabc" + "extra": { + "rawValue": 2748, + "raw": "0xabc" + }, + "value": 2748 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/77/expected.json b/packages/babylon/test/fixtures/core/uncategorised/77/expected.json index f80d7c9cd5..925c9bd4b5 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/77/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/77/expected.json @@ -56,11 +56,14 @@ "column": 5 } }, - "value": 3567, - "rawValue": 3567, - "raw": "0xdef" + "extra": { + "rawValue": 3567, + "raw": "0xdef" + }, + "value": 3567 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/78/expected.json b/packages/babylon/test/fixtures/core/uncategorised/78/expected.json index 75950798ba..b22782d94a 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/78/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/78/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 26, - "rawValue": 26, - "raw": "0X1A" + "extra": { + "rawValue": 26, + "raw": "0X1A" + }, + "value": 26 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/79/expected.json b/packages/babylon/test/fixtures/core/uncategorised/79/expected.json index 3ec2521ed5..f5b4ed8462 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/79/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/79/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 16, - "rawValue": 16, - "raw": "0x10" + "extra": { + "rawValue": 16, + "raw": "0x10" + }, + "value": 16 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/80/expected.json b/packages/babylon/test/fixtures/core/uncategorised/80/expected.json index c9510f36fa..f677a72fed 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/80/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/80/expected.json @@ -56,11 +56,14 @@ "column": 5 } }, - "value": 256, - "rawValue": 256, - "raw": "0x100" + "extra": { + "rawValue": 256, + "raw": "0x100" + }, + "value": 256 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/81/expected.json b/packages/babylon/test/fixtures/core/uncategorised/81/expected.json index dd38ee8475..0ad2ff57eb 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/81/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/81/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 4, - "rawValue": 4, - "raw": "0X04" + "extra": { + "rawValue": 4, + "raw": "0X04" + }, + "value": 4 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/82/expected.json b/packages/babylon/test/fixtures/core/uncategorised/82/expected.json index e4985f2b1e..eb09e24858 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/82/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/82/expected.json @@ -56,11 +56,14 @@ "column": 2 } }, - "value": 2, - "rawValue": 2, - "raw": "02" + "extra": { + "rawValue": 2, + "raw": "02" + }, + "value": 2 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/83/expected.json b/packages/babylon/test/fixtures/core/uncategorised/83/expected.json index 8bb1dbdaf8..00009bf130 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/83/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/83/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 10, - "rawValue": 10, - "raw": "012" + "extra": { + "rawValue": 10, + "raw": "012" + }, + "value": 10 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/84/expected.json b/packages/babylon/test/fixtures/core/uncategorised/84/expected.json index 74b4910c7c..febf934ba3 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/84/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/84/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 10, - "rawValue": 10, - "raw": "0012" + "extra": { + "rawValue": 10, + "raw": "0012" + }, + "value": 10 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/85/expected.json b/packages/babylon/test/fixtures/core/uncategorised/85/expected.json index 75243c6d6a..22a0530be4 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/85/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/85/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 7, "loc": { @@ -42,8 +43,8 @@ "column": 7 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 7, "loc": { @@ -57,8 +58,10 @@ } }, "value": "Hello", - "rawValue": "Hello", - "raw": "\"Hello\"" + "extra": { + "raw": "\"Hello\"", + "rawValue": "Hello" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/86/expected.json b/packages/babylon/test/fixtures/core/uncategorised/86/expected.json index db9d18218f..787fa60c46 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/86/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/86/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 22, "loc": { @@ -42,8 +43,8 @@ "column": 22 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 22, "loc": { @@ -56,9 +57,11 @@ "column": 22 } }, - "value": "\n\r\t\u000b\b\f\\'\"\u0000", - "rawValue": "\n\r\t\u000b\b\f\\'\"\u0000", - "raw": "\"\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0\"" + "value": "\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0", + "extra": { + "raw": "\"\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0\"", + "rawValue": "\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/87/expected.json b/packages/babylon/test/fixtures/core/uncategorised/87/expected.json index 21ac4d0633..34b6834ba8 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/87/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/87/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 8, "loc": { @@ -42,8 +43,8 @@ "column": 8 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 8, "loc": { @@ -56,9 +57,11 @@ "column": 8 } }, - "value": "a", - "rawValue": "a", - "raw": "\"\\u0061\"" + "value": "\\u0061", + "extra": { + "raw": "\"\\u0061\"", + "rawValue": "\\u0061" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/88/expected.json b/packages/babylon/test/fixtures/core/uncategorised/88/expected.json index d98bbbf345..969ab3928a 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/88/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/88/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 6, "loc": { @@ -42,8 +43,8 @@ "column": 6 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 6, "loc": { @@ -56,9 +57,11 @@ "column": 6 } }, - "value": "a", - "rawValue": "a", - "raw": "\"\\x61\"" + "value": "\\x61", + "extra": { + "raw": "\"\\x61\"", + "rawValue": "\\x61" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/89/expected.json b/packages/babylon/test/fixtures/core/uncategorised/89/expected.json index fb56f80c47..e805ca1d52 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/89/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/89/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 14, "loc": { @@ -42,8 +43,8 @@ "column": 14 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 14, "loc": { @@ -56,9 +57,11 @@ "column": 14 } }, - "value": "Hello\nworld", - "rawValue": "Hello\nworld", - "raw": "\"Hello\\nworld\"" + "value": "Hello\\nworld", + "extra": { + "raw": "\"Hello\\nworld\"", + "rawValue": "Hello\\nworld" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/9/expected.json b/packages/babylon/test/fixtures/core/uncategorised/9/expected.json index bd8886934c..be72c57c4e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/9/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/9/expected.json @@ -102,14 +102,17 @@ "column": 8 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } ] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/90/expected.json b/packages/babylon/test/fixtures/core/uncategorised/90/expected.json index 4b7d0df83e..4b1cc3a85b 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/90/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/90/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 14, "loc": { @@ -42,8 +43,8 @@ "column": 6 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 14, "loc": { @@ -56,9 +57,11 @@ "column": 6 } }, - "value": "Helloworld", - "rawValue": "Helloworld", - "raw": "\"Hello\\\nworld\"" + "value": "Hello\\\nworld", + "extra": { + "raw": "\"Hello\\\nworld\"", + "rawValue": "Hello\\\nworld" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/91/expected.json b/packages/babylon/test/fixtures/core/uncategorised/91/expected.json index 7f2af71438..dd074ebc9d 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/91/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/91/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 15, "loc": { @@ -42,8 +43,8 @@ "column": 15 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 15, "loc": { @@ -56,9 +57,11 @@ "column": 15 } }, - "value": "Hello\u0002World", - "rawValue": "Hello\u0002World", - "raw": "\"Hello\\02World\"" + "value": "Hello\\02World", + "extra": { + "raw": "\"Hello\\02World\"", + "rawValue": "Hello\\02World" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/92/expected.json b/packages/babylon/test/fixtures/core/uncategorised/92/expected.json index 36c8089dfa..48febf1933 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/92/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/92/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 16, "loc": { @@ -42,8 +43,8 @@ "column": 16 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 16, "loc": { @@ -56,9 +57,11 @@ "column": 16 } }, - "value": "Hello\nWorld", - "rawValue": "Hello\nWorld", - "raw": "\"Hello\\012World\"" + "value": "Hello\\012World", + "extra": { + "raw": "\"Hello\\012World\"", + "rawValue": "Hello\\012World" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/93/expected.json b/packages/babylon/test/fixtures/core/uncategorised/93/expected.json index 73355963c0..62ede0ff69 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/93/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/93/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 16, "loc": { @@ -42,8 +43,8 @@ "column": 16 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 16, "loc": { @@ -56,9 +57,11 @@ "column": 16 } }, - "value": "HelloRWorld", - "rawValue": "HelloRWorld", - "raw": "\"Hello\\122World\"" + "value": "Hello\\122World", + "extra": { + "raw": "\"Hello\\122World\"", + "rawValue": "Hello\\122World" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/94/expected.json b/packages/babylon/test/fixtures/core/uncategorised/94/expected.json index 7fa2454d0e..2b85f61032 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/94/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/94/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 17, "loc": { @@ -42,8 +43,8 @@ "column": 17 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 17, "loc": { @@ -56,9 +57,11 @@ "column": 17 } }, - "value": "Hello\n2World", - "rawValue": "Hello\n2World", - "raw": "\"Hello\\0122World\"" + "value": "Hello\\0122World", + "extra": { + "raw": "\"Hello\\0122World\"", + "rawValue": "Hello\\0122World" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/95/expected.json b/packages/babylon/test/fixtures/core/uncategorised/95/expected.json index f76c3f06ba..0766d1fb0a 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/95/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/95/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 16, "loc": { @@ -42,8 +43,8 @@ "column": 16 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 16, "loc": { @@ -56,9 +57,11 @@ "column": 16 } }, - "value": "HelloÊWorld", - "rawValue": "HelloÊWorld", - "raw": "\"Hello\\312World\"" + "value": "Hello\\312World", + "extra": { + "raw": "\"Hello\\312World\"", + "rawValue": "Hello\\312World" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/96/expected.json b/packages/babylon/test/fixtures/core/uncategorised/96/expected.json index e3c5d34073..1642f0daa1 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/96/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/96/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 16, "loc": { @@ -42,8 +43,8 @@ "column": 16 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 16, "loc": { @@ -56,9 +57,11 @@ "column": 16 } }, - "value": "Hello!2World", - "rawValue": "Hello!2World", - "raw": "\"Hello\\412World\"" + "value": "Hello\\412World", + "extra": { + "raw": "\"Hello\\412World\"", + "rawValue": "Hello\\412World" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/97/expected.json b/packages/babylon/test/fixtures/core/uncategorised/97/expected.json index 313e3477d2..6d7ce11c6a 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/97/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/97/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 16, "loc": { @@ -42,8 +43,8 @@ "column": 16 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 16, "loc": { @@ -56,9 +57,11 @@ "column": 16 } }, - "value": "Hello812World", - "rawValue": "Hello812World", - "raw": "\"Hello\\812World\"" + "value": "Hello\\812World", + "extra": { + "raw": "\"Hello\\812World\"", + "rawValue": "Hello\\812World" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/98/expected.json b/packages/babylon/test/fixtures/core/uncategorised/98/expected.json index ec00b5c923..f68c0082fd 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/98/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/98/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 16, "loc": { @@ -42,8 +43,8 @@ "column": 16 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 16, "loc": { @@ -56,9 +57,11 @@ "column": 16 } }, - "value": "Hello92World", - "rawValue": "Hello92World", - "raw": "\"Hello\\712World\"" + "value": "Hello\\712World", + "extra": { + "raw": "\"Hello\\712World\"", + "rawValue": "Hello\\712World" + } } } ] diff --git a/packages/babylon/test/fixtures/core/uncategorised/99/expected.json b/packages/babylon/test/fixtures/core/uncategorised/99/expected.json index bdb5012bd7..a93ba04dd0 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/99/expected.json +++ b/packages/babylon/test/fixtures/core/uncategorised/99/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 14, "loc": { @@ -42,8 +43,8 @@ "column": 14 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 14, "loc": { @@ -56,9 +57,11 @@ "column": 14 } }, - "value": "Hello\u0000World", - "rawValue": "Hello\u0000World", - "raw": "\"Hello\\0World\"" + "value": "Hello\\0World", + "extra": { + "raw": "\"Hello\\0World\"", + "rawValue": "Hello\\0World" + } } } ] diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/expected.json index bfca2ac2a5..b80d317427 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/expected.json @@ -91,18 +91,15 @@ "line": 1, "column": 19 } - }, - "range": [ - 6, - 19 - ] + } } ] } ], "kind": "var" } - ] + ], + "directives": [] }, "comments": [ { @@ -119,11 +116,7 @@ "line": 1, "column": 19 } - }, - "range": [ - 6, - 19 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json index b3c4b6a133..607612e873 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json @@ -102,9 +102,11 @@ "column": 12 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -151,9 +153,11 @@ "column": 19 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } ], @@ -190,8 +194,10 @@ "name": "z" } } - ] + ], + "directives": [] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json index 253be28d97..1c02f6ef66 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -122,9 +120,11 @@ "name": "there" } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json index 567f02ad8f..675fe056a3 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -106,11 +104,7 @@ "line": 1, "column": 34 } - }, - "range": [ - 24, - 34 - ] + } } ] }, @@ -160,18 +154,16 @@ "line": 1, "column": 34 } - }, - "range": [ - 24, - 34 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 1, "column": 34 } - }, - "range": [ - 24, - 34 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json index b094efe11f..dfef6b5c50 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -106,11 +104,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 24, - 47 - ] + } } ] }, @@ -160,18 +154,16 @@ "line": 2, "column": 10 } - }, - "range": [ - 24, - 47 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 24, - 47 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json index be91d94441..2b8d9fef9f 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -122,9 +120,11 @@ "name": "there" } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json index 2fc3f311ee..21c911cbbc 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -106,11 +104,7 @@ "line": 1, "column": 31 } - }, - "range": [ - 21, - 31 - ] + } } ] }, @@ -160,18 +154,16 @@ "line": 1, "column": 31 } - }, - "range": [ - 21, - 31 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 1, "column": 31 } - }, - "range": [ - 21, - 31 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json index 6720b43723..55ac6a29a8 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -106,11 +104,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 21, - 44 - ] + } } ] }, @@ -160,18 +154,16 @@ "line": 2, "column": 10 } - }, - "range": [ - 21, - 44 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 21, - 44 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json index 9098864a2b..7d4c8d5bb6 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json @@ -122,11 +122,15 @@ "name": "x" } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json index 8c387c91d1..f0cf8a4b53 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json @@ -106,11 +106,7 @@ "line": 1, "column": 30 } - }, - "range": [ - 20, - 30 - ] + } } ] }, @@ -160,20 +156,20 @@ "line": 1, "column": 30 } - }, - "range": [ - 20, - 30 - ] + } } ] } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] }, "comments": [ { @@ -190,11 +186,7 @@ "line": 1, "column": 30 } - }, - "range": [ - 20, - 30 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json index 2eb4083a3c..975bfdf605 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json @@ -106,11 +106,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 19, - 42 - ] + } } ] }, @@ -160,20 +156,20 @@ "line": 2, "column": 10 } - }, - "range": [ - 19, - 42 - ] + } } ] } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] }, "comments": [ { @@ -190,11 +186,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 19, - 42 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json index 59760cfccf..1340d70360 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json @@ -90,11 +90,7 @@ "line": 1, "column": 23 } - }, - "range": [ - 13, - 23 - ] + } } ] }, @@ -144,17 +140,15 @@ "line": 1, "column": 23 } - }, - "range": [ - 13, - 23 - ] + } } ] } - ] + ], + "directives": [] } - ] + ], + "directives": [] }, "comments": [ { @@ -171,11 +165,7 @@ "line": 1, "column": 23 } - }, - "range": [ - 13, - 23 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json index 316c90a92c..fcf481f414 100644 --- a/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json +++ b/packages/babylon/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json @@ -90,11 +90,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 13, - 36 - ] + } } ] }, @@ -144,17 +140,15 @@ "line": 2, "column": 10 } - }, - "range": [ - 13, - 36 - ] + } } ] } - ] + ], + "directives": [] } - ] + ], + "directives": [] }, "comments": [ { @@ -171,11 +165,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 13, - 36 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0000/expected.json index dcf8a26650..4069780390 100644 --- a/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0000/expected.json @@ -87,14 +87,17 @@ "column": 12 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "const" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0001/expected.json index 8b63e6bb33..b6f5990bca 100644 --- a/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0001/expected.json @@ -102,16 +102,20 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "const" } - ] + ], + "directives": [] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0002/expected.json index 55718cfc43..4618734fda 100644 --- a/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/declaration-const/migrated_0002/expected.json @@ -102,9 +102,11 @@ "column": 14 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -151,9 +153,11 @@ "column": 21 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -200,16 +204,20 @@ "column": 31 } }, - "value": 1977, - "rawValue": 1977, - "raw": "1977" + "extra": { + "rawValue": 1977, + "raw": "1977" + }, + "value": 1977 } } ], "kind": "const" } - ] + ], + "directives": [] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/declaration-function/dupe-param/expected.json b/packages/babylon/test/fixtures/esprima/declaration-function/dupe-param/expected.json new file mode 100644 index 0000000000..80306b8cba --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/declaration-function/dupe-param/expected.json @@ -0,0 +1,151 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "name": "x" + }, + { + "type": "Identifier", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "name": "x" + } + ], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "body": [], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/declaration-function/empty-param/expected.json b/packages/babylon/test/fixtures/esprima/declaration-function/empty-param/expected.json index 959d6454f7..554eee01b4 100644 --- a/packages/babylon/test/fixtures/esprima/declaration-function/empty-param/expected.json +++ b/packages/babylon/test/fixtures/esprima/declaration-function/empty-param/expected.json @@ -108,9 +108,10 @@ "column": 34 } }, - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 20, "end": 33, "loc": { @@ -123,8 +124,8 @@ "column": 33 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 20, "end": 32, "loc": { @@ -138,13 +139,16 @@ } }, "value": "use strict", - "rawValue": "use strict", - "raw": "'use strict'" + "extra": { + "raw": "'use strict'", + "rawValue": "use strict" + } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0004/expected.json b/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0004/expected.json index 246b6b5a20..a9c517251e 100644 --- a/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0004/expected.json +++ b/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0004/expected.json @@ -122,11 +122,15 @@ "column": 24 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0005/expected.json b/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0005/expected.json index f5013969f2..5924cefb02 100644 --- a/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0005/expected.json +++ b/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0005/expected.json @@ -123,9 +123,10 @@ "column": 51 } }, - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 37, "end": 49, "loc": { @@ -138,8 +139,8 @@ "column": 49 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 37, "end": 49, "loc": { @@ -153,16 +154,20 @@ } }, "value": "use strict", - "rawValue": "use strict", - "raw": "\"use strict\"" + "extra": { + "raw": "\"use strict\"", + "rawValue": "use strict" + } } } ] } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0012/expected.json b/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0012/expected.json index 4841a07e51..fac0f4b32c 100644 --- a/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0012/expected.json +++ b/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0012/expected.json @@ -74,11 +74,15 @@ "column": 13 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0014/expected.json b/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0014/expected.json index 13d9c39d33..b4d8d83676 100644 --- a/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0014/expected.json +++ b/packages/babylon/test/fixtures/esprima/declaration-function/migrated_0014/expected.json @@ -118,9 +118,11 @@ "column": 30 } }, - "value": "use strict", - "rawValue": "use strict", - "raw": "\"use strict\"" + "extra": { + "rawValue": "use strict", + "raw": "\"use strict\"" + }, + "value": "use strict" }, "operator": "+", "right": { @@ -137,15 +139,19 @@ "column": 35 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/declaration-let/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/declaration-let/migrated_0002/expected.json index d6c387f1cf..8e0f3eda0b 100644 --- a/packages/babylon/test/fixtures/esprima/declaration-let/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/declaration-let/migrated_0002/expected.json @@ -102,16 +102,20 @@ "column": 12 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "let" } - ] + ], + "directives": [] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/declaration-let/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/declaration-let/migrated_0003/expected.json index 4159969a48..a64ced02ce 100644 --- a/packages/babylon/test/fixtures/esprima/declaration-let/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/declaration-let/migrated_0003/expected.json @@ -102,9 +102,11 @@ "column": 12 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -151,9 +153,11 @@ "column": 19 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -200,16 +204,20 @@ "column": 29 } }, - "value": 1977, - "rawValue": 1977, - "raw": "1977" + "extra": { + "rawValue": 1977, + "raw": "1977" + }, + "value": 1977 } } ], "kind": "let" } - ] + ], + "directives": [] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json index c18fa769b5..c6d4b5de2b 100644 --- a/packages/babylon/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json @@ -89,39 +89,6 @@ } }, "body": [ - { - "type": "ExpressionStatement", - "start": 15, - "end": 31, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 31 - } - }, - "expression": { - "type": "StringLiteral", - "start": 15, - "end": 30, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 30 - } - }, - "value": "use strict", - "rawValue": "use strict", - "raw": "'use\\x20strict'" - } - }, { "type": "WithStatement", "start": 32, @@ -168,13 +135,53 @@ } } } + ], + "directives": [ + { + "type": "Directive", + "start": 15, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 15, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": "use\\x20strict", + "extra": { + "raw": "'use\\x20strict'", + "rawValue": "use\\x20strict" + } + } + } ] } }, "arguments": [], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json index 32deb8d4e2..1acd32f8f8 100644 --- a/packages/babylon/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json @@ -89,39 +89,6 @@ } }, "body": [ - { - "type": "ExpressionStatement", - "start": 15, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "expression": { - "type": "StringLiteral", - "start": 15, - "end": 28, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 28 - } - }, - "value": "use\nstrict", - "rawValue": "use\nstrict", - "raw": "'use\\nstrict'" - } - }, { "type": "WithStatement", "start": 30, @@ -168,13 +135,53 @@ } } } + ], + "directives": [ + { + "type": "Directive", + "start": 15, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 15, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": "use\\nstrict", + "extra": { + "raw": "'use\\nstrict'", + "rawValue": "use\\nstrict" + } + } + } ] } }, "arguments": [], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json index a37dc71384..55e7cb964b 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json @@ -123,14 +123,17 @@ "column": 11 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } ] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json index 3952075405..1162212f88 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json @@ -124,12 +124,15 @@ "column": 10 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json index c80e27a7c8..c7416244d2 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json @@ -139,12 +139,15 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json index 11686156c6..bd5854bcd0 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json @@ -91,12 +91,15 @@ "column": 7 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json index 3f3f6aa64d..6eba052f46 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json @@ -94,12 +94,15 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/expected.json new file mode 100644 index 0000000000..65f0476c0e --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/expected.json @@ -0,0 +1,168 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 14, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "id": { + "type": "Identifier", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "ArrayPattern", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "elements": [ + { + "type": "Identifier", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "name": "a" + }, + { + "type": "Identifier", + "start": 28, + "end": 29, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "name": "a" + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 31, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/expected.json new file mode 100644 index 0000000000..3497e91ca6 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/expected.json @@ -0,0 +1,183 @@ +{ + "type": "File", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 14, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "id": { + "type": "Identifier", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "ArrayPattern", + "start": 25, + "end": 33, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "elements": [ + { + "type": "Identifier", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "name": "a" + }, + { + "type": "RestElement", + "start": 28, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "argument": { + "type": "Identifier", + "start": 31, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "name": "a" + } + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 34, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/expected.json new file mode 100644 index 0000000000..89963bdc09 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/expected.json @@ -0,0 +1,235 @@ +{ + "type": "File", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 14, + "end": 39, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "id": { + "type": "Identifier", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "ArrayPattern", + "start": 25, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 21 + } + }, + "elements": [ + { + "type": "ObjectPattern", + "start": 26, + "end": 29, + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "properties": [ + { + "type": "Property", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "name": "a" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "name": "a" + } + } + ] + }, + { + "type": "RestElement", + "start": 30, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "argument": { + "type": "Identifier", + "start": 33, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "name": "a" + } + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 36, + "end": 39, + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/elision/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/elision/expected.json index 13bbbbceac..f426e72528 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/elision/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/elision/expected.json @@ -104,14 +104,17 @@ "column": 12 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json index 2c1b12478e..821296cbdb 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json @@ -87,14 +87,17 @@ "column": 10 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/hole/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/hole/expected.json index 8dfe71997b..e267a31f66 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/hole/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/hole/expected.json @@ -121,14 +121,17 @@ "column": 12 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json index d06abc7113..59b556c0f5 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json @@ -104,14 +104,17 @@ "column": 10 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json index df31ae2fcd..16876bb02e 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json @@ -56,7 +56,8 @@ "column": 6 } }, - "body": [] + "body": [], + "directives": [] }, "handler": { "type": "CatchClause", @@ -262,9 +263,11 @@ "column": 29 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "kind": "init" @@ -346,9 +349,11 @@ "column": 38 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "kind": "init" @@ -453,12 +458,14 @@ "column": 49 } }, - "body": [] + "body": [], + "directives": [] } }, "guardedHandlers": [], "finalizer": null } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/rest/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/rest/expected.json index cb533f681d..18936fbfdf 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/rest/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/rest/expected.json @@ -119,14 +119,17 @@ "column": 14 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json index c2fa502238..ef275391a1 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json @@ -105,14 +105,17 @@ "column": 11 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json index 2726675278..acbfab9cf7 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json @@ -56,7 +56,8 @@ "column": 7 } }, - "body": [] + "body": [], + "directives": [] }, "handler": { "type": "CatchClause", @@ -131,9 +132,11 @@ "column": 21 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ] @@ -152,12 +155,14 @@ "column": 27 } }, - "body": [] + "body": [], + "directives": [] } }, "guardedHandlers": [], "finalizer": null } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json index 48546eeb6c..75d5b40cd2 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json @@ -120,9 +120,11 @@ "column": 15 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ] @@ -142,9 +144,11 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json index 982603fb4d..2d14e8848e 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json @@ -156,14 +156,17 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json index 6e488ff2b1..64ca19741f 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json @@ -138,12 +138,15 @@ "column": 15 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json index 79abe75001..fa50513676 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json @@ -106,12 +106,15 @@ "column": 11 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json index 4ebe77e8fc..158f0af7b4 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:7)" + "throws": "Unexpected token (1:6)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json index ed4c1605fe..6b22652418 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json @@ -74,12 +74,15 @@ "column": 12 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json index c3e068731d..070478ffa3 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json @@ -91,12 +91,15 @@ "column": 11 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json index dc38971fa7..71885e218e 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json @@ -91,12 +91,15 @@ "column": 13 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json index 4bdd74c258..57366e881f 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json @@ -107,12 +107,15 @@ "column": 16 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json index ebd04a794b..a6acfabee4 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json @@ -120,15 +120,19 @@ "column": 9 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json index 7a3afe8bd4..fbd87bd0c4 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json @@ -139,17 +139,22 @@ "column": 20 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json index 287f532194..fe17cfad68 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json @@ -134,9 +134,11 @@ "column": 16 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, "label": { @@ -156,10 +158,12 @@ "name": "label" } } - ] + ], + "directives": [] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json index 9a918edee0..59f0dbf100 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json @@ -136,15 +136,19 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json index 8b3e1161d1..1d3eb7338f 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json @@ -104,9 +104,11 @@ "column": 4 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -160,6 +162,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json index 3351297bbe..b4e861da61 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json @@ -91,12 +91,15 @@ "column": 10 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json index cdb3afb5bc..f3bbc75306 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json @@ -91,12 +91,15 @@ "column": 15 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json index c40f9bbb31..98652468ab 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json @@ -91,12 +91,15 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "00" + "extra": { + "rawValue": 0, + "raw": "00" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json index 95224d5129..d4be8b7577 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json @@ -107,12 +107,15 @@ "column": 15 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json index 645860e175..8a08def13e 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json @@ -104,9 +104,11 @@ "column": 10 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } ], @@ -124,12 +126,15 @@ "column": 17 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json index fd39c13ced..b782563eff 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json @@ -120,9 +120,11 @@ "column": 13 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } ], @@ -140,12 +142,15 @@ "column": 20 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0015/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0015/expected.json index e81c37fc89..b565e367ee 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0015/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0015/expected.json @@ -93,9 +93,12 @@ }, "name": "x" }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json index 8368737c3f..3fc7b625b7 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json @@ -126,13 +126,16 @@ "column": 12 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json index 8a2ef02d21..7d5558cdaf 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json @@ -192,12 +192,17 @@ "name": "z" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json index 607cd3e194..8e5a64d7e3 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0b0" + "extra": { + "rawValue": 0, + "raw": "0b0" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json index 23356e76be..869a4573f6 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 1, - "rawValue": 1, - "raw": "0b1" + "extra": { + "rawValue": 1, + "raw": "0b1" + }, + "value": 1 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json index be3c47afa8..946f9be4db 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 2, - "rawValue": 2, - "raw": "0b10" + "extra": { + "rawValue": 2, + "raw": "0b10" + }, + "value": 2 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json index ae57cab25c..50c71c2d94 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0B0" + "extra": { + "rawValue": 0, + "raw": "0B0" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json index 4937dfc854..94253b3ff7 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 1, - "rawValue": 1, - "raw": "0B1" + "extra": { + "rawValue": 1, + "raw": "0B1" + }, + "value": 1 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json index e6cfe9f05a..5a539443cf 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 2, - "rawValue": 2, - "raw": "0B10" + "extra": { + "rawValue": 2, + "raw": "0B10" + }, + "value": 2 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0001/expected.json index 0f5ada00b1..de6307983c 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0001/expected.json @@ -72,9 +72,11 @@ "column": 17 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "body": { "type": "ClassBody", @@ -93,6 +95,7 @@ "body": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0016/expected.json b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0016/expected.json index 0048caa7d4..0ba4da86df 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0016/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0016/expected.json @@ -117,9 +117,11 @@ "column": 25 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "body": { "type": "ClassBody", @@ -142,6 +144,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0019/expected.json b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0019/expected.json index c7f6cadc22..d991009313 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0019/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0019/expected.json @@ -103,9 +103,11 @@ "column": 22 } }, - "value": "constructor", - "rawValue": "constructor", - "raw": "\"constructor\"" + "extra": { + "rawValue": "constructor", + "raw": "\"constructor\"" + }, + "value": "constructor" }, "static": false, "kind": "constructor", @@ -141,7 +143,8 @@ "column": 26 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -174,9 +177,11 @@ "column": 41 } }, - "value": "constructor", - "rawValue": "constructor", - "raw": "\"constructor\"" + "extra": { + "rawValue": "constructor", + "raw": "\"constructor\"" + }, + "value": "constructor" }, "static": false, "kind": "method", @@ -212,13 +217,15 @@ "column": 46 } }, - "body": [] + "body": [], + "directives": [] } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0021/expected.json b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0021/expected.json index 90ed6197ca..21d43a0b9f 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0021/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0021/expected.json @@ -103,9 +103,11 @@ "column": 28 } }, - "value": "prototype", - "rawValue": "prototype", - "raw": "\"prototype\"" + "extra": { + "rawValue": "prototype", + "raw": "\"prototype\"" + }, + "value": "prototype" }, "static": true, "kind": "method", @@ -141,13 +143,15 @@ "column": 33 } }, - "body": [] + "body": [], + "directives": [] } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0022/expected.json b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0022/expected.json index 5a08887ae2..0df98d2cb5 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0022/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0022/expected.json @@ -74,9 +74,12 @@ }, "body": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0023/expected.json b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0023/expected.json index daf97fa8cc..f639d9d497 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0023/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0023/expected.json @@ -89,9 +89,12 @@ }, "body": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0024/expected.json b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0024/expected.json index 0805cc723d..e85fb517b8 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0024/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0024/expected.json @@ -71,9 +71,11 @@ "column": 16 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "body": { "type": "ClassBody", @@ -91,9 +93,12 @@ }, "body": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0025/expected.json b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0025/expected.json index 6b475a1756..cf178864e7 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0025/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-class/migrated_0025/expected.json @@ -86,9 +86,11 @@ "column": 18 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "body": { "type": "ClassBody", @@ -106,9 +108,12 @@ }, "body": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json index 8f7d2304f4..3799c4ee35 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json @@ -135,9 +135,11 @@ "column": 18 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -155,11 +157,13 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json index beb32095e0..b922dc9f54 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json @@ -105,9 +105,11 @@ "column": 16 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -125,9 +127,11 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json index 133d3320bc..0fdbc8a52e 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json @@ -183,9 +183,11 @@ "column": 21 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -203,7 +205,8 @@ "column": 25 } }, - "body": [] + "body": [], + "directives": [] } }, "kind": "init" @@ -212,6 +215,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json index dcc67edb83..6079a74348 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json @@ -152,12 +152,15 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json index 734b745fab..b4dad85bbf 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json @@ -90,12 +90,15 @@ "column": 6 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json index efd854b233..95e743cb0f 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json @@ -130,9 +130,11 @@ "column": 7 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "computed": true } @@ -153,12 +155,15 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json index 63881f8131..a3b62d0ec1 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json @@ -132,9 +132,11 @@ "column": 6 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, { @@ -240,9 +242,11 @@ "column": 16 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "computed": true } @@ -282,12 +286,15 @@ "column": 24 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json index 72f41b4fa2..70b18e9e2e 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json @@ -185,14 +185,17 @@ "column": 8 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json index 17e17c57fe..5d3cc3bc51 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json @@ -104,12 +104,15 @@ "column": 7 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json index 100e7a3484..0b11316d47 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json @@ -87,13 +87,18 @@ "column": 7 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json index a140649c5e..e4d7cfd018 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json @@ -480,9 +480,11 @@ "column": 26 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "computed": true } @@ -544,12 +546,15 @@ "column": 50 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json index 17e21344b3..4521c6e3bf 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json @@ -556,13 +556,18 @@ "column": 5 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json index 49034362d5..4449de5650 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json @@ -103,15 +103,18 @@ "column": 20 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], "kind": "const" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json index 0d4410ae2e..c6453bfd9c 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "ClassExpression", + "type": "ClassDeclaration", "start": 15, "end": 23, "loc": { @@ -76,6 +76,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json index 79dccfed7b..e881a423f0 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json @@ -70,9 +70,11 @@ "column": 17 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "operator": "+", "right": { @@ -89,13 +91,18 @@ "column": 21 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json index be8795503e..364e85431c 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "FunctionExpression", + "type": "FunctionDeclaration", "start": 15, "end": 29, "loc": { @@ -74,10 +74,12 @@ "column": 29 } }, - "body": [] + "body": [], + "directives": [] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json index 440498ffc2..4758b655ec 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json @@ -56,11 +56,14 @@ "column": 17 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json index 44f93db202..5d9a5f6369 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json @@ -104,15 +104,18 @@ "column": 23 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "kind": "init" } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json index 5c1b86ad08..e3e870a7bf 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json @@ -56,11 +56,14 @@ "column": 19 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json index d87b9e3ad0..0a6a723e7b 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json @@ -106,11 +106,14 @@ "column": 27 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json index db67cc7139..466e385f0b 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json @@ -106,11 +106,14 @@ "column": 34 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json index 2cf90b4252..7ae9c17b81 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json @@ -106,11 +106,14 @@ "column": 30 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json index dace6e4467..65c0fa29ea 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json @@ -153,11 +153,14 @@ "column": 39 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json index a8b61d3f41..396665ef21 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json @@ -106,11 +106,14 @@ "column": 23 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json index 71f75f58fb..09fc23f85e 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json @@ -153,11 +153,14 @@ "column": 28 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json index c6b1bd5169..d9b4d3f5a5 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json @@ -91,7 +91,8 @@ "column": 25 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -123,11 +124,10 @@ "column": 31 } }, - "value": false, - "rawValue": false, - "raw": "false" + "value": false } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json index 5801f4b21d..b4302c2d1b 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json @@ -103,15 +103,18 @@ "column": 18 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], "kind": "let" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json index 9ebf178806..bca842d905 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json @@ -103,15 +103,18 @@ "column": 18 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], "kind": "var" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json index f038000230..b1904263e7 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json @@ -119,15 +119,19 @@ "column": 26 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json index 3dc0ce6afb..586f8e1856 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json @@ -119,15 +119,19 @@ "column": 25 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/expected.json index cc24e31b58..edd55ba2ea 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/expected.json @@ -106,11 +106,15 @@ "column": 19 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-params/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-params/expected.json index 0f53a4fd9c..dcddd48350 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-params/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-params/expected.json @@ -123,11 +123,15 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/expected.json index 4b28752a8f..15d56c524b 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/expected.json @@ -171,11 +171,15 @@ } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json index 273c61ba5e..6bc100acb2 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json @@ -118,17 +118,23 @@ "column": 22 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression/expected.json index ab58afaeee..9cb0b17ba1 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-expression/expected.json @@ -74,11 +74,15 @@ "column": 15 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json index d54bbc11a2..7c3e3bcb37 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json @@ -172,14 +172,18 @@ "column": 19 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json index 4085e3da1c..8b5ee65941 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json @@ -167,20 +167,26 @@ "column": 20 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } } - ] + ], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json index 1696922399..14d2a18a84 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json @@ -167,20 +167,26 @@ "column": 19 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } } - ] + ], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json index a207539d69..110cc9c9cb 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json @@ -184,19 +184,25 @@ "column": 3 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } - ] + ], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json index dd439657fc..c749a9dbaf 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json @@ -156,14 +156,18 @@ "argument": null } } - ] + ], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method/expected.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method/expected.json index ce2bcad3ea..a5bb9c44cb 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method/expected.json @@ -123,14 +123,18 @@ "column": 12 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-identifier/module_await/expected.json b/packages/babylon/test/fixtures/esprima/es2015-identifier/module_await/expected.json index eff37004fc..73b2c92bcd 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-identifier/module_await/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-identifier/module_await/expected.json @@ -87,12 +87,15 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-identifier/valid_await/expected.json b/packages/babylon/test/fixtures/esprima/es2015-identifier/valid_await/expected.json index 480b8d531d..26afe27079 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-identifier/valid_await/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-identifier/valid_await/expected.json @@ -107,9 +107,12 @@ } }, "name": "await", - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json index fd674134a4..918d5dc76f 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json @@ -136,11 +136,14 @@ "column": 28 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json index c83ff40f18..1481257a6e 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json @@ -120,11 +120,14 @@ "column": 31 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json index 073f43503c..90e760b5d0 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json @@ -105,11 +105,14 @@ "column": 34 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json index 691a530e45..68eab4b614 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json @@ -89,11 +89,14 @@ "column": 21 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json index 45b87643fb..d1465085b3 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json @@ -89,11 +89,14 @@ "column": 22 } }, - "value": "jquery", - "rawValue": "jquery", - "raw": "\"jquery\"" + "extra": { + "rawValue": "jquery", + "raw": "\"jquery\"" + }, + "value": "jquery" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json index 652a62b72a..1d1c75f23e 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json @@ -57,11 +57,14 @@ "column": 12 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json index 4198564920..158d42da07 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json @@ -105,11 +105,14 @@ "column": 30 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json index 197fd882b6..a3c950ab9c 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json @@ -152,11 +152,14 @@ "column": 35 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json index 45f291208c..92681f683c 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json @@ -57,11 +57,14 @@ "column": 20 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json index 5c0b3036c9..d328366be5 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json @@ -105,11 +105,14 @@ "column": 23 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json index 1dd153305f..fa924672aa 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json @@ -152,11 +152,14 @@ "column": 29 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json index afcf5e6751..4cffe066fd 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json @@ -152,11 +152,14 @@ "column": 28 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json index 7a3783c90d..cdb990cbdc 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json @@ -89,11 +89,14 @@ "column": 26 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json index 166aaf0ed8..378e45b83b 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json @@ -105,11 +105,14 @@ "column": 33 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json index e61945111a..2d90f27140 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json @@ -133,9 +133,11 @@ "column": 37 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], @@ -172,13 +174,16 @@ "column": 25 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json index 29fd63476c..e964b38846 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json @@ -119,9 +119,11 @@ "column": 14 } }, - "value": "method", - "rawValue": "method", - "raw": "'method'" + "extra": { + "rawValue": "method", + "raw": "'method'" + }, + "value": "method" }, "kind": "init", "value": { @@ -156,7 +158,8 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -164,6 +167,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/options.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/options.json index 7b7329bb7e..5c966843f4 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:30)" -} \ No newline at end of file + "throws": "Redefinition of __proto__ property (1:20)" +} diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/options.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/options.json index cbc444ce90..e19950ad14 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:32)" -} \ No newline at end of file + "throws": "Redefinition of __proto__ property (1:22)" +} diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/options.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/options.json index 0c5f4deed6..a8b5ad2f5b 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:24)" -} \ No newline at end of file + "throws": "Redefinition of __proto__ property (1:14)" +} diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/options.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/options.json index 00b62a33f8..a8b5ad2f5b 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:26)" -} \ No newline at end of file + "throws": "Redefinition of __proto__ property (1:14)" +} diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json index 0c5f4deed6..a8b5ad2f5b 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:24)" -} \ No newline at end of file + "throws": "Redefinition of __proto__ property (1:14)" +} diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json index e61c4bc6c6..370894461a 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json @@ -173,7 +173,8 @@ "column": 37 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -260,14 +261,18 @@ "column": 57 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json index 10aa2e429a..987143a14c 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json @@ -173,14 +173,18 @@ "column": 37 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json index fb0485d90d..63dc917941 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json @@ -173,14 +173,18 @@ "column": 33 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json index b112cc6b98..70085edf6a 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json @@ -190,14 +190,18 @@ "column": 38 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json index 3a347ec1c3..48f265cc99 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json @@ -88,9 +88,11 @@ "column": 14 } }, - "value": "__proto__", - "rawValue": "__proto__", - "raw": "\"__proto__\"" + "extra": { + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": "__proto__" }, "value": { "type": "NullLiteral", @@ -175,7 +177,8 @@ "column": 39 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -262,14 +265,18 @@ "column": 59 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json index ec071f8f38..c6bdefacea 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json @@ -88,9 +88,11 @@ "column": 14 } }, - "value": "__proto__", - "rawValue": "__proto__", - "raw": "\"__proto__\"" + "extra": { + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": "__proto__" }, "value": { "type": "NullLiteral", @@ -175,14 +177,18 @@ "column": 39 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json index a37ebb0e39..f414d0c2e1 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json @@ -88,9 +88,11 @@ "column": 14 } }, - "value": "__proto__", - "rawValue": "__proto__", - "raw": "\"__proto__\"" + "extra": { + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": "__proto__" }, "value": { "type": "NullLiteral", @@ -175,14 +177,18 @@ "column": 35 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json index 5300afd3aa..501fa19f68 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json @@ -88,9 +88,11 @@ "column": 14 } }, - "value": "__proto__", - "rawValue": "__proto__", - "raw": "\"__proto__\"" + "extra": { + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": "__proto__" }, "value": { "type": "NullLiteral", @@ -192,14 +194,18 @@ "column": 40 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/elision/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/elision/expected.json index 28f02d871c..6b892f7870 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/elision/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/elision/expected.json @@ -139,14 +139,17 @@ "column": 12 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json index dd2b8aee4b..25c24eb32b 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json @@ -106,9 +106,11 @@ "column": 16 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "body": { "type": "EmptyStatement", @@ -126,6 +128,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json index 194a2277c7..82ed2b843a 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json @@ -87,14 +87,17 @@ "column": 10 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json index cf2b1a4c73..c910a2d773 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json @@ -87,14 +87,17 @@ "column": 10 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/nested/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/nested/expected.json index bcf6c6414e..2b2774d691 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/nested/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/nested/expected.json @@ -139,14 +139,17 @@ "column": 14 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/properties/expected.json b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/properties/expected.json index e35d04f735..a7861a314f 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-object-pattern/properties/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-object-pattern/properties/expected.json @@ -201,9 +201,11 @@ "column": 10 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } }, @@ -335,9 +337,11 @@ "column": 20 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "kind": "init" @@ -426,14 +430,17 @@ "column": 31 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json index 1e3d179cd6..bcf619d9dd 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json @@ -56,11 +56,14 @@ "column": 2 } }, - "value": 0, - "rawValue": 0, - "raw": "00" + "extra": { + "rawValue": 0, + "raw": "00" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json index ccdde2fe5f..8a021344bb 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0o0" + "extra": { + "rawValue": 0, + "raw": "0o0" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json index b8fdcdd6b2..aa7e6a2f80 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json @@ -76,39 +76,6 @@ } }, "body": [ - { - "type": "ExpressionStatement", - "start": 17, - "end": 30, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 30 - } - }, - "expression": { - "type": "StringLiteral", - "start": 17, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "value": "use strict", - "rawValue": "use strict", - "raw": "'use strict'" - } - }, { "type": "ExpressionStatement", "start": 31, @@ -137,14 +104,54 @@ "column": 34 } }, - "value": 0, - "rawValue": 0, - "raw": "0o0" + "extra": { + "rawValue": 0, + "raw": "0o0" + }, + "value": 0 + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 17, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 17, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": "use strict", + "extra": { + "raw": "'use strict'", + "rawValue": "use strict" + } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json index 58c5a75980..118b2f32c6 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 2, - "rawValue": 2, - "raw": "0o2" + "extra": { + "rawValue": 2, + "raw": "0o2" + }, + "value": 2 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json index fc506965ec..5636575a62 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 10, - "rawValue": 10, - "raw": "0o12" + "extra": { + "rawValue": 10, + "raw": "0o12" + }, + "value": 10 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json index 0e4a704196..7c2c994467 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0O0" + "extra": { + "rawValue": 0, + "raw": "0O0" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json index ed92c39059..306190058c 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json @@ -76,39 +76,6 @@ } }, "body": [ - { - "type": "ExpressionStatement", - "start": 17, - "end": 30, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 30 - } - }, - "expression": { - "type": "StringLiteral", - "start": 17, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "value": "use strict", - "rawValue": "use strict", - "raw": "'use strict'" - } - }, { "type": "ExpressionStatement", "start": 31, @@ -137,14 +104,54 @@ "column": 34 } }, - "value": 0, - "rawValue": 0, - "raw": "0O0" + "extra": { + "rawValue": 0, + "raw": "0O0" + }, + "value": 0 + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 17, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 17, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": "use strict", + "extra": { + "raw": "'use strict'", + "rawValue": "use strict" + } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json b/packages/babylon/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json index 7c3f550db9..0ec4f48337 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json @@ -101,14 +101,17 @@ "column": 7 } }, - "value": 0.5, - "rawValue": 0.5, - "raw": ".5" + "extra": { + "rawValue": 0.5, + "raw": ".5" + }, + "value": 0.5 } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json b/packages/babylon/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json index 0e3260dc1b..5022e9d8b6 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json @@ -101,14 +101,17 @@ "column": 11 } }, - "value": 0.5, - "rawValue": 0.5, - "raw": ".5" + "extra": { + "rawValue": 0.5, + "raw": ".5" + }, + "value": 0.5 } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-super-property/super_computed/expected.json b/packages/babylon/test/fixtures/esprima/es2015-super-property/super_computed/expected.json index d70c83f48b..fc8eabf3ce 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-super-property/super_computed/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-super-property/super_computed/expected.json @@ -212,20 +212,24 @@ "column": 22 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "computed": true } } - ] + ], + "directives": [] } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json b/packages/babylon/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json index 6257eab282..3afaacea6e 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json @@ -87,14 +87,17 @@ "column": 45 } }, - "value": "`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`", - "rawValue": "`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`", - "raw": "'`\\\\n\\\\r\\\\b\\\\v\\\\t\\\\f\\\\\\n\\\\\\r\\n`'" + "extra": { + "rawValue": "`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`", + "raw": "'`\\\\n\\\\r\\\\b\\\\v\\\\t\\\\f\\\\\\n\\\\\\r\\n`'" + }, + "value": "`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`" } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json b/packages/babylon/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json index 8119243646..836d521625 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json @@ -87,14 +87,17 @@ "column": 23 } }, - "value": "`\n\r\n`", - "rawValue": "`\n\r\n`", - "raw": "'`\\n\\r\\n`'" + "extra": { + "rawValue": "`\n\r\n`", + "raw": "'`\\n\\r\\n`'" + }, + "value": "`\n\r\n`" } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json b/packages/babylon/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json index 84b416c9b8..1a1ed2bb2a 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json @@ -87,14 +87,17 @@ "column": 50 } }, - "value": "`\\u{000042}\\u0042\\x42\\u0\\A\\0`", - "rawValue": "`\\u{000042}\\u0042\\x42\\u0\\A\\0`", - "raw": "'`\\\\u{000042}\\\\u0042\\\\x42\\\\u0\\\\A\\\\0`'" + "extra": { + "rawValue": "`\\u{000042}\\u0042\\x42\\u0\\A\\0`", + "raw": "'`\\\\u{000042}\\\\u0042\\\\x42\\\\u0\\\\A\\\\0`'" + }, + "value": "`\\u{000042}\\u0042\\x42\\u0\\A\\0`" } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json index 0ac274c801..c6f9f2ce0e 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json @@ -87,14 +87,17 @@ "column": 35 } }, - "value": "\"\\u{714E}\\u{8336}\"", - "rawValue": "\"\\u{714E}\\u{8336}\"", - "raw": "'\"\\\\u{714E}\\\\u{8336}\"'" + "extra": { + "rawValue": "\"\\u{714E}\\u{8336}\"", + "raw": "'\"\\\\u{714E}\\\\u{8336}\"'" + }, + "value": "\"\\u{714E}\\u{8336}\"" } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json index 319843f197..5c97440415 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json @@ -87,14 +87,17 @@ "column": 45 } }, - "value": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"", - "rawValue": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"", - "raw": "'\"\\\\u{20BB7}\\\\u{91CE}\\\\u{5BB6}\"'" + "extra": { + "rawValue": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"", + "raw": "'\"\\\\u{20BB7}\\\\u{91CE}\\\\u{5BB6}\"'" + }, + "value": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"" } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json index e2ea996f44..05e4851182 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json @@ -87,14 +87,17 @@ "column": 33 } }, - "value": "\"\\u{00000000034}\"", - "rawValue": "\"\\u{00000000034}\"", - "raw": "'\"\\\\u{00000000034}\"'" + "extra": { + "rawValue": "\"\\u{00000000034}\"", + "raw": "'\"\\\\u{00000000034}\"'" + }, + "value": "\"\\u{00000000034}\"" } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/expected.json new file mode 100644 index 0000000000..9f91e65aeb --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/expected.json @@ -0,0 +1,150 @@ +{ + "type": "File", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 15, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "operator": "=", + "left": { + "type": "ArrayPattern", + "start": 15, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "elements": [ + { + "type": "Identifier", + "start": 16, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "name": "yield" + } + ] + }, + "right": { + "type": "Identifier", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "name": "x" + }, + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/expected.json new file mode 100644 index 0000000000..3a47f7de3a --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/expected.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 15, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "name": "yield" + } + ], + "body": { + "type": "NumberLiteral", + "start": 25, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/expected.json new file mode 100644 index 0000000000..e95af9ede1 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/expected.json @@ -0,0 +1,184 @@ +{ + "type": "File", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "sourceType": "script", + "body": [ + { + "type": "VariableDeclaration", + "start": 14, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 18, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "id": { + "type": "ObjectPattern", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "properties": [ + { + "type": "Property", + "start": 20, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "name": "x" + }, + "value": { + "type": "Identifier", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "name": "yield" + }, + "kind": "init" + } + ] + }, + "init": { + "type": "Identifier", + "start": 33, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "foo" + } + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/expected.json new file mode 100644 index 0000000000..6dc10fb160 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/expected.json @@ -0,0 +1,149 @@ +{ + "type": "File", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "sourceType": "script", + "body": [ + { + "type": "TryStatement", + "start": 14, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "block": { + "type": "BlockStatement", + "start": 18, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 21, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "param": { + "type": "Identifier", + "start": 28, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "name": "yield" + }, + "body": { + "type": "BlockStatement", + "start": 35, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "body": [], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/expected.json new file mode 100644 index 0000000000..376968b605 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/expected.json @@ -0,0 +1,135 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 14, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "name": "f" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "name": "yield" + } + ], + "body": { + "type": "BlockStatement", + "start": 32, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/expected.json new file mode 100644 index 0000000000..9d4ab39950 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/expected.json @@ -0,0 +1,134 @@ +{ + "type": "File", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "sourceType": "script", + "body": [ + { + "type": "VariableDeclaration", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 18, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "id": { + "type": "Identifier", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "name": "yield" + }, + "init": { + "type": "NumberLiteral", + "start": 26, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ], + "kind": "let" + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/expected.json new file mode 100644 index 0000000000..61833fb65c --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/expected.json @@ -0,0 +1,150 @@ +{ + "type": "File", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 14, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "id": { + "type": "Identifier", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "name": "f" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "RestElement", + "start": 25, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "argument": { + "type": "Identifier", + "start": 28, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "name": "yield" + } + } + ], + "body": { + "type": "BlockStatement", + "start": 35, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/expected.json new file mode 100644 index 0000000000..d34ac72f7a --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/expected.json @@ -0,0 +1,117 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "body": [ + { + "type": "VariableDeclaration", + "start": 14, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "id": { + "type": "Identifier", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "name": "yield" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json index 5a8f717350..7a4fbd86f6 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json @@ -106,9 +106,12 @@ }, "name": "x" }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json index c1d8db8a5f..9c2f1fefbe 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json @@ -91,12 +91,15 @@ "column": 13 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/expected.json index be34ece5b3..72a06d9cce 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/expected.json @@ -91,11 +91,15 @@ "column": 19 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json index 03c3926cb0..a2138f73ef 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json @@ -89,11 +89,15 @@ "column": 19 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json index 9260f06278..dbe92db430 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json @@ -123,14 +123,18 @@ "column": 14 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json index 950f430f09..1b530aaaf0 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json @@ -87,14 +87,17 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-method/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-method/expected.json index 7a4f9cbf39..7ef2282cd6 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-method/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-method/expected.json @@ -123,14 +123,18 @@ "column": 13 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json index b3a07a17aa..c48e078e6b 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json @@ -28,39 +28,6 @@ }, "sourceType": "script", "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "expression": { - "type": "StringLiteral", - "start": 0, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "value": "use strict", - "rawValue": "use strict", - "raw": "\"use strict\"" - } - }, { "type": "VariableDeclaration", "start": 14, @@ -178,6 +145,43 @@ ], "kind": "var" } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": "use strict", + "extra": { + "raw": "\"use strict\"", + "rawValue": "use strict" + } + } + } ] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json index dc762096f1..2773f3f558 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json @@ -28,39 +28,6 @@ }, "sourceType": "script", "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "expression": { - "type": "StringLiteral", - "start": 0, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "value": "use strict", - "rawValue": "use strict", - "raw": "\"use strict\"" - } - }, { "type": "ExpressionStatement", "start": 14, @@ -156,12 +123,52 @@ "column": 27 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": "use strict", + "extra": { + "raw": "\"use strict\"", + "rawValue": "use strict" + } } } ] diff --git a/packages/babylon/test/fixtures/esprima/expression-additive/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/expression-additive/migrated_0002/expected.json index 8adc9b67d6..e1846ee7d4 100644 --- a/packages/babylon/test/fixtures/esprima/expression-additive/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-additive/migrated_0002/expected.json @@ -70,9 +70,11 @@ "column": 12 } }, - "value": "use strict", - "rawValue": "use strict", - "raw": "\"use strict\"" + "extra": { + "rawValue": "use strict", + "raw": "\"use strict\"" + }, + "value": "use strict" }, "operator": "+", "right": { @@ -89,12 +91,15 @@ "column": 17 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json index 886a4c91ba..c55cb13771 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json @@ -87,12 +87,15 @@ "column": 6 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json index 087953e749..ccef73317a 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json @@ -87,12 +87,15 @@ "column": 9 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json index c40cefe77a..90279da775 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json @@ -87,12 +87,15 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json index 77c0b3f6fd..8c50cdf2f0 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json index 3ea5616140..6c210fd1b6 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json index 3bb965131c..2c333b70e1 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json index 623bec2d65..53c21fe4d6 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json index 169b55b357..abc4cb0406 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json index 395bbc5959..3c8c2893e8 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json @@ -87,12 +87,15 @@ "column": 8 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json index f2baaf2d7c..cfa8f98dfa 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json @@ -87,12 +87,15 @@ "column": 8 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json index 63767ff44b..ff6f9db71d 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json @@ -87,12 +87,15 @@ "column": 9 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json index 22bf53cf58..3719a7fafe 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json index 52cfe31685..84a3e7d56e 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json index 0cb0e23497..456765cc37 100644 --- a/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json index 9252297ac7..0ae6562f5f 100644 --- a/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json @@ -86,9 +86,11 @@ "column": 5 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "alternate": { "type": "NumberLiteral", @@ -104,12 +106,15 @@ "column": 9 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json index 6d0cf5e9ff..5f5e161e69 100644 --- a/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json @@ -118,9 +118,11 @@ "column": 10 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "alternate": { "type": "NumberLiteral", @@ -136,12 +138,15 @@ "column": 14 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json index 9d2c4afc3f..bee8292533 100644 --- a/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json @@ -101,10 +101,12 @@ "column": 6 } }, - "value": 0, - "rawValue": 0, - "raw": "0", - "parenthesizedExpression": true + "extra": { + "rawValue": 0, + "raw": "0", + "parenthesized": true + }, + "value": 0 }, "consequent": { "type": "NumberLiteral", @@ -120,9 +122,11 @@ "column": 11 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "alternate": { "type": "NumberLiteral", @@ -138,13 +142,16 @@ "column": 15 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json index a926bd6ac4..030722007d 100644 --- a/packages/babylon/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json @@ -84,10 +84,12 @@ "column": 2 } }, - "value": 1, - "rawValue": 1, - "raw": "1", - "parenthesizedExpression": true + "extra": { + "rawValue": 1, + "raw": "1", + "parenthesized": true + }, + "value": 1 }, "operator": "+", "right": { @@ -104,10 +106,12 @@ "column": 8 } }, - "value": 2, - "rawValue": 2, - "raw": "2", - "parenthesizedExpression": true + "extra": { + "rawValue": 2, + "raw": "2", + "parenthesized": true + }, + "value": 2 } }, "operator": "+", @@ -125,12 +129,15 @@ "column": 15 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json index efa51994a8..dfcea13c9a 100644 --- a/packages/babylon/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json @@ -84,9 +84,11 @@ "column": 1 } }, - "value": 4, - "rawValue": 4, - "raw": "4" + "extra": { + "rawValue": 4, + "raw": "4" + }, + "value": 4 }, "operator": "+", "right": { @@ -103,9 +105,11 @@ "column": 5 } }, - "value": 5, - "rawValue": 5, - "raw": "5" + "extra": { + "rawValue": 5, + "raw": "5" + }, + "value": 5 } }, "operator": "<<", @@ -123,13 +127,16 @@ "column": 11 } }, - "value": 6, - "rawValue": 6, - "raw": "6", - "parenthesizedExpression": true + "extra": { + "rawValue": 6, + "raw": "6", + "parenthesized": true + }, + "value": 6 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0007/expected.json b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0007/expected.json index b353ef2c83..5e0c9c3c30 100644 --- a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0007/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0007/expected.json @@ -101,7 +101,9 @@ "name": "foo" }, "arguments": [], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "property": { "type": "Identifier", @@ -124,6 +126,7 @@ "arguments": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0009/expected.json b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0009/expected.json index 6105d2841a..2a92530d73 100644 --- a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0009/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0009/expected.json @@ -71,11 +71,14 @@ } }, "name": "foo", - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "arguments": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json index f26ab8b935..ec68a20ef6 100644 --- a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json @@ -100,9 +100,11 @@ "column": 11 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "computed": true }, @@ -125,6 +127,7 @@ "computed": false } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json index 624c7b81b9..a7a9ccf384 100644 --- a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json @@ -101,9 +101,11 @@ "column": 11 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } ] }, @@ -126,6 +128,7 @@ "computed": false } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json index 23d090fedc..c94c04107e 100644 --- a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json @@ -129,9 +129,11 @@ "column": 11 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } ] }, @@ -168,9 +170,11 @@ "column": 24 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 }, { "type": "NumberLiteral", @@ -186,9 +190,11 @@ "column": 27 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 }, { "type": "NumberLiteral", @@ -204,9 +210,11 @@ "column": 31 } }, - "value": 77, - "rawValue": 77, - "raw": "77" + "extra": { + "rawValue": 77, + "raw": "77" + }, + "value": 77 } ] }, @@ -229,6 +237,7 @@ "computed": false } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json index 080068549b..b7649d92f8 100644 --- a/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json +++ b/packages/babylon/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json @@ -183,13 +183,16 @@ "column": 44 } }, - "value": 2014, - "rawValue": 2014, - "raw": "2014" + "extra": { + "rawValue": 2014, + "raw": "2014" + }, + "value": 2014 } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/57/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0087/expected.json similarity index 50% rename from packages/babylon/test/fixtures/harmony/uncategorised/57/expected.json rename to packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0087/expected.json index 8dd4aace6c..49f6398459 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/57/expected.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0087/expected.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 20, + "end": 31, "loc": { "start": { "line": 1, @@ -9,13 +9,13 @@ }, "end": { "line": 1, - "column": 20 + "column": 31 } }, "program": { "type": "Program", "start": 0, - "end": 20, + "end": 31, "loc": { "start": { "line": 1, @@ -23,15 +23,119 @@ }, "end": { "line": 1, - "column": 20 + "column": 31 } }, "sourceType": "script", "body": [ { "type": "ExpressionStatement", + "start": 14, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "AssignmentPattern", + "start": 15, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "left": { + "type": "Identifier", + "start": 15, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": "eval" + }, + "right": { + "type": "NumberLiteral", + "start": 22, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + ], + "body": { + "type": "NumberLiteral", + "start": 29, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", "start": 0, - "end": 20, + "end": 13, "loc": { "start": { "line": 1, @@ -39,13 +143,13 @@ }, "end": { "line": 1, - "column": 20 + "column": 13 } }, - "expression": { - "type": "ComprehensionExpression", + "value": { + "type": "DirectiveLiteral", "start": 0, - "end": 20, + "end": 12, "loc": { "start": { "line": 1, @@ -53,79 +157,13 @@ }, "end": { "line": 1, - "column": 20 + "column": 12 } }, - "blocks": [ - { - "type": "ComprehensionBlock", - "start": 1, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "left": { - "type": "Identifier", - "start": 6, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - }, - "name": "x" - }, - "right": { - "type": "Identifier", - "start": 11, - "end": 16, - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 16 - } - }, - "name": "array" - } - } - ], - "filter": null, - "body": { - "type": "Identifier", - "start": 18, - "end": 19, - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 19 - } - }, - "name": "x" - }, - "generator": false + "raw": "\"use strict\"", + "value": "use strict" } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0088/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0088/expected.json new file mode 100644 index 0000000000..56900a141d --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0088/expected.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 14, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": "eval" + } + ], + "body": { + "type": "NumberLiteral", + "start": 22, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0089/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0089/expected.json new file mode 100644 index 0000000000..3382211829 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0089/expected.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "name": "arguments" + } + ], + "body": { + "type": "NumberLiteral", + "start": 27, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0090/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0090/expected.json new file mode 100644 index 0000000000..c06f39c9f0 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0090/expected.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 15, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": "eval" + }, + { + "type": "Identifier", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "name": "a" + } + ], + "body": { + "type": "NumberLiteral", + "start": 27, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0091/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0091/expected.json new file mode 100644 index 0000000000..39df05159f --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0091/expected.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 15, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "name": "arguments" + }, + { + "type": "Identifier", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "name": "a" + } + ], + "body": { + "type": "NumberLiteral", + "start": 32, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0094/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0094/expected.json new file mode 100644 index 0000000000..154fb56eab --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0094/expected.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "name": "a" + } + ], + "body": { + "type": "NumberLiteral", + "start": 21, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": 0, + "rawValue": 0, + "raw": "00" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0100/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0100/expected.json new file mode 100644 index 0000000000..c444d65091 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0100/expected.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 15, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": "eval" + } + ], + "body": { + "type": "NumberLiteral", + "start": 24, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0183/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0183/expected.json new file mode 100644 index 0000000000..4888c9e77c --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0183/expected.json @@ -0,0 +1,186 @@ +{ + "type": "File", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "expression": { + "type": "CallExpression", + "start": 1, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "callee": { + "type": "FunctionExpression", + "start": 1, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 29, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "expression": { + "type": "UnaryExpression", + "start": 29, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "operator": "delete", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 36, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "name": "i" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 15, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 15, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + }, + "arguments": [], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0184/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0184/expected.json new file mode 100644 index 0000000000..b5c7e063e3 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0184/expected.json @@ -0,0 +1,184 @@ +{ + "type": "File", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "expression": { + "type": "CallExpression", + "start": 1, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "callee": { + "type": "FunctionExpression", + "start": 1, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "body": [ + { + "type": "WithStatement", + "start": 29, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "object": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "i" + }, + "body": { + "type": "EmptyStatement", + "start": 37, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 38 + } + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 15, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 15, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + }, + "arguments": [], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0185/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0185/expected.json new file mode 100644 index 0000000000..c791058a75 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0185/expected.json @@ -0,0 +1,186 @@ +{ + "type": "File", + "start": 0, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 32, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 36, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "id": { + "type": "Identifier", + "start": 36, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "name": "eval" + }, + "init": { + "type": "NumberLiteral", + "start": 43, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 43 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0186/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0186/expected.json new file mode 100644 index 0000000000..d516032ff0 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0186/expected.json @@ -0,0 +1,186 @@ +{ + "type": "File", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 32, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 36, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "id": { + "type": "Identifier", + "start": 36, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "name": "arguments" + }, + "init": { + "type": "NumberLiteral", + "start": 48, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0187/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0187/expected.json new file mode 100644 index 0000000000..25732f3422 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0187/expected.json @@ -0,0 +1,201 @@ +{ + "type": "File", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 32, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "block": { + "type": "BlockStatement", + "start": 36, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 40, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "param": { + "type": "Identifier", + "start": 47, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "name": "eval" + }, + "body": { + "type": "BlockStatement", + "start": 53, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 53 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "body": [], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0188/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0188/expected.json new file mode 100644 index 0000000000..14e6af099e --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0188/expected.json @@ -0,0 +1,201 @@ +{ + "type": "File", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 32, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "block": { + "type": "BlockStatement", + "start": 36, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 40, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "param": { + "type": "Identifier", + "start": 47, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "name": "arguments" + }, + "body": { + "type": "BlockStatement", + "start": 58, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 58 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "body": [], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0189/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0189/expected.json new file mode 100644 index 0000000000..5df2fc7306 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0189/expected.json @@ -0,0 +1,184 @@ +{ + "type": "File", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 32, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 32, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "eval" + }, + "right": { + "type": "NumberLiteral", + "start": 39, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0190/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0190/expected.json new file mode 100644 index 0000000000..936555ec42 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0190/expected.json @@ -0,0 +1,184 @@ +{ + "type": "File", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 32, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 32, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "name": "arguments" + }, + "right": { + "type": "NumberLiteral", + "start": 44, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 44 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0191/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0191/expected.json new file mode 100644 index 0000000000..4a54d8d316 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0191/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "operator": "++", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 34, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "name": "eval" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0192/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0192/expected.json new file mode 100644 index 0000000000..0be9956ee7 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0192/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "operator": "--", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 34, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "name": "eval" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0193/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0193/expected.json new file mode 100644 index 0000000000..3d5a3384b2 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0193/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "operator": "++", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 34, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "name": "arguments" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0194/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0194/expected.json new file mode 100644 index 0000000000..a129e39f7e --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0194/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "operator": "--", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 34, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "name": "arguments" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0195/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0195/expected.json new file mode 100644 index 0000000000..7c98807107 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0195/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "operator": "++", + "prefix": false, + "argument": { + "type": "Identifier", + "start": 32, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "eval" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0196/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0196/expected.json new file mode 100644 index 0000000000..7db69736d2 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0196/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "operator": "--", + "prefix": false, + "argument": { + "type": "Identifier", + "start": 32, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "eval" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0197/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0197/expected.json new file mode 100644 index 0000000000..029e95d4fd --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0197/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "operator": "++", + "prefix": false, + "argument": { + "type": "Identifier", + "start": 32, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "name": "arguments" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0198/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0198/expected.json new file mode 100644 index 0000000000..fc9fb9e66f --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0198/expected.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "expression": { + "type": "UpdateExpression", + "start": 32, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "operator": "--", + "prefix": false, + "argument": { + "type": "Identifier", + "start": 32, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "name": "arguments" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0199/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0199/expected.json new file mode 100644 index 0000000000..416268fca0 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0199/expected.json @@ -0,0 +1,170 @@ +{ + "type": "File", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 32, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "id": { + "type": "Identifier", + "start": 41, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "name": "eval" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 48, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0200/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0200/expected.json new file mode 100644 index 0000000000..aeae082c8b --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0200/expected.json @@ -0,0 +1,170 @@ +{ + "type": "File", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 32, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "id": { + "type": "Identifier", + "start": 41, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "name": "arguments" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 53, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 53 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0203/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0203/expected.json new file mode 100644 index 0000000000..ae9e78153d --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0203/expected.json @@ -0,0 +1,204 @@ +{ + "type": "File", + "start": 0, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 55, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 55 + } + }, + "expression": { + "type": "CallExpression", + "start": 33, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "callee": { + "type": "FunctionExpression", + "start": 33, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "id": { + "type": "Identifier", + "start": 42, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "name": "eval" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 49, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 49 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "body": [], + "directives": [] + } + }, + "arguments": [], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0204/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0204/expected.json new file mode 100644 index 0000000000..dc709c3172 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0204/expected.json @@ -0,0 +1,204 @@ +{ + "type": "File", + "start": 0, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 62 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 62 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 62 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 62 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 60, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 60 + } + }, + "expression": { + "type": "CallExpression", + "start": 33, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "callee": { + "type": "FunctionExpression", + "start": 33, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "id": { + "type": "Identifier", + "start": 42, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "name": "arguments" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 54, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 54 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "body": [], + "directives": [] + } + }, + "arguments": [], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0207/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0207/expected.json new file mode 100644 index 0000000000..f6abe3ed03 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0207/expected.json @@ -0,0 +1,240 @@ +{ + "type": "File", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 33, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "properties": [ + { + "type": "Property", + "start": 35, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "s" + }, + "value": { + "type": "FunctionExpression", + "start": 38, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "id": { + "type": "Identifier", + "start": 47, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "name": "eval" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 54, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 54 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "body": [], + "directives": [] + } + }, + "kind": "init" + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0209/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0209/expected.json new file mode 100644 index 0000000000..c888aaf947 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0209/expected.json @@ -0,0 +1,295 @@ +{ + "type": "File", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 33, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "properties": [ + { + "type": "Property", + "start": 35, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "i" + }, + "value": { + "type": "NumberLiteral", + "start": 38, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 42, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 46, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 46 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "name": "s" + }, + "kind": "set", + "value": { + "type": "FunctionExpression", + "start": 47, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 48, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "name": "eval" + } + ], + "body": { + "type": "BlockStatement", + "start": 54, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 54 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "body": [], + "directives": [] + } + } + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0210/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0210/expected.json new file mode 100644 index 0000000000..bebdcad342 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0210/expected.json @@ -0,0 +1,242 @@ +{ + "type": "File", + "start": 0, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 33, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "properties": [ + { + "type": "Property", + "start": 35, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 39, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "name": "s" + }, + "kind": "set", + "value": { + "type": "FunctionExpression", + "start": 40, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 41, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "name": "eval" + } + ], + "body": { + "type": "BlockStatement", + "start": 47, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "body": [], + "directives": [] + } + } + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0211/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0211/expected.json new file mode 100644 index 0000000000..d098c6d058 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0211/expected.json @@ -0,0 +1,257 @@ +{ + "type": "File", + "start": 0, + "end": 64, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 64 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 64, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 64 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 64, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 64 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 64, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 64 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 62 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 33, + "end": 60, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 60 + } + }, + "properties": [ + { + "type": "Property", + "start": 35, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "s" + }, + "value": { + "type": "FunctionExpression", + "start": 38, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "id": { + "type": "Identifier", + "start": 47, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "name": "s" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 49, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 49 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "name": "eval" + } + ], + "body": { + "type": "BlockStatement", + "start": 55, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 55 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "body": [], + "directives": [] + } + }, + "kind": "init" + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0214/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0214/expected.json new file mode 100644 index 0000000000..8425a41fb7 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0214/expected.json @@ -0,0 +1,187 @@ +{ + "type": "File", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 33, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "id": { + "type": "Identifier", + "start": 42, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "name": "inner" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 48, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "name": "eval" + } + ], + "body": { + "type": "BlockStatement", + "start": 54, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 54 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0215/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0215/expected.json new file mode 100644 index 0000000000..bab5d19160 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0215/expected.json @@ -0,0 +1,187 @@ +{ + "type": "File", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 63, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 63 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 33, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "id": { + "type": "Identifier", + "start": 42, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "name": "inner" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 48, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "name": "arguments" + } + ], + "body": { + "type": "BlockStatement", + "start": 59, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 59 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json index e68fbb6aec..91bbdfe83f 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:2)" -} \ No newline at end of file + "throws": "Octal literal in strict mode (1:1)" +} diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0217/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0217/expected.json new file mode 100644 index 0000000000..53489fbf1c --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0217/expected.json @@ -0,0 +1,150 @@ +{ + "type": "File", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "body": [], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + }, + { + "type": "Directive", + "start": 33, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "raw": "\"\\1\"", + "value": "\\1" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0218/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0218/expected.json new file mode 100644 index 0000000000..29875fff43 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0218/expected.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "expression": { + "type": "NumberLiteral", + "start": 33, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "value": 17, + "rawValue": 17, + "raw": "021" + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0219/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0219/expected.json new file mode 100644 index 0000000000..4e77a05f78 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0219/expected.json @@ -0,0 +1,209 @@ +{ + "type": "File", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 33, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 34, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "properties": [ + { + "type": "Property", + "start": 36, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "StringLiteral", + "start": 36, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "value": "\u0001", + "rawValue": "\u0001", + "raw": "\"\\1\"" + }, + "value": { + "type": "NumberLiteral", + "start": 42, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + }, + "kind": "init" + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0220/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0220/expected.json new file mode 100644 index 0000000000..346e059e5f --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0220/expected.json @@ -0,0 +1,209 @@ +{ + "type": "File", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 33, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 34, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "properties": [ + { + "type": "Property", + "start": 36, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "NumberLiteral", + "start": 36, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "value": 17, + "rawValue": 17, + "raw": "021" + }, + "value": { + "type": "NumberLiteral", + "start": 41, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + }, + "kind": "init" + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json index aca079ee39..ae2bfab55c 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:20)" -} \ No newline at end of file + "throws": "Octal literal in strict mode (1:35)" +} diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json index aca079ee39..ae2bfab55c 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:20)" -} \ No newline at end of file + "throws": "Octal literal in strict mode (1:35)" +} diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0223/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0223/expected.json new file mode 100644 index 0000000000..9f10388176 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0223/expected.json @@ -0,0 +1,203 @@ +{ + "type": "File", + "start": 0, + "end": 76, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 76 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 76, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 76 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 76, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 76 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 76, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 76 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 33, + "end": 74, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 74 + } + }, + "id": { + "type": "Identifier", + "start": 42, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "name": "inner" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 50, + "end": 74, + "loc": { + "start": { + "line": 1, + "column": 50 + }, + "end": { + "line": 1, + "column": 74 + } + }, + "body": [], + "directives": [ + { + "type": "Directive", + "start": 52, + "end": 72, + "loc": { + "start": { + "line": 1, + "column": 52 + }, + "end": { + "line": 1, + "column": 72 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 52, + "end": 71, + "loc": { + "start": { + "line": 1, + "column": 52 + }, + "end": { + "line": 1, + "column": 71 + } + }, + "raw": "\"octal directive\\1\"", + "value": "octal directive\\1" + } + } + ] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0224/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0224/expected.json new file mode 100644 index 0000000000..9e81efccd6 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0224/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "name": "implements" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0225/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0225/expected.json new file mode 100644 index 0000000000..09c95282b4 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0225/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "name": "interface" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0226/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0226/expected.json new file mode 100644 index 0000000000..b5b1bf5fba --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0226/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "name": "package" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0227/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0227/expected.json new file mode 100644 index 0000000000..bb397becf0 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0227/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "name": "private" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0228/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0228/expected.json new file mode 100644 index 0000000000..14ef8d4896 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0228/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "name": "protected" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0229/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0229/expected.json new file mode 100644 index 0000000000..e6e08fbf57 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0229/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "name": "public" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0230/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0230/expected.json new file mode 100644 index 0000000000..a8f07d2a1b --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0230/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "name": "static" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0231/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0231/expected.json new file mode 100644 index 0000000000..cbac229e7c --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0231/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 33, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 37, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "id": { + "type": "Identifier", + "start": 37, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "name": "yield" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0239/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0239/expected.json new file mode 100644 index 0000000000..e019755823 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0239/expected.json @@ -0,0 +1,118 @@ +{ + "type": "File", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 14, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "id": { + "type": "Identifier", + "start": 23, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "name": "static" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 32, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0240/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0240/expected.json new file mode 100644 index 0000000000..51085f798f --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0240/expected.json @@ -0,0 +1,151 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "name": "t" + }, + { + "type": "Identifier", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "name": "t" + } + ], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "body": [], + "directives": [ + { + "type": "Directive", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0243/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0243/expected.json new file mode 100644 index 0000000000..97c6620ab1 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0243/expected.json @@ -0,0 +1,218 @@ +{ + "type": "File", + "start": 0, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 29, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "id": { + "type": "Identifier", + "start": 38, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "name": "b" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 40, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "name": "t" + }, + { + "type": "Identifier", + "start": 43, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 43 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "name": "t" + } + ], + "body": { + "type": "BlockStatement", + "start": 46, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 46 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "body": [], + "directives": [] + } + }, + { + "type": "EmptyStatement", + "start": 49, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 49 + }, + "end": { + "line": 1, + "column": 50 + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 15, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 15, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0244/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0244/expected.json new file mode 100644 index 0000000000..6b5bcf5c66 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0244/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "expression": { + "type": "FunctionExpression", + "start": 1, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "id": { + "type": "Identifier", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "name": "t" + }, + { + "type": "Identifier", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "name": "t" + } + ], + "body": { + "type": "BlockStatement", + "start": 18, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "body": [], + "directives": [ + { + "type": "Directive", + "start": 20, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 20, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + }, + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0245/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0245/expected.json new file mode 100644 index 0000000000..636e4bc049 --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0245/expected.json @@ -0,0 +1,221 @@ +{ + "type": "File", + "start": 0, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 29, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "expression": { + "type": "FunctionExpression", + "start": 30, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "id": { + "type": "Identifier", + "start": 39, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "name": "b" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 41, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "name": "t" + }, + { + "type": "Identifier", + "start": 44, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 44 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "name": "t" + } + ], + "body": { + "type": "BlockStatement", + "start": 47, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "body": [], + "directives": [] + }, + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 15, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 15, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0249/expected.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0249/expected.json new file mode 100644 index 0000000000..fc69d156ec --- /dev/null +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0249/expected.json @@ -0,0 +1,151 @@ +{ + "type": "File", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 14, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "id": { + "type": "Identifier", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "name": "t" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 25, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "name": "__proto__" + }, + { + "type": "Identifier", + "start": 36, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "name": "__proto__" + } + ], + "body": { + "type": "BlockStatement", + "start": 47, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0270/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0270/options.json index 8bb9a5f99b..8df109cb3c 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0270/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0270/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:17)" -} \ No newline at end of file + "throws": "Classes may not have static property named prototype (1:16)" +} diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0271/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0271/options.json index 8bb9a5f99b..8df109cb3c 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0271/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0271/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:17)" -} \ No newline at end of file + "throws": "Classes may not have static property named prototype (1:16)" +} diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json index 2a73699bc2..8a55b8365f 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:18)" -} \ No newline at end of file + "throws": "The keyword 'static' is reserved (1:17)" +} diff --git a/packages/babylon/test/fixtures/esprima/statement-break/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/statement-break/migrated_0000/expected.json index 15042df691..e27a473406 100644 --- a/packages/babylon/test/fixtures/esprima/statement-break/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-break/migrated_0000/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -91,9 +89,11 @@ }, "label": null } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-break/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/statement-break/migrated_0001/expected.json index be48009734..930203bdfe 100644 --- a/packages/babylon/test/fixtures/esprima/statement-break/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-break/migrated_0001/expected.json @@ -70,9 +70,7 @@ "column": 17 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "done" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "done" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-break/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/statement-break/migrated_0002/expected.json index 6c31c586d6..207d4cf4c5 100644 --- a/packages/babylon/test/fixtures/esprima/statement-break/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-break/migrated_0002/expected.json @@ -70,9 +70,7 @@ "column": 17 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "done" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "done" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-break/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/statement-break/migrated_0003/expected.json index 650a39cbce..694def79b2 100644 --- a/packages/babylon/test/fixtures/esprima/statement-break/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-break/migrated_0003/expected.json @@ -70,9 +70,7 @@ "column": 22 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "__proto__" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "__proto__" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0000/expected.json index 40763456b0..16edee2512 100644 --- a/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0000/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -91,9 +89,11 @@ }, "label": null } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0001/expected.json index bfea074cf1..d58d0ffa9a 100644 --- a/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0001/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -91,9 +89,11 @@ }, "label": null } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0002/expected.json index f43031468c..3d3611769c 100644 --- a/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0002/expected.json @@ -70,9 +70,7 @@ "column": 17 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "done" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "done" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0003/expected.json index 3b684f46cb..e2eede95cf 100644 --- a/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0003/expected.json @@ -70,9 +70,7 @@ "column": 17 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "done" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "done" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0004/expected.json b/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0004/expected.json index 6c809ee4ec..076d4478b5 100644 --- a/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0004/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-continue/migrated_0004/expected.json @@ -70,9 +70,7 @@ "column": 22 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "__proto__" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "__proto__" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0002/expected.json index 5456f44f4a..03f4a58cb3 100644 --- a/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0002/expected.json @@ -87,14 +87,17 @@ "column": 22 } }, - "value": "\\u0061", - "rawValue": "\\u0061", - "raw": "'\\\\u0061'" + "extra": { + "rawValue": "\\u0061", + "raw": "'\\\\u0061'" + }, + "value": "\\u0061" } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0003/expected.json index 93af56eb06..d292e2317d 100644 --- a/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0003/expected.json @@ -87,14 +87,17 @@ "column": 23 } }, - "value": "a\\u0061", - "rawValue": "a\\u0061", - "raw": "'a\\\\u0061'" + "extra": { + "rawValue": "a\\u0061", + "raw": "'a\\\\u0061'" + }, + "value": "a\\u0061" } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0004/expected.json b/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0004/expected.json index ddf30e2b43..58b1ca21f8 100644 --- a/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0004/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0004/expected.json @@ -87,14 +87,17 @@ "column": 23 } }, - "value": "\\u0061a", - "rawValue": "\\u0061a", - "raw": "'\\\\u0061a'" + "extra": { + "rawValue": "\\u0061a", + "raw": "'\\\\u0061a'" + }, + "value": "\\u0061a" } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0005/expected.json b/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0005/expected.json index eee513b5d0..b9ab7766f2 100644 --- a/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0005/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-expression/migrated_0005/expected.json @@ -87,14 +87,17 @@ "column": 24 } }, - "value": "\\u0061a ", - "rawValue": "\\u0061a ", - "raw": "'\\\\u0061a '" + "extra": { + "rawValue": "\\u0061a ", + "raw": "'\\\\u0061a '" + }, + "value": "\\u0061a " } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-if/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/statement-if/migrated_0001/expected.json index 97e2c0b335..640c5691c2 100644 --- a/packages/babylon/test/fixtures/esprima/statement-if/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-if/migrated_0001/expected.json @@ -104,13 +104,17 @@ "column": 26 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } }, "alternate": null } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-if/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/statement-if/migrated_0002/expected.json index 086e802703..02fd006838 100644 --- a/packages/babylon/test/fixtures/esprima/statement-if/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-if/migrated_0002/expected.json @@ -117,9 +117,11 @@ "column": 22 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], @@ -127,6 +129,7 @@ }, "alternate": null } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-if/migrated_0005/expected.json b/packages/babylon/test/fixtures/esprima/statement-if/migrated_0005/expected.json index 07468bf95b..baa36356a5 100644 --- a/packages/babylon/test/fixtures/esprima/statement-if/migrated_0005/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-if/migrated_0005/expected.json @@ -56,9 +56,7 @@ "column": 8 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "consequent": { "type": "ExpressionStatement", @@ -123,6 +121,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-if/migrated_0006/expected.json b/packages/babylon/test/fixtures/esprima/statement-if/migrated_0006/expected.json index 828179ffc2..2f9b5c6964 100644 --- a/packages/babylon/test/fixtures/esprima/statement-if/migrated_0006/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-if/migrated_0006/expected.json @@ -56,9 +56,7 @@ "column": 8 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "consequent": { "type": "ExpressionStatement", @@ -123,6 +121,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json index 298c6ed2b8..52f64a4d6b 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json @@ -103,11 +103,10 @@ "column": 22 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json index cf9db0e4fd..04998adb58 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json @@ -103,11 +103,10 @@ "column": 22 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json index 3bd687b08d..8e9ac0c09e 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json @@ -153,7 +153,8 @@ } } } - ] + ], + "directives": [] }, "test": { "type": "BinaryExpression", @@ -200,12 +201,15 @@ "column": 30 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json index 7666f67d1b..d9bf919d8c 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json @@ -71,7 +71,8 @@ "column": 8 } }, - "body": [] + "body": [], + "directives": [] }, "test": { "type": "BooleanLiteral", @@ -87,9 +88,7 @@ "column": 21 } }, - "value": false, - "rawValue": false, - "raw": "false" + "value": false } }, { @@ -120,13 +119,13 @@ "column": 28 } }, - "value": false, - "rawValue": false, - "raw": "false" + "value": false } } - ] + ], + "directives": [] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json index 033f8a99dd..746642c0a5 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json @@ -103,11 +103,10 @@ "column": 21 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json index ff791459e4..5019d62edd 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json @@ -103,11 +103,10 @@ "column": 12 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json index b68c4e6106..b154f386f7 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json @@ -56,9 +56,7 @@ "column": 11 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "ExpressionStatement", @@ -108,6 +106,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json index c7381370ab..0ca7f0f400 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json @@ -87,9 +87,11 @@ "column": 13 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } }, "body": { @@ -203,9 +205,11 @@ } } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json index f45ca7088d..3b790cdecf 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": null, @@ -110,6 +112,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json index 6640f73295..e7c1db4ec7 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json @@ -101,9 +101,11 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], @@ -127,6 +129,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json index e10d00d731..c6da62d7c5 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json @@ -101,9 +101,11 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ], @@ -127,6 +129,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json index 61391fdd9f..eacbe24384 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json @@ -101,9 +101,11 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, { @@ -150,9 +152,11 @@ "column": 20 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -176,6 +180,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json index fb76721dce..7f485aaf19 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -137,9 +139,11 @@ "column": 17 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, "update": null, @@ -159,6 +163,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json index f826f885de..0c6bf2a092 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -137,9 +139,11 @@ "column": 17 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, "update": { @@ -191,6 +195,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json index 16f684a226..586cbf67f5 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -137,9 +139,11 @@ "column": 17 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, "update": { @@ -240,6 +244,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0019/actual.js b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0019/actual.js deleted file mode 100644 index 406a3a3c22..0000000000 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0019/actual.js +++ /dev/null @@ -1 +0,0 @@ -for (var x = 42 in list) process(x); diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0022/actual.js b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0022/actual.js deleted file mode 100644 index e10579bece..0000000000 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0022/actual.js +++ /dev/null @@ -1 +0,0 @@ -for (var a = b = c = (d in e) in z); diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0022/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0022/expected.json deleted file mode 100644 index f08be47cf5..0000000000 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0022/expected.json +++ /dev/null @@ -1,241 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 36, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 36 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 36, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 36 - } - }, - "sourceType": "script", - "body": [ - { - "type": "ForInStatement", - "start": 0, - "end": 36, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 36 - } - }, - "left": { - "type": "VariableDeclaration", - "start": 5, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "declarations": [ - { - "type": "VariableDeclarator", - "start": 9, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "id": { - "type": "Identifier", - "start": 9, - "end": 10, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 10 - } - }, - "name": "a" - }, - "init": { - "type": "AssignmentExpression", - "start": 13, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "operator": "=", - "left": { - "type": "Identifier", - "start": 13, - "end": 14, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 14 - } - }, - "name": "b" - }, - "right": { - "type": "AssignmentExpression", - "start": 17, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "operator": "=", - "left": { - "type": "Identifier", - "start": 17, - "end": 18, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 18 - } - }, - "name": "c" - }, - "right": { - "type": "BinaryExpression", - "start": 22, - "end": 28, - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 28 - } - }, - "left": { - "type": "Identifier", - "start": 22, - "end": 23, - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - }, - "name": "d" - }, - "operator": "in", - "right": { - "type": "Identifier", - "start": 27, - "end": 28, - "loc": { - "start": { - "line": 1, - "column": 27 - }, - "end": { - "line": 1, - "column": 28 - } - }, - "name": "e" - }, - "parenthesizedExpression": true - } - } - } - } - ], - "kind": "var" - }, - "right": { - "type": "Identifier", - "start": 33, - "end": 34, - "loc": { - "start": { - "line": 1, - "column": 33 - }, - "end": { - "line": 1, - "column": 34 - } - }, - "name": "z" - }, - "body": { - "type": "EmptyStatement", - "start": 35, - "end": 36, - "loc": { - "start": { - "line": 1, - "column": 35 - }, - "end": { - "line": 1, - "column": 36 - } - } - } - } - ] - } -} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0023/actual.js b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0023/actual.js deleted file mode 100644 index dbbe45041a..0000000000 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0023/actual.js +++ /dev/null @@ -1 +0,0 @@ -for (var i = function() { return 10 in [] } in list) process(x); diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0023/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0023/expected.json deleted file mode 100644 index b0f5f0232d..0000000000 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0023/expected.json +++ /dev/null @@ -1,278 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 64, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 64 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 64, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 64 - } - }, - "sourceType": "script", - "body": [ - { - "type": "ForInStatement", - "start": 0, - "end": 64, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 64 - } - }, - "left": { - "type": "VariableDeclaration", - "start": 5, - "end": 43, - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 43 - } - }, - "declarations": [ - { - "type": "VariableDeclarator", - "start": 9, - "end": 43, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 43 - } - }, - "id": { - "type": "Identifier", - "start": 9, - "end": 10, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 10 - } - }, - "name": "i" - }, - "init": { - "type": "FunctionExpression", - "start": 13, - "end": 43, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 43 - } - }, - "id": null, - "generator": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 24, - "end": 43, - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 43 - } - }, - "body": [ - { - "type": "ReturnStatement", - "start": 26, - "end": 41, - "loc": { - "start": { - "line": 1, - "column": 26 - }, - "end": { - "line": 1, - "column": 41 - } - }, - "argument": { - "type": "BinaryExpression", - "start": 33, - "end": 41, - "loc": { - "start": { - "line": 1, - "column": 33 - }, - "end": { - "line": 1, - "column": 41 - } - }, - "left": { - "type": "Literal", - "start": 33, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 33 - }, - "end": { - "line": 1, - "column": 35 - } - }, - "value": 10, - "rawValue": 10, - "raw": "10" - }, - "operator": "in", - "right": { - "type": "ArrayExpression", - "start": 39, - "end": 41, - "loc": { - "start": { - "line": 1, - "column": 39 - }, - "end": { - "line": 1, - "column": 41 - } - }, - "elements": [] - } - } - } - ] - } - } - } - ], - "kind": "var" - }, - "right": { - "type": "Identifier", - "start": 47, - "end": 51, - "loc": { - "start": { - "line": 1, - "column": 47 - }, - "end": { - "line": 1, - "column": 51 - } - }, - "name": "list" - }, - "body": { - "type": "ExpressionStatement", - "start": 53, - "end": 64, - "loc": { - "start": { - "line": 1, - "column": 53 - }, - "end": { - "line": 1, - "column": 64 - } - }, - "expression": { - "type": "CallExpression", - "start": 53, - "end": 63, - "loc": { - "start": { - "line": 1, - "column": 53 - }, - "end": { - "line": 1, - "column": 63 - } - }, - "callee": { - "type": "Identifier", - "start": 53, - "end": 60, - "loc": { - "start": { - "line": 1, - "column": 53 - }, - "end": { - "line": 1, - "column": 60 - } - }, - "name": "process" - }, - "arguments": [ - { - "type": "Identifier", - "start": 61, - "end": 62, - "loc": { - "start": { - "line": 1, - "column": 61 - }, - "end": { - "line": 1, - "column": 62 - } - }, - "name": "x" - } - ] - } - } - } - ] - } -} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json index f06c613c23..1f99f8deed 100644 --- a/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json @@ -151,9 +151,11 @@ "column": 16 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "computed": true }, @@ -189,6 +191,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json index c4f9e0e386..5157602658 100644 --- a/packages/babylon/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json @@ -70,9 +70,7 @@ "column": 18 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BreakStatement", @@ -123,6 +121,7 @@ "name": "start" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-return/migrated_0000/expected.json b/packages/babylon/test/fixtures/esprima/statement-return/migrated_0000/expected.json index 3f86692dc7..3811851cf2 100644 --- a/packages/babylon/test/fixtures/esprima/statement-return/migrated_0000/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-return/migrated_0000/expected.json @@ -91,11 +91,15 @@ }, "argument": null } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-return/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/statement-return/migrated_0001/expected.json index f66370e4d6..cfc30f8e34 100644 --- a/packages/babylon/test/fixtures/esprima/statement-return/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-return/migrated_0001/expected.json @@ -91,11 +91,15 @@ }, "argument": null } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-return/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/statement-return/migrated_0002/expected.json index 864565296e..7e253235fc 100644 --- a/packages/babylon/test/fixtures/esprima/statement-return/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-return/migrated_0002/expected.json @@ -106,11 +106,15 @@ "name": "x" } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-return/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/statement-return/migrated_0003/expected.json index 9c0041eb71..d4f71c39ad 100644 --- a/packages/babylon/test/fixtures/esprima/statement-return/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-return/migrated_0003/expected.json @@ -138,11 +138,15 @@ } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-switch/migrated_0001/expected.json b/packages/babylon/test/fixtures/esprima/statement-switch/migrated_0001/expected.json index 9758d61707..6251d143ae 100644 --- a/packages/babylon/test/fixtures/esprima/statement-switch/migrated_0001/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-switch/migrated_0001/expected.json @@ -152,13 +152,16 @@ "column": 25 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-switch/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/statement-switch/migrated_0002/expected.json index 7400509d5f..96908f65a6 100644 --- a/packages/babylon/test/fixtures/esprima/statement-switch/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-switch/migrated_0002/expected.json @@ -152,9 +152,11 @@ "column": 25 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, { @@ -193,6 +195,7 @@ } ] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-throw/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/statement-throw/migrated_0002/expected.json index dc9afaed76..0ddcce0c63 100644 --- a/packages/babylon/test/fixtures/esprima/statement-throw/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-throw/migrated_0002/expected.json @@ -104,15 +104,18 @@ "column": 24 } }, - "value": "Error", - "rawValue": "Error", - "raw": "\"Error\"" + "extra": { + "rawValue": "Error", + "raw": "\"Error\"" + }, + "value": "Error" }, "kind": "init" } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0002/expected.json b/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0002/expected.json index 746c634e18..1050401744 100644 --- a/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0002/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0002/expected.json @@ -87,14 +87,17 @@ "column": 10 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0003/expected.json b/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0003/expected.json index e88bd0e0af..a1ed3e4b37 100644 --- a/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0003/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0003/expected.json @@ -87,9 +87,11 @@ "column": 13 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, { @@ -136,14 +138,17 @@ "column": 29 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0004/expected.json b/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0004/expected.json index f0f1cc157c..db6e0fba4c 100644 --- a/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0004/expected.json +++ b/packages/babylon/test/fixtures/esprima/statement-variable/migrated_0004/expected.json @@ -87,9 +87,11 @@ "column": 10 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -136,9 +138,11 @@ "column": 17 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -185,14 +189,17 @@ "column": 27 } }, - "value": 1977, - "rawValue": 1977, - "raw": "1977" + "extra": { + "rawValue": 1977, + "raw": "1977" + }, + "value": 1977 } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/async-functions/options.json b/packages/babylon/test/fixtures/experimental/async-functions/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/async-functions/options.json +++ b/packages/babylon/test/fixtures/experimental/async-functions/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/async-functions/pattern/expected.json b/packages/babylon/test/fixtures/experimental/async-functions/pattern/expected.json index 1793ef0b6f..26dffdc586 100644 --- a/packages/babylon/test/fixtures/experimental/async-functions/pattern/expected.json +++ b/packages/babylon/test/fixtures/experimental/async-functions/pattern/expected.json @@ -170,9 +170,11 @@ "column": 38 } }, - "value": "../lang/task", - "rawValue": "../lang/task", - "raw": "'../lang/task'" + "extra": { + "rawValue": "../lang/task", + "raw": "'../lang/task'" + }, + "value": "../lang/task" } ] } @@ -180,6 +182,7 @@ ], "kind": "const" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/10/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/10/expected.json index 306cf66aef..a9e67765ef 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/10/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/10/expected.json @@ -124,7 +124,7 @@ } }, { - "type": "SpreadProperty", + "type": "RestProperty", "start": 8, "end": 12, "loc": { @@ -176,6 +176,7 @@ ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/10/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/10/options.json index 7fd805ebbe..4de042a697 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/10/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/10/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "plugins": ["objectRestSpread"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/11/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/11/expected.json index 4507ca2447..5da577c081 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/11/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/11/expected.json @@ -127,7 +127,7 @@ } }, { - "type": "SpreadProperty", + "type": "RestProperty", "start": 14, "end": 18, "loc": { @@ -174,11 +174,15 @@ "column": 24 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/11/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/11/options.json index 7fd805ebbe..4de042a697 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/11/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/11/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "plugins": ["objectRestSpread"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/12/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/12/options.json index 7fd805ebbe..4de042a697 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/12/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/12/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "plugins": ["objectRestSpread"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/13/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/13/options.json index 7fd805ebbe..4de042a697 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/13/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/13/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "plugins": ["objectRestSpread"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/14/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/14/expected.json index 1002fb1e60..de5cd3bace 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/14/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/14/expected.json @@ -273,9 +273,12 @@ } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/14/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/14/options.json index 7fd805ebbe..4de042a697 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/14/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/14/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "plugins": ["objectRestSpread"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/15/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/15/options.json index 2ba4efc5eb..080411a1bd 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/15/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/15/options.json @@ -1,6 +1,4 @@ { - "features": { - "asyncFunctions": true - }, + "plugins": ["asyncFunctions"], "throws": "Unexpected token (1:30)" } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/16/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/16/options.json index 60befbb037..ebda253376 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/16/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/16/options.json @@ -1,6 +1,4 @@ { - "features": { - "asyncFunctions": true - }, + "plugins": ["asyncFunctions"], "throws": "Unexpected token (2:4)" } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/17/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/17/expected.json index 4a9da1d79e..519910a604 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/17/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/17/expected.json @@ -91,7 +91,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [], "body": { "type": "BlockStatement", @@ -107,9 +106,11 @@ "column": 17 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/17/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/17/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/17/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/17/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/18/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/18/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/18/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/18/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/19/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/19/expected.json index 954665acdb..eb899c91ea 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/19/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/19/expected.json @@ -189,14 +189,19 @@ } } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/19/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/19/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/19/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/19/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/20/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/20/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/20/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/20/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/21/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/21/expected.json index 99ba85f172..d6700e7b80 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/21/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/21/expected.json @@ -135,9 +135,11 @@ "column": 14 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "kind": "init" }, @@ -273,7 +275,8 @@ } } } - ] + ], + "directives": [] } } } @@ -283,6 +286,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/21/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/21/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/21/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/21/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/22/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/22/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/22/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/22/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/23/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/23/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/23/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/23/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/24/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/24/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/24/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/24/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/25/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/25/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/25/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/25/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/26/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/26/expected.json index 8ee2fcb4e1..c39596f9e3 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/26/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/26/expected.json @@ -134,9 +134,11 @@ "column": 12 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, { "type": "NumberLiteral", @@ -152,9 +154,11 @@ "column": 15 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } ] }, @@ -177,6 +181,7 @@ ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/26/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/26/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/26/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/26/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/27/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/27/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/27/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/27/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/28/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/28/expected.json index 882187725b..19adb39a8e 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/28/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/28/expected.json @@ -59,7 +59,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "body": { "type": "BlockStatement", @@ -185,17 +184,23 @@ "column": 35 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/28/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/28/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/28/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/28/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/29/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/29/expected.json index 8b5de05d88..169869cbf6 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/29/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/29/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "body": { "type": "BlockStatement", @@ -140,13 +139,15 @@ "column": 23 } }, - "body": [] + "body": [], + "directives": [] } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/29/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/29/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/29/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/29/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/3/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/3/expected.json index b292c27d73..d6362bdbed 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/3/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/3/expected.json @@ -87,12 +87,15 @@ "column": 7 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/3/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/3/options.json index 41c7f66605..d01676b6ba 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/3/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/3/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "plugins": ["exponentiationOperator"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/30/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/30/expected.json index 3f7882d5fb..60fc936189 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/30/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/30/expected.json @@ -134,9 +134,11 @@ "column": 25 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" }, "kind": "init" } @@ -146,6 +148,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/30/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/30/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/30/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/30/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/31/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/31/expected.json index a05229ee4e..55dbd1960c 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/31/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/31/expected.json @@ -154,7 +154,8 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -164,6 +165,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/31/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/31/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/31/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/31/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/32/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/32/options.json index 8958d766f8..87a4cd6baf 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/32/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/32/options.json @@ -1,6 +1,4 @@ { "sourceType": "module", - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/33/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/33/options.json index 2a3b127804..d760b0afda 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/33/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/33/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/34/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/34/options.json index 2a3b127804..d760b0afda 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/34/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/34/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/35/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/35/options.json index 2a3b127804..d760b0afda 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/35/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/35/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/36/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/36/options.json index 2a3b127804..d760b0afda 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/36/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/36/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/37/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/37/options.json index 2a3b127804..d760b0afda 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/37/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/37/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/38/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/38/options.json index 2a3b127804..d760b0afda 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/38/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/38/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/39/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/39/expected.json index 10b9a29f22..da6ab2aeb4 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/39/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/39/expected.json @@ -183,9 +183,11 @@ "column": 22 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" }, "kind": "init" } @@ -260,6 +262,7 @@ "body": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/39/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/39/options.json index 2a3b127804..d760b0afda 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/39/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/39/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/4/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/4/expected.json index 3487223172..43b7675cb2 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/4/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/4/expected.json @@ -101,9 +101,11 @@ "column": 15 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "operator": "**", "right": { @@ -120,15 +122,18 @@ "column": 20 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/4/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/4/options.json index 41c7f66605..d01676b6ba 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/4/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/4/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "plugins": ["exponentiationOperator"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/40/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/40/options.json index 2a3b127804..d760b0afda 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/40/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/40/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/41/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/41/options.json index b433f712de..935ac72894 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/41/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/41/options.json @@ -1,6 +1,4 @@ { - "features": { - "decorators": true - }, + "plugins": ["decorators"], "throws": "Leading decorators must be attached to a class declaration (1:5)" } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/42/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/42/options.json index 821f4be393..ec1974dcf0 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/42/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/42/options.json @@ -1,6 +1,4 @@ { - "features": { - "decorators": true - }, + "plugins": ["decorators"], "throws": "You have trailing decorators with no method (1:18)" } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/43/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/43/expected.json index fdf472db55..f1956ad133 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/43/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/43/expected.json @@ -120,14 +120,17 @@ "column": 23 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/43/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/43/options.json index bbe898f093..9c27576d4a 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/43/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/43/options.json @@ -1,5 +1,3 @@ { - "features": { - "classProperties": true - } + "plugins": ["classProperties"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/44/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/44/options.json index bbe898f093..9c27576d4a 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/44/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/44/options.json @@ -1,5 +1,3 @@ { - "features": { - "classProperties": true - } + "plugins": ["classProperties"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/45/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/45/options.json index bbe898f093..9c27576d4a 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/45/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/45/options.json @@ -1,5 +1,3 @@ { - "features": { - "classProperties": true - } + "plugins": ["classProperties"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/46/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/46/expected.json index 9035cd541b..ade2f517c1 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/46/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/46/expected.json @@ -120,14 +120,17 @@ "column": 30 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/46/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/46/options.json index bbe898f093..9c27576d4a 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/46/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/46/options.json @@ -1,5 +1,3 @@ { - "features": { - "classProperties": true - } + "plugins": ["classProperties"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/47/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/47/expected.json index 529bbb3a16..e13785eb68 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/47/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/47/expected.json @@ -153,14 +153,17 @@ "column": 28 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/47/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/47/options.json index 860a7f5c18..4d015e4fbf 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/47/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/47/options.json @@ -1,6 +1,6 @@ { - "features": { - "classProperties": true, - "decorators": true - } + "plugins": [ + "classProperties", + "decorators" + ] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/48/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/48/expected.json index 0a295b8d9b..9f756cd6cb 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/48/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/48/expected.json @@ -153,14 +153,17 @@ "column": 35 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/48/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/48/options.json index 860a7f5c18..4d015e4fbf 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/48/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/48/options.json @@ -1,6 +1,6 @@ { - "features": { - "classProperties": true, - "decorators": true - } + "plugins": [ + "classProperties", + "decorators" + ] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/49/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/49/expected.json index 1017436d55..0ca312dba2 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/49/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/49/expected.json @@ -168,9 +168,11 @@ "column": 27 } }, - "value": "wow", - "rawValue": "wow", - "raw": "'wow'" + "extra": { + "rawValue": "wow", + "raw": "'wow'" + }, + "value": "wow" }, "kind": "init" } @@ -180,6 +182,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/49/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/49/options.json index 2a3b127804..d760b0afda 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/49/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/49/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/5/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/5/expected.json index 8a1368ec93..a90eceb9de 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/5/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/5/expected.json @@ -70,9 +70,11 @@ "column": 1 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "operator": "**", "right": { @@ -103,9 +105,11 @@ "column": 7 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 }, "operator": "**", "right": { @@ -122,14 +126,19 @@ "column": 12 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/5/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/5/options.json index 41c7f66605..d01676b6ba 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/5/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/5/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "plugins": ["exponentiationOperator"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/50/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/50/expected.json index 982de0b582..c901163da6 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/50/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/50/expected.json @@ -136,11 +136,14 @@ "column": 30 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/50/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/50/options.json index 0f9c04fc1c..9ca434c7ad 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/50/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/50/options.json @@ -1,6 +1,4 @@ { "sourceType": "module", - "features": { - "exportExtensions": true - } + "plugins": ["exportExtensions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/51/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/51/expected.json index 6c2099d8f6..cf777d23e3 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/51/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/51/expected.json @@ -136,11 +136,14 @@ "column": 35 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/51/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/51/options.json index 0f9c04fc1c..9ca434c7ad 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/51/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/51/options.json @@ -1,6 +1,4 @@ { "sourceType": "module", - "features": { - "exportExtensions": true - } + "plugins": ["exportExtensions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/52/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/52/expected.json index c0646aafb4..56f6998476 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/52/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/52/expected.json @@ -89,11 +89,14 @@ "column": 21 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/52/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/52/options.json index 0f9c04fc1c..9ca434c7ad 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/52/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/52/options.json @@ -1,6 +1,4 @@ { "sourceType": "module", - "features": { - "exportExtensions": true - } + "plugins": ["exportExtensions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/53/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/53/expected.json index 1b94aadbe9..8e1fc31aea 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/53/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/53/expected.json @@ -89,11 +89,14 @@ "column": 25 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/53/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/53/options.json index 0f9c04fc1c..9ca434c7ad 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/53/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/53/options.json @@ -1,6 +1,4 @@ { "sourceType": "module", - "features": { - "exportExtensions": true - } + "plugins": ["exportExtensions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/54/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/54/expected.json index e7128ee647..90607f31ac 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/54/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/54/expected.json @@ -89,11 +89,14 @@ "column": 26 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/54/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/54/options.json index 0f9c04fc1c..9ca434c7ad 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/54/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/54/options.json @@ -1,6 +1,4 @@ { "sourceType": "module", - "features": { - "exportExtensions": true - } + "plugins": ["exportExtensions"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/55/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/55/expected.json index 4935b2fec0..1616be3690 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/55/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/55/expected.json @@ -103,9 +103,11 @@ "column": 10 } }, - "value": "=", - "rawValue": "=", - "raw": "'='" + "extra": { + "rawValue": "=", + "raw": "'='" + }, + "value": "=" }, { "type": "NumberLiteral", @@ -121,13 +123,16 @@ "column": 13 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/55/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/55/options.json index 5e058ad445..f0d10aef27 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/55/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/55/options.json @@ -1,5 +1,3 @@ { - "features": { - "trailingFunctionCommas": true - } + "plugins": ["trailingFunctionCommas"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/56/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/56/options.json index 5e058ad445..f0d10aef27 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/56/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/56/options.json @@ -1,5 +1,3 @@ { - "features": { - "trailingFunctionCommas": true - } + "plugins": ["trailingFunctionCommas"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/57/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/57/options.json index 5e058ad445..f0d10aef27 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/57/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/57/options.json @@ -1,5 +1,3 @@ { - "features": { - "trailingFunctionCommas": true - } + "plugins": ["trailingFunctionCommas"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/58/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/58/expected.json index 9cf1dfe1ed..e6a73fb255 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/58/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/58/expected.json @@ -107,12 +107,15 @@ "column": 13 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/58/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/58/options.json index 5e058ad445..f0d10aef27 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/58/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/58/options.json @@ -1,5 +1,3 @@ { - "features": { - "trailingFunctionCommas": true - } + "plugins": ["trailingFunctionCommas"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/59/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/59/options.json index 62be2d0a68..3c571eea7a 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/59/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/59/options.json @@ -1,6 +1,4 @@ { - "features": { - "trailingFunctionCommas": true - }, + "plugins": ["trailingFunctionCommas"], "throws": "Unexpected token (1:4)" } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/6/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/6/expected.json index c0f4e3fb97..755abf8daa 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/6/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/6/expected.json @@ -70,9 +70,11 @@ "column": 1 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "operator": "**", "right": { @@ -103,9 +105,11 @@ "column": 6 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 }, "operator": "**", "right": { @@ -122,13 +126,16 @@ "column": 11 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/6/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/6/options.json index 41c7f66605..d01676b6ba 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/6/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/6/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "plugins": ["exponentiationOperator"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/60/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/60/options.json index 01d373f173..8615cfcc03 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/60/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/60/options.json @@ -1,6 +1,4 @@ { - "features": { - "trailingFunctionCommas": true - }, + "plugins": ["trailingFunctionCommas"], "throws": "Unexpected token (1:13)" } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/61/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/61/options.json index 26872c0003..7c23acbd30 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/61/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/61/options.json @@ -1,6 +1,4 @@ { - "features": { - "trailingFunctionCommas": true - }, + "plugins": ["trailingFunctionCommas"], "throws": "Unexpected token (1:7)" } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/62/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/62/options.json index 2a3b127804..d760b0afda 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/62/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/62/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/7/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/7/expected.json index a2a7cb100c..b07c383c1c 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/7/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/7/expected.json @@ -84,9 +84,11 @@ "column": 2 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "operator": "**", "right": { @@ -119,12 +121,16 @@ "column": 8 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "operator": "*", "right": { @@ -141,12 +147,15 @@ "column": 13 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/7/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/7/options.json index 41c7f66605..d01676b6ba 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/7/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/7/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "plugins": ["exponentiationOperator"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/8/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/8/expected.json index adb1668c02..71d29e12cf 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/8/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/8/expected.json @@ -84,9 +84,11 @@ "column": 1 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "operator": "**", "right": { @@ -119,9 +121,11 @@ "column": 7 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } }, @@ -140,12 +144,15 @@ "column": 11 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/8/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/8/options.json index 41c7f66605..d01676b6ba 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/8/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/8/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "plugins": ["exponentiationOperator"] } diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/9/expected.json b/packages/babylon/test/fixtures/experimental/uncategorised/9/expected.json index f1dfa90a4f..5ee0540170 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/9/expected.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/9/expected.json @@ -73,7 +73,7 @@ }, "properties": [ { - "type": "SpreadProperty", + "type": "RestProperty", "start": 5, "end": 9, "loc": { @@ -125,6 +125,7 @@ ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/experimental/uncategorised/9/options.json b/packages/babylon/test/fixtures/experimental/uncategorised/9/options.json index 7fd805ebbe..4de042a697 100644 --- a/packages/babylon/test/fixtures/experimental/uncategorised/9/options.json +++ b/packages/babylon/test/fixtures/experimental/uncategorised/9/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "plugins": ["objectRestSpread"] } diff --git a/packages/babylon/test/fixtures/flow/bounded-polymorphism/2/expected.json b/packages/babylon/test/fixtures/flow/bounded-polymorphism/2/expected.json index 8231ece78f..78dc7a10ed 100644 --- a/packages/babylon/test/fixtures/flow/bounded-polymorphism/2/expected.json +++ b/packages/babylon/test/fixtures/flow/bounded-polymorphism/2/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "typeParameters": { "type": "TypeParameterDeclaration", "start": 12, @@ -154,10 +153,11 @@ "column": 29 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/declare-module/2/expected.json b/packages/babylon/test/fixtures/flow/declare-module/2/expected.json index 4b8d16c85b..887e105b6e 100644 --- a/packages/babylon/test/fixtures/flow/declare-module/2/expected.json +++ b/packages/babylon/test/fixtures/flow/declare-module/2/expected.json @@ -56,9 +56,11 @@ "column": 25 } }, - "value": "./a/b.js", - "rawValue": "./a/b.js", - "raw": "\"./a/b.js\"" + "extra": { + "rawValue": "./a/b.js", + "raw": "\"./a/b.js\"" + }, + "value": "./a/b.js" }, "body": { "type": "BlockStatement", @@ -77,6 +79,7 @@ "body": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/literal-types/number-binary/expected.json b/packages/babylon/test/fixtures/flow/literal-types/number-binary/expected.json index 2f19c09446..2f0fde7e23 100644 --- a/packages/babylon/test/fixtures/flow/literal-types/number-binary/expected.json +++ b/packages/babylon/test/fixtures/flow/literal-types/number-binary/expected.json @@ -101,8 +101,10 @@ } }, "value": 123, - "rawValue": 123, - "raw": "0b1111011" + "extra": { + "rawValue": 123, + "raw": "0b1111011" + } } } }, @@ -111,7 +113,7 @@ ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/literal-types/number-float/expected.json b/packages/babylon/test/fixtures/flow/literal-types/number-float/expected.json index 6724acbc50..3b07b2d152 100644 --- a/packages/babylon/test/fixtures/flow/literal-types/number-float/expected.json +++ b/packages/babylon/test/fixtures/flow/literal-types/number-float/expected.json @@ -101,8 +101,10 @@ } }, "value": 123, - "rawValue": 123, - "raw": "123.0" + "extra": { + "rawValue": 123, + "raw": "123.0" + } } } }, @@ -111,7 +113,7 @@ ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/literal-types/number-integer/expected.json b/packages/babylon/test/fixtures/flow/literal-types/number-integer/expected.json index cda39f4468..dd2263c75e 100644 --- a/packages/babylon/test/fixtures/flow/literal-types/number-integer/expected.json +++ b/packages/babylon/test/fixtures/flow/literal-types/number-integer/expected.json @@ -101,8 +101,10 @@ } }, "value": 123, - "rawValue": 123, - "raw": "123" + "extra": { + "rawValue": 123, + "raw": "123" + } } } }, @@ -111,7 +113,7 @@ ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/literal-types/number-octal-2/expected.json b/packages/babylon/test/fixtures/flow/literal-types/number-octal-2/expected.json index 87d29f96e7..f57f036c6e 100644 --- a/packages/babylon/test/fixtures/flow/literal-types/number-octal-2/expected.json +++ b/packages/babylon/test/fixtures/flow/literal-types/number-octal-2/expected.json @@ -101,8 +101,10 @@ } }, "value": 123, - "rawValue": 123, - "raw": "0o173" + "extra": { + "rawValue": 123, + "raw": "0o173" + } } } }, @@ -111,7 +113,7 @@ ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/literal-types/number-octal/expected.json b/packages/babylon/test/fixtures/flow/literal-types/number-octal/expected.json index 43a7969885..bd69b4d140 100644 --- a/packages/babylon/test/fixtures/flow/literal-types/number-octal/expected.json +++ b/packages/babylon/test/fixtures/flow/literal-types/number-octal/expected.json @@ -101,8 +101,10 @@ } }, "value": 123, - "rawValue": 123, - "raw": "0x7B" + "extra": { + "rawValue": 123, + "raw": "0x7B" + } } } }, @@ -111,7 +113,7 @@ ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/literal-types/string-double/expected.json b/packages/babylon/test/fixtures/flow/literal-types/string-double/expected.json index 45f4f80820..75c50aa13a 100644 --- a/packages/babylon/test/fixtures/flow/literal-types/string-double/expected.json +++ b/packages/babylon/test/fixtures/flow/literal-types/string-double/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -106,8 +105,10 @@ } }, "value": "div", - "rawValue": "div", - "raw": "\"div\"" + "extra": { + "rawValue": "div", + "raw": "\"div\"" + } } } } @@ -173,10 +174,11 @@ "column": 57 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/literal-types/string-single/expected.json b/packages/babylon/test/fixtures/flow/literal-types/string-single/expected.json index c231dace04..e168fb2f91 100644 --- a/packages/babylon/test/fixtures/flow/literal-types/string-single/expected.json +++ b/packages/babylon/test/fixtures/flow/literal-types/string-single/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -106,8 +105,10 @@ } }, "value": "div", - "rawValue": "div", - "raw": "'div'" + "extra": { + "rawValue": "div", + "raw": "'div'" + } } } } @@ -173,10 +174,11 @@ "column": 57 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/options.json b/packages/babylon/test/fixtures/flow/options.json index 05a90ee573..1844b1df3c 100644 --- a/packages/babylon/test/fixtures/flow/options.json +++ b/packages/babylon/test/fixtures/flow/options.json @@ -1,5 +1,4 @@ { "sourceType": "module", - "plugins": { "jsx": true, "flow": true }, - "features": { "asyncFunctions": true } + "plugins": ["jsx", "flow", "asyncFunctions"] } diff --git a/packages/babylon/test/fixtures/flow/regression/issue-2083/expected.json b/packages/babylon/test/fixtures/flow/regression/issue-2083/expected.json index b6f6514238..f56868b0ee 100644 --- a/packages/babylon/test/fixtures/flow/regression/issue-2083/expected.json +++ b/packages/babylon/test/fixtures/flow/regression/issue-2083/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "body": { "type": "BlockStatement", @@ -169,9 +168,11 @@ "column": 13 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "cases": [ { @@ -300,12 +301,15 @@ }, "computed": false }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } ] } - ] + ], + "directives": [] } } }, @@ -359,7 +363,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "body": { "type": "BlockStatement", @@ -449,11 +452,15 @@ "column": 23 } }, - "value": 4, - "rawValue": 4, - "raw": "4" + "extra": { + "rawValue": 4, + "raw": "4" + }, + "value": 4 }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "operator": "|", "right": { @@ -475,13 +482,15 @@ }, "cases": [] } - ] + ], + "directives": [] } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/tuples/3/expected.json b/packages/babylon/test/fixtures/flow/tuples/3/expected.json index 21c02d7040..0febab6ded 100644 --- a/packages/babylon/test/fixtures/flow/tuples/3/expected.json +++ b/packages/babylon/test/fixtures/flow/tuples/3/expected.json @@ -149,9 +149,11 @@ "column": 24 } }, - "value": 123, - "rawValue": 123, - "raw": "123" + "extra": { + "rawValue": 123, + "raw": "123" + }, + "value": 123 } ] } @@ -159,6 +161,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/tuples/4/expected.json b/packages/babylon/test/fixtures/flow/tuples/4/expected.json index 17eb3accf4..4834619f1a 100644 --- a/packages/babylon/test/fixtures/flow/tuples/4/expected.json +++ b/packages/babylon/test/fixtures/flow/tuples/4/expected.json @@ -164,9 +164,11 @@ "column": 31 } }, - "value": 123, - "rawValue": 123, - "raw": "123" + "extra": { + "rawValue": 123, + "raw": "123" + }, + "value": 123 }, { "type": "StringLiteral", @@ -182,9 +184,11 @@ "column": 39 } }, - "value": "duck", - "rawValue": "duck", - "raw": "\"duck\"" + "extra": { + "rawValue": "duck", + "raw": "\"duck\"" + }, + "value": "duck" } ] } @@ -192,6 +196,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/1/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/1/expected.json index a2eead1323..4d022b66ad 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/1/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/1/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -169,10 +168,11 @@ "column": 44 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/10/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/10/expected.json index a9c9b078b2..6aae036622 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/10/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/10/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -236,10 +235,11 @@ "column": 56 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/11/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/11/expected.json index 9e64b8c0cd..5de62117eb 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/11/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/11/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -283,10 +282,11 @@ "column": 67 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/12/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/12/expected.json index 5f22620819..fddf075029 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/12/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/12/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [], "returnType": { "type": "TypeAnnotation", @@ -106,10 +105,11 @@ "column": 23 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/13/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/13/expected.json index 85d1d32dff..1070cfbe37 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/13/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/13/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [], "returnType": { "type": "TypeAnnotation", @@ -124,10 +123,11 @@ "column": 27 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/14/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/14/expected.json index 1cdbf9b15e..96fb6480b2 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/14/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/14/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [], "returnType": { "type": "TypeAnnotation", @@ -172,10 +171,11 @@ "column": 35 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/15/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/15/expected.json index 08e4a71f0d..310bd0ca0c 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/15/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/15/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [], "returnType": { "type": "TypeAnnotation", @@ -172,10 +171,11 @@ "column": 36 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/16/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/16/expected.json index c4db0ece72..392f618655 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/16/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/16/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [], "returnType": { "type": "TypeAnnotation", @@ -109,10 +108,11 @@ "column": 21 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/17/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/17/expected.json index 944df2b6b8..0e9b768068 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/17/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/17/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "typeParameters": { "type": "TypeParameterDeclaration", "start": 12, @@ -109,10 +108,11 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/18/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/18/expected.json index 3aa1cbb4f3..65eab403cc 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/18/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/18/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "typeParameters": { "type": "TypeParameterDeclaration", "start": 12, @@ -125,10 +124,11 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/19/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/19/expected.json index 1e7c605330..6102f7fad4 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/19/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/19/expected.json @@ -90,7 +90,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "typeParameters": { "type": "TypeParameterDeclaration", "start": 10, @@ -155,12 +154,13 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/2/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/2/expected.json index a70a9f9ec3..9f0c84fa45 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/2/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/2/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -123,10 +122,11 @@ "column": 30 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/20/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/20/expected.json index 9e80067a0b..455aaeaa26 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/20/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/20/expected.json @@ -139,7 +139,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -202,7 +201,8 @@ "column": 30 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -210,7 +210,7 @@ } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/21/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/21/expected.json index f9913f979f..3360af33e4 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/21/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/21/expected.json @@ -139,7 +139,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -232,7 +231,8 @@ "column": 35 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -240,7 +240,7 @@ } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/22/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/22/expected.json index 6f3faa4034..2d660b9f77 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/22/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/22/expected.json @@ -139,7 +139,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "returnType": { "type": "TypeAnnotation", @@ -185,7 +184,8 @@ "column": 25 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -193,7 +193,7 @@ } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/23/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/23/expected.json index d2ecdea08f..75457f8544 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/23/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/23/expected.json @@ -139,7 +139,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -266,7 +265,8 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] }, "typeParameters": { "type": "TypeParameterDeclaration", @@ -307,7 +307,7 @@ } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/24/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/24/expected.json index 499369a52f..9990d3f183 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/24/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/24/expected.json @@ -139,7 +139,6 @@ "id": null, "generator": true, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -266,7 +265,8 @@ "column": 21 } }, - "body": [] + "body": [], + "directives": [] }, "typeParameters": { "type": "TypeParameterDeclaration", @@ -307,7 +307,7 @@ } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/26/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/26/expected.json index 1b09f8300e..c59c5c0979 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/26/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/26/expected.json @@ -119,9 +119,11 @@ "column": 6 } }, - "value": 123, - "rawValue": 123, - "raw": "123" + "extra": { + "rawValue": 123, + "raw": "123" + }, + "value": 123 }, "kind": "init", "value": { @@ -141,7 +143,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -268,7 +269,8 @@ "column": 21 } }, - "body": [] + "body": [], + "directives": [] }, "typeParameters": { "type": "TypeParameterDeclaration", @@ -309,6 +311,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/27/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/27/expected.json index 626bfacfe8..7e23e4be3b 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/27/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/27/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -187,14 +186,15 @@ "column": 38 } }, - "body": [] + "body": [], + "directives": [] } } } ] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/28/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/28/expected.json index fc7065e4ba..23a7b26c0b 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/28/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/28/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -217,14 +216,15 @@ "column": 43 } }, - "body": [] + "body": [], + "directives": [] } } } ] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/29/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/29/expected.json index c778376a2e..69dab292da 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/29/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/29/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "returnType": { "type": "TypeAnnotation", @@ -170,14 +169,15 @@ "column": 33 } }, - "body": [] + "body": [], + "directives": [] } } } ] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/3/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/3/expected.json index 0bd51ba5a6..6c069ca9dd 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/3/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/3/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -169,10 +168,11 @@ "column": 46 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/4/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/4/expected.json index 5af1d4df75..c888bafd92 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/4/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/4/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -139,10 +138,11 @@ "column": 42 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/44/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/44/expected.json index a13ad52d6e..ef5ec6c1fb 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/44/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/44/expected.json @@ -180,9 +180,11 @@ "column": 24 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, { "type": "NumberLiteral", @@ -198,9 +200,11 @@ "column": 27 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, { "type": "NumberLiteral", @@ -216,9 +220,11 @@ "column": 30 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } ] } @@ -226,6 +232,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/5/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/5/expected.json index 7eb48ca8f1..f68cf9d341 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/5/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/5/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -139,10 +138,11 @@ "column": 42 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/50/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/50/expected.json index d251f51520..84759bfbc6 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/50/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/50/expected.json @@ -157,7 +157,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "returnType": { "type": "TypeAnnotation", @@ -232,12 +231,15 @@ "column": 42 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] }, "typeParameters": { "type": "TypeParameterDeclaration", @@ -277,6 +279,7 @@ ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/51/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/51/expected.json index 1168baaca8..be9240f72e 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/51/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/51/expected.json @@ -103,9 +103,11 @@ "column": 17 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" }, "static": false, "kind": "method", @@ -126,7 +128,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "body": { "type": "BlockStatement", @@ -142,7 +143,8 @@ "column": 26 } }, - "body": [] + "body": [], + "directives": [] }, "typeParameters": { "type": "TypeParameterDeclaration", @@ -182,6 +184,7 @@ ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/52/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/52/expected.json index 5f58317a00..6a7b1c6f37 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/52/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/52/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -110,10 +109,11 @@ "column": 41 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/55/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/55/expected.json index 7b5fe45e43..739d25f879 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/55/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/55/expected.json @@ -149,14 +149,17 @@ "column": 27 } }, - "value": 4, - "rawValue": 4, - "raw": "4" + "extra": { + "rawValue": 4, + "raw": "4" + }, + "value": 4 } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/56/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/56/expected.json index cb00fe285f..ac710d4778 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/56/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/56/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -219,14 +218,15 @@ "column": 46 } }, - "body": [] + "body": [], + "directives": [] } } } ] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/6/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/6/expected.json index d4ddc1ff2d..9cfdcd0139 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/6/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/6/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -138,10 +137,11 @@ "column": 36 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/60/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/60/expected.json index e74d96fd69..69d4f65178 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/60/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/60/expected.json @@ -268,9 +268,11 @@ "column": 37 } }, - "value": "hello", - "rawValue": "hello", - "raw": "\"hello\"" + "extra": { + "rawValue": "hello", + "raw": "\"hello\"" + }, + "value": "hello" }, "kind": "init" } @@ -280,6 +282,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/61/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/61/expected.json index e0d9d00c06..c09b9c0fec 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/61/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/61/expected.json @@ -268,9 +268,11 @@ "column": 36 } }, - "value": "hello", - "rawValue": "hello", - "raw": "\"hello\"" + "extra": { + "rawValue": "hello", + "raw": "\"hello\"" + }, + "value": "hello" }, "kind": "init" } @@ -280,6 +282,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/62/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/62/expected.json index 505317d656..7201193e8a 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/62/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/62/expected.json @@ -197,9 +197,11 @@ "column": 34 } }, - "value": "hello", - "rawValue": "hello", - "raw": "\"hello\"" + "extra": { + "rawValue": "hello", + "raw": "\"hello\"" + }, + "value": "hello" } ] } @@ -207,6 +209,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/63/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/63/expected.json index d6686b4b73..c67a31a154 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/63/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/63/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "ObjectPattern", @@ -226,10 +225,11 @@ "column": 36 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/64/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/64/expected.json index ff6128153f..8c9d19d6c2 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/64/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/64/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "ArrayPattern", @@ -188,10 +187,11 @@ "column": 35 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/65/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/65/expected.json index d5077fb333..17d3f9e5c0 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/65/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/65/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "RestElement", @@ -186,10 +185,11 @@ "column": 39 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/66/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/66/expected.json index d684d49b74..33bccbd102 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/66/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/66/expected.json @@ -59,7 +59,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "RestElement", @@ -185,12 +184,15 @@ "column": 37 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/67/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/67/expected.json index a95af4382b..29c7ecb1b2 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/67/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/67/expected.json @@ -120,7 +120,6 @@ "id": null, "generator": false, "expression": true, - "async": false, "params": [], "body": { "type": "Identifier", @@ -143,7 +142,7 @@ ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/68/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/68/expected.json index 7e864bb663..0947eeb733 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/68/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/68/expected.json @@ -90,7 +90,6 @@ "id": null, "generator": false, "expression": true, - "async": false, "params": [ { "type": "Identifier", @@ -107,7 +106,9 @@ } }, "name": "bar", - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } ], "body": { @@ -161,7 +162,7 @@ ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/7/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/7/expected.json index 3d3f13417e..6a7ceea68d 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/7/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/7/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -141,10 +140,11 @@ "column": 36 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/72/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/72/expected.json index bab73a4f10..f6ceb4484c 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/72/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/72/expected.json @@ -120,7 +120,6 @@ "id": null, "generator": false, "expression": true, - "async": false, "params": [], "body": { "type": "Identifier", @@ -138,13 +137,15 @@ }, "name": "bar" }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/73/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/73/expected.json index 09068edec7..a14ef97682 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/73/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/73/expected.json @@ -90,7 +90,6 @@ "id": null, "generator": false, "expression": true, - "async": false, "params": [ { "type": "Identifier", @@ -107,7 +106,9 @@ } }, "name": "bar", - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } ], "body": { @@ -156,13 +157,15 @@ } } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/74/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/74/expected.json index 5583d9416d..c22c079ced 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/74/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/74/expected.json @@ -104,7 +104,6 @@ "id": null, "generator": false, "expression": true, - "async": false, "params": [ { "type": "Identifier", @@ -121,7 +120,9 @@ } }, "name": "bar", - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } ], "body": { @@ -170,7 +171,9 @@ } } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "typeAnnotation": { "type": "TypeAnnotation", @@ -202,13 +205,15 @@ } } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/78/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/78/expected.json index 27a670dddc..eec39a30b0 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/78/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/78/expected.json @@ -118,7 +118,9 @@ } }, "name": "foo", - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "alternate": { "type": "Identifier", @@ -141,7 +143,7 @@ ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/79/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/79/expected.json index 31d7654fb3..30439bfe89 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/79/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/79/expected.json @@ -120,7 +120,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -137,7 +136,9 @@ } }, "name": "foo", - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } ], "body": { @@ -154,7 +155,8 @@ "column": 36 } }, - "body": [] + "body": [], + "directives": [] }, "returnType": { "type": "TypeAnnotation", @@ -208,7 +210,7 @@ ], "kind": "var" } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/8/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/8/expected.json index e0be8e9149..55750a0092 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/8/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/8/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -141,10 +140,11 @@ "column": 38 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/80/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/80/expected.json index c1029e52d9..35d21db92f 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/80/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/80/expected.json @@ -59,7 +59,6 @@ "id": null, "generator": false, "expression": true, - "async": false, "params": [ { "type": "RestElement", @@ -187,10 +186,12 @@ }, "name": "rest" }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/89/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/89/expected.json index 6a74fc876f..fafb7c0a97 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/89/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/89/expected.json @@ -90,11 +90,14 @@ "column": 26 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/9/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/9/expected.json index 248c8fd763..d2393788e5 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/9/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/9/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -189,10 +188,11 @@ "column": 44 } }, - "body": [] + "body": [], + "directives": [] } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/90/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/90/expected.json index 645f92bcbf..d18d05b185 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/90/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/90/expected.json @@ -90,11 +90,14 @@ "column": 28 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/91/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/91/expected.json index 58a81038df..508d8b7fd6 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/91/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/91/expected.json @@ -153,11 +153,14 @@ "column": 33 } }, - "value": "baz", - "rawValue": "baz", - "raw": "\"baz\"" + "extra": { + "rawValue": "baz", + "raw": "\"baz\"" + }, + "value": "baz" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/92/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/92/expected.json index 3877416eba..3bf07813d5 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/92/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/92/expected.json @@ -106,11 +106,14 @@ "column": 37 } }, - "value": "baz", - "rawValue": "baz", - "raw": "\"baz\"" + "extra": { + "rawValue": "baz", + "raw": "\"baz\"" + }, + "value": "baz" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/93/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/93/expected.json index 11fcfc35ba..588d644b5a 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/93/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/93/expected.json @@ -90,11 +90,14 @@ "column": 22 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/94/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/94/expected.json index f12baf85de..71f88f5ecd 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/94/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/94/expected.json @@ -137,11 +137,14 @@ "column": 29 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/95/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/95/expected.json index 770d5376af..d90a424b63 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/95/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/95/expected.json @@ -90,11 +90,14 @@ "column": 37 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/96/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/96/expected.json index 4570cc24e3..11ed46da39 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/96/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/96/expected.json @@ -90,11 +90,14 @@ "column": 39 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-annotations/97/expected.json b/packages/babylon/test/fixtures/flow/type-annotations/97/expected.json index e23eb4353e..ad6352b9a0 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/97/expected.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/97/expected.json @@ -107,7 +107,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "typeParameters": { "type": "TypeParameterDeclaration", "start": 14, @@ -156,15 +155,19 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] } }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-exports/specifier-from/expected.json b/packages/babylon/test/fixtures/flow/type-exports/specifier-from/expected.json index a02b5f1134..583326b8a1 100644 --- a/packages/babylon/test/fixtures/flow/type-exports/specifier-from/expected.json +++ b/packages/babylon/test/fixtures/flow/type-exports/specifier-from/expected.json @@ -105,13 +105,16 @@ "column": 33 } }, - "value": "foobar", - "rawValue": "foobar", - "raw": "\"foobar\"" + "extra": { + "rawValue": "foobar", + "raw": "\"foobar\"" + }, + "value": "foobar" }, "exportKind": "type", "declaration": null } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/typecasts/1/expected.json b/packages/babylon/test/fixtures/flow/typecasts/1/expected.json index 85939fde85..87ffc46fab 100644 --- a/packages/babylon/test/fixtures/flow/typecasts/1/expected.json +++ b/packages/babylon/test/fixtures/flow/typecasts/1/expected.json @@ -102,10 +102,12 @@ } } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/typecasts/2/expected.json b/packages/babylon/test/fixtures/flow/typecasts/2/expected.json index d336563032..48639097eb 100644 --- a/packages/babylon/test/fixtures/flow/typecasts/2/expected.json +++ b/packages/babylon/test/fixtures/flow/typecasts/2/expected.json @@ -118,9 +118,11 @@ "column": 8 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "kind": "init" }, @@ -171,9 +173,11 @@ "column": 20 } }, - "value": "hey", - "rawValue": "hey", - "raw": "\"hey\"" + "extra": { + "rawValue": "hey", + "raw": "\"hey\"" + }, + "value": "hey" }, "kind": "init" } @@ -307,9 +311,12 @@ "indexers": [] } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/typecasts/3/expected.json b/packages/babylon/test/fixtures/flow/typecasts/3/expected.json index b11b08e49e..13303dc1d3 100644 --- a/packages/babylon/test/fixtures/flow/typecasts/3/expected.json +++ b/packages/babylon/test/fixtures/flow/typecasts/3/expected.json @@ -73,7 +73,6 @@ "id": null, "generator": false, "expression": true, - "async": false, "params": [ { "type": "Identifier", @@ -137,9 +136,11 @@ "column": 17 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } }, @@ -239,9 +240,12 @@ "typeParameters": null } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/typecasts/4/expected.json b/packages/babylon/test/fixtures/flow/typecasts/4/expected.json index 2fd24c6b1d..3fab1290ea 100644 --- a/packages/babylon/test/fixtures/flow/typecasts/4/expected.json +++ b/packages/babylon/test/fixtures/flow/typecasts/4/expected.json @@ -117,7 +117,9 @@ } } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, { "type": "TypeCastExpression", @@ -179,13 +181,17 @@ } } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/computed-properties/call-expression/expected.json b/packages/babylon/test/fixtures/harmony/computed-properties/call-expression/expected.json index ffcd91d394..df195bb3a8 100644 --- a/packages/babylon/test/fixtures/harmony/computed-properties/call-expression/expected.json +++ b/packages/babylon/test/fixtures/harmony/computed-properties/call-expression/expected.json @@ -151,9 +151,11 @@ "column": 13 } }, - "value": "", - "rawValue": "", - "raw": "\"\"" + "extra": { + "rawValue": "", + "raw": "\"\"" + }, + "value": "" }, "kind": "init" } @@ -163,6 +165,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/expected.json b/packages/babylon/test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/expected.json index c204457d46..499e822973 100644 --- a/packages/babylon/test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/expected.json +++ b/packages/babylon/test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/expected.json @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "FunctionExpression", + "type": "FunctionDeclaration", "start": 15, "end": 29, "loc": { @@ -74,7 +74,8 @@ "column": 29 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -107,9 +108,12 @@ } }, "name": "foo", - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/modules/export-default-function-expression/expected.json b/packages/babylon/test/fixtures/harmony/modules/export-default-function-expression/expected.json index b518031244..a83ccafb0b 100644 --- a/packages/babylon/test/fixtures/harmony/modules/export-default-function-expression/expected.json +++ b/packages/babylon/test/fixtures/harmony/modules/export-default-function-expression/expected.json @@ -89,11 +89,15 @@ "column": 31 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/1/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/1/expected.json index 6a4ff90185..da720c7122 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/1/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/1/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 18, "loc": { @@ -42,8 +43,8 @@ "column": 18 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 18, "loc": { @@ -56,9 +57,11 @@ "column": 18 } }, - "value": "煎茶", - "rawValue": "煎茶", - "raw": "\"\\u{714E}\\u{8336}\"" + "value": "\\u{714E}\\u{8336}", + "extra": { + "raw": "\"\\u{714E}\\u{8336}\"", + "rawValue": "\\u{714E}\\u{8336}" + } } } ] diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/10/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/10/expected.json index 263b4b83d5..742740cf25 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/10/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/10/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 2, - "rawValue": 2, - "raw": "0O2" + "extra": { + "rawValue": 2, + "raw": "0O2" + }, + "value": 2 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/100/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/100/expected.json index 666ce9a5b4..6cf9d34539 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/100/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/100/expected.json @@ -138,12 +138,15 @@ "name": "v" } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/101/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/101/expected.json index 2567fa978a..474fa746b1 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/101/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/101/expected.json @@ -122,12 +122,15 @@ } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/106/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/106/expected.json index 2e0186e88f..f5ac697314 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/106/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/106/expected.json @@ -133,18 +133,24 @@ "column": 30 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/109/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/109/options.json new file mode 100644 index 0000000000..4c07f39d17 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/109/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:16)" +} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/11/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/11/expected.json index 372c9fce63..360fcb62c6 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/11/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/11/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 10, - "rawValue": 10, - "raw": "0O12" + "extra": { + "rawValue": 10, + "raw": "0O12" + }, + "value": 10 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/12/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/12/expected.json index 607cd3e194..8e5a64d7e3 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/12/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/12/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0b0" + "extra": { + "rawValue": 0, + "raw": "0b0" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/123/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/123/expected.json index 76c74308aa..83a2d03682 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/123/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/123/expected.json @@ -28,39 +28,6 @@ }, "sourceType": "script", "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "expression": { - "type": "StringLiteral", - "start": 0, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "value": "use strict", - "rawValue": "use strict", - "raw": "\"use strict\"" - } - }, { "type": "ExpressionStatement", "start": 14, @@ -233,13 +200,53 @@ "arguments": [] } } - ] + ], + "directives": [] } } } ] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": "use strict", + "extra": { + "raw": "\"use strict\"", + "rawValue": "use strict" + } } } ] diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/124/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/124/expected.json index 964171a1ab..b3af6621a1 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/124/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/124/expected.json @@ -103,9 +103,11 @@ "column": 22 } }, - "value": "constructor", - "rawValue": "constructor", - "raw": "'constructor'" + "extra": { + "rawValue": "constructor", + "raw": "'constructor'" + }, + "value": "constructor" }, "static": false, "kind": "constructor", @@ -141,13 +143,15 @@ "column": 27 } }, - "body": [] + "body": [], + "directives": [] } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/13/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/13/expected.json index 23356e76be..869a4573f6 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/13/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/13/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 1, - "rawValue": 1, - "raw": "0b1" + "extra": { + "rawValue": 1, + "raw": "0b1" + }, + "value": 1 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/130/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/130/expected.json index 6f0fe5e565..19d9b17be0 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/130/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/130/expected.json @@ -28,39 +28,6 @@ }, "sourceType": "script", "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "expression": { - "type": "StringLiteral", - "start": 0, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "value": "use strict", - "rawValue": "use strict", - "raw": "\"use strict\"" - } - }, { "type": "ExpressionStatement", "start": 14, @@ -233,13 +200,53 @@ "arguments": [] } } - ] + ], + "directives": [] } } } ] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": "use strict", + "extra": { + "raw": "\"use strict\"", + "rawValue": "use strict" + } } } ] diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/14/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/14/expected.json index be3c47afa8..946f9be4db 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/14/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/14/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 2, - "rawValue": 2, - "raw": "0b10" + "extra": { + "rawValue": 2, + "raw": "0b10" + }, + "value": 2 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/141/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/141/expected.json index d47fdad79c..9c4ce67855 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/141/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/141/expected.json @@ -104,16 +104,21 @@ "column": 9 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/142/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/142/expected.json index 259c9600a4..6198ec9aa5 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/142/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/142/expected.json @@ -102,9 +102,11 @@ "column": 6 } }, - "value": "x", - "rawValue": "x", - "raw": "\"x\"" + "extra": { + "rawValue": "x", + "raw": "\"x\"" + }, + "value": "x" }, "operator": "+", "right": { @@ -121,9 +123,11 @@ "column": 12 } }, - "value": "y", - "rawValue": "y", - "raw": "\"y\"" + "extra": { + "rawValue": "y", + "raw": "\"y\"" + }, + "value": "y" } }, "value": { @@ -140,16 +144,21 @@ "column": 17 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/143/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/143/expected.json index d73cb3b632..01caab9e66 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/143/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/143/expected.json @@ -122,16 +122,19 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/144/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/144/expected.json index 2e3bc139b5..25f8cb97cc 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/144/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/144/expected.json @@ -104,9 +104,11 @@ "column": 9 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" }, @@ -157,16 +159,21 @@ "column": 16 } }, - "value": 20, - "rawValue": 20, - "raw": "20" + "extra": { + "rawValue": 20, + "raw": "20" + }, + "value": 20 }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/145/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/145/expected.json index 081f297ff9..89a62e0093 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/145/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/145/expected.json @@ -123,7 +123,8 @@ "column": 14 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -210,15 +211,18 @@ "column": 29 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/146/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/146/expected.json index 084e6c8144..68e454ca7f 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/146/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/146/expected.json @@ -123,15 +123,18 @@ "column": 10 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/15/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/15/expected.json index ae57cab25c..50c71c2d94 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/15/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/15/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0B0" + "extra": { + "rawValue": 0, + "raw": "0B0" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/152/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/152/expected.json index f48012f5a7..0a09df6992 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/152/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/152/expected.json @@ -137,9 +137,11 @@ "column": 19 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } ] } @@ -159,9 +161,11 @@ "column": 24 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/153/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/153/expected.json index c58bffb9c1..5830686c0b 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/153/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/153/expected.json @@ -205,9 +205,11 @@ "column": 23 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -229,9 +231,11 @@ "column": 28 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/154/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/154/expected.json index da3399ea06..c27822598f 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/154/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/154/expected.json @@ -235,9 +235,11 @@ "column": 25 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -259,11 +261,13 @@ "column": 30 } }, - "body": [] + "body": [], + "directives": [] } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/155/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/155/expected.json index e1d8689d55..4892fdd837 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/155/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/155/expected.json @@ -252,9 +252,11 @@ "column": 26 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -276,15 +278,19 @@ "column": 31 } }, - "body": [] + "body": [], + "directives": [] } }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/156/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/156/expected.json index 02567ac39f..f918574a30 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/156/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/156/expected.json @@ -253,9 +253,11 @@ "column": 16 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -277,14 +279,18 @@ "column": 21 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/157/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/157/expected.json index 2995b318d4..519875cdd1 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/157/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/157/expected.json @@ -268,9 +268,11 @@ "column": 22 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -292,15 +294,19 @@ "column": 27 } }, - "body": [] + "body": [], + "directives": [] } } } ] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/158/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/158/expected.json index a58c38c687..126c8430f4 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/158/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/158/expected.json @@ -204,9 +204,11 @@ "column": 14 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -228,11 +230,15 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/159/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/159/expected.json index 8f7d2304f4..3799c4ee35 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/159/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/159/expected.json @@ -135,9 +135,11 @@ "column": 18 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -155,11 +157,13 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/16/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/16/expected.json index 4937dfc854..94253b3ff7 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/16/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/16/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 1, - "rawValue": 1, - "raw": "0B1" + "extra": { + "rawValue": 1, + "raw": "0B1" + }, + "value": 1 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/160/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/160/expected.json index beb32095e0..b922dc9f54 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/160/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/160/expected.json @@ -105,9 +105,11 @@ "column": 16 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -125,9 +127,11 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/161/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/161/expected.json index 133d3320bc..0fdbc8a52e 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/161/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/161/expected.json @@ -183,9 +183,11 @@ "column": 21 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -203,7 +205,8 @@ "column": 25 } }, - "body": [] + "body": [], + "directives": [] } }, "kind": "init" @@ -212,6 +215,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/162/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/162/expected.json index 36f0dea590..95a9a2ba3e 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/162/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/162/expected.json @@ -184,9 +184,11 @@ "column": 11 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -204,7 +206,8 @@ "column": 15 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -212,6 +215,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/167/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/167/options.json new file mode 100644 index 0000000000..d50e8469b8 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/167/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:14)" +} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/168/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/168/options.json new file mode 100644 index 0000000000..9ac2c7432d --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/168/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:42)" +} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/169/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/169/expected.json index 79ea543bbe..7aa4a008d7 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/169/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/169/expected.json @@ -139,12 +139,15 @@ "column": 23 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/17/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/17/expected.json index e6cfe9f05a..5a539443cf 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/17/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/17/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 2, - "rawValue": 2, - "raw": "0B10" + "extra": { + "rawValue": 2, + "raw": "0B10" + }, + "value": 2 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/170/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/170/expected.json index 438f7a1d90..7d82cfb3bb 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/170/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/170/expected.json @@ -209,12 +209,15 @@ "column": 23 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/171/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/171/options.json new file mode 100644 index 0000000000..98d7123790 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/171/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:15)" +} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/172/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/172/options.json new file mode 100644 index 0000000000..ceee1cc2ef --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/172/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:43)" +} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/173/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/173/expected.json index aab765b409..870de96929 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/173/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/173/expected.json @@ -173,15 +173,18 @@ "column": 16 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/174/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/174/options.json new file mode 100644 index 0000000000..9ce9658f7d --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/174/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:8)" +} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/175/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/175/options.json new file mode 100644 index 0000000000..4914c41568 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/175/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:36)" +} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/180/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/180/options.json new file mode 100644 index 0000000000..27a7b64d71 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/180/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:4)" +} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/181/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/181/options.json new file mode 100644 index 0000000000..c958665c03 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/181/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:7)" +} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/195/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/195/expected.json index 0f0150fd2b..908ecf8753 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/195/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/195/expected.json @@ -56,11 +56,14 @@ "column": 8 } }, - "raw": "/[a-z]/u", + "extra": { + "raw": "/[a-z]/u" + }, "pattern": "[a-z]", "flags": "u" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/196/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/196/expected.json index 13ccb35613..04066b5458 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/196/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/196/expected.json @@ -56,11 +56,14 @@ "column": 33 } }, - "raw": "/[\\uD834\\uDF06-\\uD834\\uDF08a-z]/u", + "extra": { + "raw": "/[\\uD834\\uDF06-\\uD834\\uDF08a-z]/u" + }, "pattern": "[\\uD834\\uDF06-\\uD834\\uDF08a-z]", "flags": "u" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/197/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/197/expected.json index aa7ff354b4..ca35fe564c 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/197/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/197/expected.json @@ -56,7 +56,8 @@ "column": 5 } }, - "body": [] + "body": [], + "directives": [] }, "test": { "type": "BooleanLiteral", @@ -72,9 +73,7 @@ "column": 18 } }, - "value": false, - "rawValue": false, - "raw": "false" + "value": false } }, { @@ -124,6 +123,7 @@ "arguments": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/2/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/2/expected.json index 5a854ab9f5..7430f1229e 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/2/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/2/expected.json @@ -27,9 +27,10 @@ } }, "sourceType": "script", - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 0, "end": 27, "loc": { @@ -42,8 +43,8 @@ "column": 27 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 27, "loc": { @@ -56,9 +57,11 @@ "column": 27 } }, - "value": "𠮷野家", - "rawValue": "𠮷野家", - "raw": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"" + "value": "\\u{20BB7}\\u{91CE}\\u{5BB6}", + "extra": { + "raw": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"", + "rawValue": "\\u{20BB7}\\u{91CE}\\u{5BB6}" + } } } ] diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/227/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/227/expected.json new file mode 100644 index 0000000000..df800e90dc --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/227/expected.json @@ -0,0 +1,295 @@ +{ + "type": "File", + "start": 0, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "hello" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 32, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 33, + "end": 55, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 55 + } + }, + "properties": [ + { + "type": "Property", + "start": 35, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "i" + }, + "value": { + "type": "NumberLiteral", + "start": 38, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 42, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "method": true, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 42, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "name": "s" + }, + "kind": "init", + "value": { + "type": "FunctionExpression", + "start": 43, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 43 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 44, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 44 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "name": "eval" + } + ], + "body": { + "type": "BlockStatement", + "start": 50, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 50 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "body": [], + "directives": [] + } + } + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 18, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/228/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/228/expected.json new file mode 100644 index 0000000000..ce7968931a --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/228/expected.json @@ -0,0 +1,258 @@ +{ + "type": "File", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": "a" + }, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 29, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 30, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "properties": [ + { + "type": "Property", + "start": 32, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "method": true, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 32, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "name": "b" + }, + "kind": "init", + "value": { + "type": "FunctionExpression", + "start": 33, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 34, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "name": "t" + }, + { + "type": "Identifier", + "start": 37, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "name": "t" + } + ], + "body": { + "type": "BlockStatement", + "start": 40, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "body": [], + "directives": [] + } + } + } + ], + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 15, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 15, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/242/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/242/expected.json new file mode 100644 index 0000000000..49f6398459 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/242/expected.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "AssignmentPattern", + "start": 15, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "left": { + "type": "Identifier", + "start": 15, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": "eval" + }, + "right": { + "type": "NumberLiteral", + "start": 22, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + ], + "body": { + "type": "NumberLiteral", + "start": 29, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/243/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/243/expected.json new file mode 100644 index 0000000000..56900a141d --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/243/expected.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 14, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": "eval" + } + ], + "body": { + "type": "NumberLiteral", + "start": 22, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/244/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/244/expected.json new file mode 100644 index 0000000000..3382211829 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/244/expected.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "name": "arguments" + } + ], + "body": { + "type": "NumberLiteral", + "start": 27, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/245/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/245/expected.json new file mode 100644 index 0000000000..c06f39c9f0 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/245/expected.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 15, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": "eval" + }, + { + "type": "Identifier", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "name": "a" + } + ], + "body": { + "type": "NumberLiteral", + "start": 27, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/246/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/246/expected.json new file mode 100644 index 0000000000..39df05159f --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/246/expected.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 15, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "name": "arguments" + }, + { + "type": "Identifier", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "name": "a" + } + ], + "body": { + "type": "NumberLiteral", + "start": 32, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/247/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/247/expected.json new file mode 100644 index 0000000000..ab7e964fd0 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/247/expected.json @@ -0,0 +1,185 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 15, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": "eval" + }, + { + "type": "AssignmentPattern", + "start": 21, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "left": { + "type": "Identifier", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "name": "a" + }, + "right": { + "type": "NumberLiteral", + "start": 25, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + ], + "body": { + "type": "NumberLiteral", + "start": 32, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/249/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/249/expected.json new file mode 100644 index 0000000000..154fb56eab --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/249/expected.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "name": "a" + } + ], + "body": { + "type": "NumberLiteral", + "start": 21, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": 0, + "rawValue": 0, + "raw": "00" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/256/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/256/expected.json index 3d0fad6ce6..04ca39f3c8 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/256/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/256/expected.json @@ -87,12 +87,15 @@ "column": 9 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/257/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/257/expected.json index 3aef2ac8d9..e424fec694 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/257/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/257/expected.json @@ -122,13 +122,16 @@ "column": 14 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/259/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/259/expected.json index 970d0563d8..8dbb933a6c 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/259/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/259/expected.json @@ -134,17 +134,23 @@ "column": 24 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/26/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/26/expected.json index 08ba30f47d..a5de31017e 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/26/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/26/expected.json @@ -167,9 +167,11 @@ "column": 18 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -255,12 +257,15 @@ "column": 54 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } - ] + ], + "directives": [] } } ], @@ -372,6 +377,7 @@ ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/269/actual.js b/packages/babylon/test/fixtures/harmony/uncategorised/269/actual.js deleted file mode 100644 index 30922446bc..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/269/actual.js +++ /dev/null @@ -1 +0,0 @@ -[for (let x of []) x] \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/269/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/269/options.json deleted file mode 100644 index 880504f34d..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/269/options.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "features": { - "comprehensions": true - }, - "throws": "Unexpected token (1:6)" -} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/27/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/27/expected.json index e61945111a..2d90f27140 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/27/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/27/expected.json @@ -133,9 +133,11 @@ "column": 37 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], @@ -172,13 +174,16 @@ "column": 25 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ] } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/270/actual.js b/packages/babylon/test/fixtures/harmony/uncategorised/270/actual.js deleted file mode 100644 index b2b34f814d..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/270/actual.js +++ /dev/null @@ -1 +0,0 @@ -[for (const x of []) x] \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/270/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/270/options.json deleted file mode 100644 index 880504f34d..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/270/options.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "features": { - "comprehensions": true - }, - "throws": "Unexpected token (1:6)" -} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/271/actual.js b/packages/babylon/test/fixtures/harmony/uncategorised/271/actual.js deleted file mode 100644 index d4887f4769..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/271/actual.js +++ /dev/null @@ -1 +0,0 @@ -[for (var x of []) x] \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/271/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/271/options.json deleted file mode 100644 index 880504f34d..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/271/options.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "features": { - "comprehensions": true - }, - "throws": "Unexpected token (1:6)" -} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/272/actual.js b/packages/babylon/test/fixtures/harmony/uncategorised/272/actual.js deleted file mode 100644 index d34bafa125..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/272/actual.js +++ /dev/null @@ -1 +0,0 @@ -[for (a in []) x] // (a,b) \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/272/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/272/options.json deleted file mode 100644 index dad599c3b8..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/272/options.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "features": { - "comprehensions": true - }, - "throws": "Unexpected token (1:8)" -} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/274/actual.js b/packages/babylon/test/fixtures/harmony/uncategorised/274/actual.js deleted file mode 100644 index 3ea1a6eee6..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/274/actual.js +++ /dev/null @@ -1 +0,0 @@ -[for (x of [])] // no expression \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/274/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/274/options.json deleted file mode 100644 index 9b7c4355a5..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/274/options.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "features": { - "comprehensions": true - }, - "throws": "Unexpected token (1:14)" -} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/28/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/28/expected.json index ed4c1605fe..6b22652418 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/28/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/28/expected.json @@ -74,12 +74,15 @@ "column": 12 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/280/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/280/expected.json new file mode 100644 index 0000000000..a001a84bd3 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/280/expected.json @@ -0,0 +1,203 @@ +{ + "type": "File", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 14, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "id": { + "type": "Identifier", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "name": "x" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "name": "a" + }, + { + "type": "ObjectPattern", + "start": 28, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "properties": [ + { + "type": "Property", + "start": 30, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 30, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "name": "a" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 30, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "name": "a" + } + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 34, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/281/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/281/expected.json new file mode 100644 index 0000000000..8976155772 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/281/expected.json @@ -0,0 +1,376 @@ +{ + "type": "File", + "start": 0, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 14, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "id": { + "type": "Identifier", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "name": "x" + }, + "generator": false, + "expression": false, + "params": [ + { + "type": "ObjectPattern", + "start": 25, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "properties": [ + { + "type": "Property", + "start": 27, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "name": "b" + }, + "value": { + "type": "ObjectPattern", + "start": 30, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "properties": [ + { + "type": "Property", + "start": 32, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 32, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "name": "a" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 32, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "name": "a" + } + } + ] + }, + "kind": "init" + } + ] + }, + { + "type": "ArrayPattern", + "start": 39, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "elements": [ + { + "type": "ObjectPattern", + "start": 40, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "properties": [ + { + "type": "Property", + "start": 42, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 42, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "name": "b" + }, + "value": { + "type": "ObjectPattern", + "start": 45, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 45 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "properties": [ + { + "type": "Property", + "start": 47, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 47, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "name": "a" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 47, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "name": "a" + } + } + ] + }, + "kind": "init" + } + ] + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 54, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 54 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/282/actual.js b/packages/babylon/test/fixtures/harmony/uncategorised/282/actual.js deleted file mode 100644 index 9449b67d82..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/282/actual.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; function x(a, ...[a]){} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/282/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/282/options.json deleted file mode 100644 index 6adffc0f53..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/282/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "Argument name clash in strict mode (1:32)" -} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/286/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/286/options.json index 515b971673..27a7b64d71 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/286/options.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/286/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:6)" -} \ No newline at end of file + "throws": "Unexpected token (1:4)" +} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/29/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/29/expected.json index c3e068731d..070478ffa3 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/29/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/29/expected.json @@ -91,12 +91,15 @@ "column": 11 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/296/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/296/expected.json new file mode 100644 index 0000000000..c444d65091 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/296/expected.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 14, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "id": null, + "generator": false, + "expression": true, + "params": [ + { + "type": "Identifier", + "start": 15, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": "eval" + } + ], + "body": { + "type": "NumberLiteral", + "start": 24, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "\"use strict\"", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/3/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/3/expected.json index 1e3d179cd6..bcf619d9dd 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/3/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/3/expected.json @@ -56,11 +56,14 @@ "column": 2 } }, - "value": 0, - "rawValue": 0, - "raw": "00" + "extra": { + "rawValue": 0, + "raw": "00" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/30/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/30/expected.json index dc38971fa7..71885e218e 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/30/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/30/expected.json @@ -91,12 +91,15 @@ "column": 13 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/300/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/300/expected.json index 89a1eb3ff5..5cdf1b449d 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/300/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/300/expected.json @@ -121,9 +121,11 @@ "column": 25 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } ], @@ -141,9 +143,11 @@ "column": 29 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/301/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/301/expected.json index 448e59b1ff..2e575ba5c1 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/301/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/301/expected.json @@ -120,11 +120,14 @@ "column": 31 } }, - "value": "baz", - "rawValue": "baz", - "raw": "'baz'" + "extra": { + "rawValue": "baz", + "raw": "'baz'" + }, + "value": "baz" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/307/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/307/expected.json index 293ea2a087..fa5a1fed3e 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/307/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/307/expected.json @@ -150,9 +150,11 @@ "column": 7 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } @@ -174,9 +176,12 @@ }, "name": "obj" }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/308/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/308/expected.json index 2517a00a40..f13152264e 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/308/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/308/expected.json @@ -153,9 +153,11 @@ "column": 7 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } @@ -180,6 +182,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/309/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/309/expected.json index 78a133f6c2..21ff2e2c8b 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/309/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/309/expected.json @@ -229,9 +229,11 @@ "column": 14 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } } @@ -261,6 +263,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/31/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/31/expected.json index 4bdd74c258..57366e881f 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/31/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/31/expected.json @@ -107,12 +107,15 @@ "column": 16 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/310/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/310/expected.json index aba62152a7..efd6b8cb0f 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/310/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/310/expected.json @@ -135,9 +135,11 @@ "column": 11 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } @@ -175,6 +177,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/317/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/317/expected.json index 49647b97c8..69257a35a5 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/317/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/317/expected.json @@ -113,7 +113,9 @@ "column": 7 } }, - "raw": "/\\d/", + "extra": { + "raw": "/\\d/" + }, "pattern": "\\d", "flags": "" }, @@ -150,9 +152,11 @@ "column": 16 } }, - "value": "1", - "rawValue": "1", - "raw": "'1'" + "extra": { + "rawValue": "1", + "raw": "'1'" + }, + "value": "1" } ] }, @@ -170,9 +174,11 @@ "column": 19 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "computed": true } @@ -221,6 +227,7 @@ ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/318/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/318/expected.json index bb330b9204..becd7dd80d 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/318/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/318/expected.json @@ -87,14 +87,17 @@ "column": 12 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/319/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/319/expected.json index 136c5bbf00..63f3b5c58b 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/319/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/319/expected.json @@ -87,14 +87,17 @@ "column": 19 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/32/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/32/expected.json index ebd04a794b..a6acfabee4 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/32/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/32/expected.json @@ -120,15 +120,19 @@ "column": 9 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/320/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/320/expected.json index e03993bade..95f406a78c 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/320/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/320/expected.json @@ -119,9 +119,11 @@ "column": 13 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } ] } @@ -129,6 +131,7 @@ ], "kind": "let" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/322/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/322/expected.json index 4accd0cb4a..c3bfc6c465 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/322/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/322/expected.json @@ -105,12 +105,15 @@ "column": 9 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/33/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/33/expected.json index 7a3afe8bd4..fbd87bd0c4 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/33/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/33/expected.json @@ -139,17 +139,22 @@ "column": 20 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/332/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/332/expected.json new file mode 100644 index 0000000000..841701d361 --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/332/expected.json @@ -0,0 +1,162 @@ +{ + "type": "File", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "operator": "=", + "left": { + "type": "ArrayPattern", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "elements": [ + { + "type": "RestElement", + "start": 15, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "argument": { + "type": "Identifier", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "name": "eval" + } + } + ] + }, + "right": { + "type": "Identifier", + "start": 26, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "name": "arr" + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/333/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/333/expected.json new file mode 100644 index 0000000000..beb769433c --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/333/expected.json @@ -0,0 +1,216 @@ +{ + "type": "File", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 15, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "operator": "=", + "left": { + "type": "ObjectPattern", + "start": 15, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "properties": [ + { + "type": "Property", + "start": 16, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 16, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "name": "eval" + }, + "kind": "init", + "value": { + "type": "AssignmentPattern", + "start": 16, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "left": { + "type": "Identifier", + "start": 16, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "name": "eval" + }, + "right": { + "type": "Identifier", + "start": 23, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "name": "defValue" + } + } + } + ] + }, + "right": { + "type": "Identifier", + "start": 35, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "name": "obj" + }, + "extra": { + "parenthesized": true + } + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "raw": "'use strict'", + "value": "use strict" + } + } + ] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/338/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/338/expected.json index 1f7043e170..909735dfe5 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/338/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/338/expected.json @@ -89,7 +89,8 @@ "column": 32 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -121,11 +122,10 @@ "column": 38 } }, - "value": false, - "rawValue": false, - "raw": "false" + "value": false } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/34/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/34/expected.json index 287f532194..fe17cfad68 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/34/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/34/expected.json @@ -134,9 +134,11 @@ "column": 16 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, "label": { @@ -156,10 +158,12 @@ "name": "label" } } - ] + ], + "directives": [] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/35/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/35/expected.json index 9a918edee0..59f0dbf100 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/35/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/35/expected.json @@ -136,15 +136,19 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/353/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/353/options.json new file mode 100644 index 0000000000..a8b5ad2f5b --- /dev/null +++ b/packages/babylon/test/fixtures/harmony/uncategorised/353/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Redefinition of __proto__ property (1:14)" +} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/36/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/36/expected.json index a1ba25b09e..d9a7158baa 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/36/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/36/expected.json @@ -125,12 +125,15 @@ "column": 16 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/39/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/39/expected.json index 8b3e1161d1..1d3eb7338f 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/39/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/39/expected.json @@ -104,9 +104,11 @@ "column": 4 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -160,6 +162,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/4/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/4/expected.json index ccdde2fe5f..8a021344bb 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/4/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/4/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0o0" + "extra": { + "rawValue": 0, + "raw": "0o0" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/40/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/40/expected.json index 3351297bbe..b4e861da61 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/40/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/40/expected.json @@ -91,12 +91,15 @@ "column": 10 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/41/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/41/expected.json index cdb3afb5bc..f3bbc75306 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/41/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/41/expected.json @@ -91,12 +91,15 @@ "column": 15 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/42/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/42/expected.json index c40f9bbb31..98652468ab 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/42/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/42/expected.json @@ -91,12 +91,15 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "00" + "extra": { + "rawValue": 0, + "raw": "00" + }, + "value": 0 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/43/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/43/expected.json index 95224d5129..d4be8b7577 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/43/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/43/expected.json @@ -107,12 +107,15 @@ "column": 15 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/44/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/44/expected.json index 645860e175..8a08def13e 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/44/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/44/expected.json @@ -104,9 +104,11 @@ "column": 10 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } ], @@ -124,12 +126,15 @@ "column": 17 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/45/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/45/expected.json index fd39c13ced..b782563eff 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/45/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/45/expected.json @@ -120,9 +120,11 @@ "column": 13 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } ], @@ -140,12 +142,15 @@ "column": 20 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/46/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/46/expected.json index b5b31e4fa6..b565e367ee 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/46/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/46/expected.json @@ -93,10 +93,12 @@ }, "name": "x" }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/47/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/47/expected.json index 8368737c3f..3fc7b625b7 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/47/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/47/expected.json @@ -126,13 +126,16 @@ "column": 12 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/48/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/48/expected.json index 463aa60586..7d5558cdaf 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/48/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/48/expected.json @@ -192,13 +192,17 @@ "name": "z" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/5/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/5/expected.json index b8fdcdd6b2..aa7e6a2f80 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/5/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/5/expected.json @@ -76,39 +76,6 @@ } }, "body": [ - { - "type": "ExpressionStatement", - "start": 17, - "end": 30, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 30 - } - }, - "expression": { - "type": "StringLiteral", - "start": 17, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "value": "use strict", - "rawValue": "use strict", - "raw": "'use strict'" - } - }, { "type": "ExpressionStatement", "start": 31, @@ -137,14 +104,54 @@ "column": 34 } }, - "value": 0, - "rawValue": 0, - "raw": "0o0" + "extra": { + "rawValue": 0, + "raw": "0o0" + }, + "value": 0 + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 17, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 17, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": "use strict", + "extra": { + "raw": "'use strict'", + "rawValue": "use strict" + } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/54/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/54/expected.json index 29fd63476c..e964b38846 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/54/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/54/expected.json @@ -119,9 +119,11 @@ "column": 14 } }, - "value": "method", - "rawValue": "method", - "raw": "'method'" + "extra": { + "rawValue": "method", + "raw": "'method'" + }, + "value": "method" }, "kind": "init", "value": { @@ -156,7 +158,8 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -164,6 +167,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/57/actual.js b/packages/babylon/test/fixtures/harmony/uncategorised/57/actual.js deleted file mode 100644 index 7e3c6b71dc..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/57/actual.js +++ /dev/null @@ -1 +0,0 @@ -[for (x of array) x] \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/57/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/57/options.json deleted file mode 100644 index 142b9fa2a0..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/57/options.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "features": { - "comprehensions": true - } -} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/58/actual.js b/packages/babylon/test/fixtures/harmony/uncategorised/58/actual.js deleted file mode 100644 index e3fe4142ad..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/58/actual.js +++ /dev/null @@ -1 +0,0 @@ -[for (x of array) for (y of array2) if (x === test) x] \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/58/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/58/expected.json deleted file mode 100644 index 26450dfeb4..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/58/expected.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "sourceType": "script", - "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "expression": { - "type": "ComprehensionExpression", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "blocks": [ - { - "type": "ComprehensionBlock", - "start": 1, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "left": { - "type": "Identifier", - "start": 6, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - }, - "name": "x" - }, - "right": { - "type": "Identifier", - "start": 11, - "end": 16, - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 16 - } - }, - "name": "array" - } - }, - { - "type": "ComprehensionBlock", - "start": 18, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 35 - } - }, - "left": { - "type": "Identifier", - "start": 23, - "end": 24, - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 24 - } - }, - "name": "y" - }, - "right": { - "type": "Identifier", - "start": 28, - "end": 34, - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 34 - } - }, - "name": "array2" - } - } - ], - "filter": { - "type": "BinaryExpression", - "start": 40, - "end": 50, - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 50 - } - }, - "left": { - "type": "Identifier", - "start": 40, - "end": 41, - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 41 - } - }, - "name": "x" - }, - "operator": "===", - "right": { - "type": "Identifier", - "start": 46, - "end": 50, - "loc": { - "start": { - "line": 1, - "column": 46 - }, - "end": { - "line": 1, - "column": 50 - } - }, - "name": "test" - } - }, - "body": { - "type": "Identifier", - "start": 52, - "end": 53, - "loc": { - "start": { - "line": 1, - "column": 52 - }, - "end": { - "line": 1, - "column": 53 - } - }, - "name": "x" - }, - "generator": false - } - } - ] - }, - "comments": [] -} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/58/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/58/options.json deleted file mode 100644 index 142b9fa2a0..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/58/options.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "features": { - "comprehensions": true - } -} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/59/actual.js b/packages/babylon/test/fixtures/harmony/uncategorised/59/actual.js deleted file mode 100644 index 0639b61b1c..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/59/actual.js +++ /dev/null @@ -1 +0,0 @@ -(for (x of array) for (y of array2) if (x === test) x) \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/59/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/59/expected.json deleted file mode 100644 index 438b7a59b1..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/59/expected.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "sourceType": "script", - "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "expression": { - "type": "ComprehensionExpression", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "blocks": [ - { - "type": "ComprehensionBlock", - "start": 1, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "left": { - "type": "Identifier", - "start": 6, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - }, - "name": "x" - }, - "right": { - "type": "Identifier", - "start": 11, - "end": 16, - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 16 - } - }, - "name": "array" - } - }, - { - "type": "ComprehensionBlock", - "start": 18, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 35 - } - }, - "left": { - "type": "Identifier", - "start": 23, - "end": 24, - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 24 - } - }, - "name": "y" - }, - "right": { - "type": "Identifier", - "start": 28, - "end": 34, - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 34 - } - }, - "name": "array2" - } - } - ], - "filter": { - "type": "BinaryExpression", - "start": 40, - "end": 50, - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 50 - } - }, - "left": { - "type": "Identifier", - "start": 40, - "end": 41, - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 41 - } - }, - "name": "x" - }, - "operator": "===", - "right": { - "type": "Identifier", - "start": 46, - "end": 50, - "loc": { - "start": { - "line": 1, - "column": 46 - }, - "end": { - "line": 1, - "column": 50 - } - }, - "name": "test" - } - }, - "body": { - "type": "Identifier", - "start": 52, - "end": 53, - "loc": { - "start": { - "line": 1, - "column": 52 - }, - "end": { - "line": 1, - "column": 53 - } - }, - "name": "x" - }, - "generator": true - } - } - ] - }, - "comments": [] -} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/59/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/59/options.json deleted file mode 100644 index 142b9fa2a0..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/59/options.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "features": { - "comprehensions": true - } -} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/6/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/6/expected.json index 58c5a75980..118b2f32c6 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/6/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/6/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 2, - "rawValue": 2, - "raw": "0o2" + "extra": { + "rawValue": 2, + "raw": "0o2" + }, + "value": 2 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/60/actual.js b/packages/babylon/test/fixtures/harmony/uncategorised/60/actual.js deleted file mode 100644 index f1fa787179..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/60/actual.js +++ /dev/null @@ -1 +0,0 @@ -[for ([,x] of array) for ({[start.x]: x, [start.y]: y} of array2) x] \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/60/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/60/expected.json deleted file mode 100644 index 05feccbca7..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/60/expected.json +++ /dev/null @@ -1,363 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 68, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 68 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 68, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 68 - } - }, - "sourceType": "script", - "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 68, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 68 - } - }, - "expression": { - "type": "ComprehensionExpression", - "start": 0, - "end": 68, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 68 - } - }, - "blocks": [ - { - "type": "ComprehensionBlock", - "start": 1, - "end": 20, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 20 - } - }, - "left": { - "type": "ArrayPattern", - "start": 6, - "end": 10, - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 10 - } - }, - "elements": [ - null, - { - "type": "Identifier", - "start": 8, - "end": 9, - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 9 - } - }, - "name": "x" - } - ] - }, - "right": { - "type": "Identifier", - "start": 14, - "end": 19, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 19 - } - }, - "name": "array" - } - }, - { - "type": "ComprehensionBlock", - "start": 21, - "end": 65, - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 65 - } - }, - "left": { - "type": "ObjectPattern", - "start": 26, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 26 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "properties": [ - { - "type": "Property", - "start": 27, - "end": 39, - "loc": { - "start": { - "line": 1, - "column": 27 - }, - "end": { - "line": 1, - "column": 39 - } - }, - "method": false, - "shorthand": false, - "computed": true, - "key": { - "type": "MemberExpression", - "start": 28, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 35 - } - }, - "object": { - "type": "Identifier", - "start": 28, - "end": 33, - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 33 - } - }, - "name": "start" - }, - "property": { - "type": "Identifier", - "start": 34, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 34 - }, - "end": { - "line": 1, - "column": 35 - } - }, - "name": "x" - }, - "computed": false - }, - "value": { - "type": "Identifier", - "start": 38, - "end": 39, - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 39 - } - }, - "name": "x" - }, - "kind": "init" - }, - { - "type": "Property", - "start": 41, - "end": 53, - "loc": { - "start": { - "line": 1, - "column": 41 - }, - "end": { - "line": 1, - "column": 53 - } - }, - "method": false, - "shorthand": false, - "computed": true, - "key": { - "type": "MemberExpression", - "start": 42, - "end": 49, - "loc": { - "start": { - "line": 1, - "column": 42 - }, - "end": { - "line": 1, - "column": 49 - } - }, - "object": { - "type": "Identifier", - "start": 42, - "end": 47, - "loc": { - "start": { - "line": 1, - "column": 42 - }, - "end": { - "line": 1, - "column": 47 - } - }, - "name": "start" - }, - "property": { - "type": "Identifier", - "start": 48, - "end": 49, - "loc": { - "start": { - "line": 1, - "column": 48 - }, - "end": { - "line": 1, - "column": 49 - } - }, - "name": "y" - }, - "computed": false - }, - "value": { - "type": "Identifier", - "start": 52, - "end": 53, - "loc": { - "start": { - "line": 1, - "column": 52 - }, - "end": { - "line": 1, - "column": 53 - } - }, - "name": "y" - }, - "kind": "init" - } - ] - }, - "right": { - "type": "Identifier", - "start": 58, - "end": 64, - "loc": { - "start": { - "line": 1, - "column": 58 - }, - "end": { - "line": 1, - "column": 64 - } - }, - "name": "array2" - } - } - ], - "filter": null, - "body": { - "type": "Identifier", - "start": 66, - "end": 67, - "loc": { - "start": { - "line": 1, - "column": 66 - }, - "end": { - "line": 1, - "column": 67 - } - }, - "name": "x" - }, - "generator": false - } - } - ] - }, - "comments": [] -} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/60/options.json b/packages/babylon/test/fixtures/harmony/uncategorised/60/options.json deleted file mode 100644 index 142b9fa2a0..0000000000 --- a/packages/babylon/test/fixtures/harmony/uncategorised/60/options.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "features": { - "comprehensions": true - } -} diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/7/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/7/expected.json index fc506965ec..5636575a62 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/7/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/7/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 10, - "rawValue": 10, - "raw": "0o12" + "extra": { + "rawValue": 10, + "raw": "0o12" + }, + "value": 10 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/79/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/79/expected.json index 514934f092..a2c5438b1b 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/79/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/79/expected.json @@ -56,11 +56,14 @@ "column": 17 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/8/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/8/expected.json index 0e4a704196..7c2c994467 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/8/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/8/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0O0" + "extra": { + "rawValue": 0, + "raw": "0O0" + }, + "value": 0 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/80/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/80/expected.json index 7b2bcc83bd..364e85431c 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/80/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/80/expected.json @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "FunctionExpression", + "type": "FunctionDeclaration", "start": 15, "end": 29, "loc": { @@ -74,11 +74,12 @@ "column": 29 } }, - "body": [] + "body": [], + "directives": [] } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/82/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/82/expected.json index f0b1e778eb..c6453bfd9c 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/82/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/82/expected.json @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "ClassExpression", + "type": "ClassDeclaration", "start": 15, "end": 23, "loc": { @@ -76,7 +76,7 @@ } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/85/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/85/expected.json index 70d15519cf..192aa9db0f 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/85/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/85/expected.json @@ -56,11 +56,14 @@ "column": 22 } }, - "value": "crypto", - "rawValue": "crypto", - "raw": "\"crypto\"" + "extra": { + "rawValue": "crypto", + "raw": "\"crypto\"" + }, + "value": "crypto" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/9/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/9/expected.json index ed92c39059..306190058c 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/9/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/9/expected.json @@ -76,39 +76,6 @@ } }, "body": [ - { - "type": "ExpressionStatement", - "start": 17, - "end": 30, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 30 - } - }, - "expression": { - "type": "StringLiteral", - "start": 17, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "value": "use strict", - "rawValue": "use strict", - "raw": "'use strict'" - } - }, { "type": "ExpressionStatement", "start": 31, @@ -137,14 +104,54 @@ "column": 34 } }, - "value": 0, - "rawValue": 0, - "raw": "0O0" + "extra": { + "rawValue": 0, + "raw": "0O0" + }, + "value": 0 + } + } + ], + "directives": [ + { + "type": "Directive", + "start": 17, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": { + "type": "DirectiveLiteral", + "start": 17, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": "use strict", + "extra": { + "raw": "'use strict'", + "rawValue": "use strict" + } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/90/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/90/expected.json index ff8fd42d6a..2ca5064302 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/90/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/90/expected.json @@ -106,11 +106,14 @@ "column": 31 } }, - "value": "other", - "rawValue": "other", - "raw": "\"other\"" + "extra": { + "rawValue": "other", + "raw": "\"other\"" + }, + "value": "other" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/91/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/91/expected.json index 6e11605ec5..c267e85d0f 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/91/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/91/expected.json @@ -57,11 +57,14 @@ "column": 15 } }, - "value": "jquery", - "rawValue": "jquery", - "raw": "\"jquery\"" + "extra": { + "rawValue": "jquery", + "raw": "\"jquery\"" + }, + "value": "jquery" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/92/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/92/expected.json index 45b87643fb..d1465085b3 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/92/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/92/expected.json @@ -89,11 +89,14 @@ "column": 22 } }, - "value": "jquery", - "rawValue": "jquery", - "raw": "\"jquery\"" + "extra": { + "rawValue": "jquery", + "raw": "\"jquery\"" + }, + "value": "jquery" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/93/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/93/expected.json index 6c4333a59a..a6757e53fe 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/93/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/93/expected.json @@ -152,11 +152,14 @@ "column": 41 } }, - "value": "crypto", - "rawValue": "crypto", - "raw": "\"crypto\"" + "extra": { + "rawValue": "crypto", + "raw": "\"crypto\"" + }, + "value": "crypto" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/94/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/94/expected.json index 9df1956fbe..2ab3fc92e8 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/94/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/94/expected.json @@ -105,11 +105,14 @@ "column": 39 } }, - "value": "crypto", - "rawValue": "crypto", - "raw": "\"crypto\"" + "extra": { + "rawValue": "crypto", + "raw": "\"crypto\"" + }, + "value": "crypto" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/95/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/95/expected.json index 140aa920e3..9b9cd83bc5 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/95/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/95/expected.json @@ -183,11 +183,14 @@ "column": 56 } }, - "value": "crypto", - "rawValue": "crypto", - "raw": "\"crypto\"" + "extra": { + "rawValue": "crypto", + "raw": "\"crypto\"" + }, + "value": "crypto" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/97/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/97/expected.json index 166aaf0ed8..378e45b83b 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/97/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/97/expected.json @@ -105,11 +105,14 @@ "column": 33 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/98/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/98/expected.json index 3ab53b9b3e..d29972d512 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/98/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/98/expected.json @@ -89,11 +89,14 @@ "column": 32 } }, - "value": "crypto", - "rawValue": "crypto", - "raw": "\"crypto\"" + "extra": { + "rawValue": "crypto", + "raw": "\"crypto\"" + }, + "value": "crypto" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/harmony/uncategorised/99/expected.json b/packages/babylon/test/fixtures/harmony/uncategorised/99/expected.json index 5732c1085e..0e1df863cc 100644 --- a/packages/babylon/test/fixtures/harmony/uncategorised/99/expected.json +++ b/packages/babylon/test/fixtures/harmony/uncategorised/99/expected.json @@ -122,12 +122,15 @@ } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/basic/10/expected.json b/packages/babylon/test/fixtures/jsx/basic/10/expected.json index b8b912613e..7dbf341df0 100644 --- a/packages/babylon/test/fixtures/jsx/basic/10/expected.json +++ b/packages/babylon/test/fixtures/jsx/basic/10/expected.json @@ -135,11 +135,7 @@ "line": 1, "column": 27 } - }, - "range": [ - 4, - 27 - ] + } } ] }, @@ -188,11 +184,7 @@ "line": 1, "column": 27 } - }, - "range": [ - 4, - 27 - ] + } } ] } @@ -200,7 +192,8 @@ ] } } - ] + ], + "directives": [] }, "comments": [ { @@ -217,11 +210,7 @@ "line": 1, "column": 27 } - }, - "range": [ - 4, - 27 - ] + } } ] } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/basic/11/expected.json b/packages/babylon/test/fixtures/jsx/basic/11/expected.json index 0386be294e..28fdb031d2 100644 --- a/packages/babylon/test/fixtures/jsx/basic/11/expected.json +++ b/packages/babylon/test/fixtures/jsx/basic/11/expected.json @@ -135,13 +135,13 @@ "column": 18 } }, - "value": "@test content", - "rawValue": null, - "raw": "@test content" + "extra": null, + "value": "@test content" } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/basic/12/expected.json b/packages/babylon/test/fixtures/jsx/basic/12/expected.json index ebf4b56508..6fd2dafebd 100644 --- a/packages/babylon/test/fixtures/jsx/basic/12/expected.json +++ b/packages/babylon/test/fixtures/jsx/basic/12/expected.json @@ -185,13 +185,13 @@ "column": 35 } }, - "value": "7x invalid-js-identifier", - "rawValue": null, - "raw": "7x invalid-js-identifier" + "extra": null, + "value": "7x invalid-js-identifier" } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/basic/13/expected.json b/packages/babylon/test/fixtures/jsx/basic/13/expected.json index 6021b7c324..33e3801372 100644 --- a/packages/babylon/test/fixtures/jsx/basic/13/expected.json +++ b/packages/babylon/test/fixtures/jsx/basic/13/expected.json @@ -150,7 +150,7 @@ }, "closingElement": null, "children": [], - "rawValue": null + "extra": null } }, { @@ -276,12 +276,11 @@ "column": 50 } }, - "value": "monkeys /> gorillas", - "rawValue": null, - "raw": "monkeys /> gorillas" + "extra": null, + "value": "monkeys /> gorillas" } ], - "rawValue": null + "extra": null } } ], @@ -307,6 +306,7 @@ "children": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/basic/16/expected.json b/packages/babylon/test/fixtures/jsx/basic/16/expected.json index 9e21b2e01a..d5331fba92 100644 --- a/packages/babylon/test/fixtures/jsx/basic/16/expected.json +++ b/packages/babylon/test/fixtures/jsx/basic/16/expected.json @@ -105,7 +105,9 @@ }, "closingElement": null, "children": [], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "operator": "<", "right": { @@ -126,7 +128,7 @@ } } } - ] - }, - "comments": [] + ], + "directives": [] + } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/basic/18/expected.json b/packages/babylon/test/fixtures/jsx/basic/18/expected.json index 4e3544be8b..643ebce2f5 100644 --- a/packages/babylon/test/fixtures/jsx/basic/18/expected.json +++ b/packages/babylon/test/fixtures/jsx/basic/18/expected.json @@ -146,9 +146,8 @@ "column": 32 } }, - "value": "attribute", - "rawValue": null, - "raw": "\"attribute\"" + "extra": null, + "value": "attribute" } } ], @@ -174,6 +173,7 @@ "children": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/basic/19/expected.json b/packages/babylon/test/fixtures/jsx/basic/19/expected.json index ebafdd1cd7..e9df7bec55 100644 --- a/packages/babylon/test/fixtures/jsx/basic/19/expected.json +++ b/packages/babylon/test/fixtures/jsx/basic/19/expected.json @@ -115,9 +115,8 @@ "column": 18 } }, - "value": "leading", - "rawValue": null, - "raw": "\"leading\"" + "extra": null, + "value": "leading" } }, { @@ -164,9 +163,8 @@ "column": 35 } }, - "value": "attribute", - "rawValue": null, - "raw": "\"attribute\"" + "extra": null, + "value": "attribute" } }, { @@ -253,6 +251,7 @@ "children": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/basic/3/expected.json b/packages/babylon/test/fixtures/jsx/basic/3/expected.json index bbea012bdf..a5cebe4764 100644 --- a/packages/babylon/test/fixtures/jsx/basic/3/expected.json +++ b/packages/babylon/test/fixtures/jsx/basic/3/expected.json @@ -146,9 +146,8 @@ "column": 14 } }, - "value": "bar", - "rawValue": null, - "raw": "\"bar\"" + "extra": null, + "value": "bar" } } ], @@ -216,9 +215,8 @@ "column": 16 } }, - "value": " ", - "rawValue": null, - "raw": " " + "extra": null, + "value": " " }, { "type": "JSXExpressionContainer", @@ -265,9 +263,8 @@ "column": 24 } }, - "value": " ", - "rawValue": null, - "raw": " " + "extra": null, + "value": " " }, { "type": "JSXElement", @@ -403,6 +400,7 @@ ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/basic/4/expected.json b/packages/babylon/test/fixtures/jsx/basic/4/expected.json index f0367e5afa..1c24bbb736 100644 --- a/packages/babylon/test/fixtures/jsx/basic/4/expected.json +++ b/packages/babylon/test/fixtures/jsx/basic/4/expected.json @@ -129,9 +129,11 @@ "column": 9 } }, - "value": " ", - "rawValue": " ", - "raw": "\" \"" + "extra": { + "rawValue": " ", + "raw": "\" \"" + }, + "value": " " } } }, @@ -179,9 +181,8 @@ "column": 16 } }, - "value": " ", - "rawValue": null, - "raw": "\" \"" + "extra": null, + "value": " " } }, { @@ -228,9 +229,8 @@ "column": 26 } }, - "value": "&", - "rawValue": null, - "raw": "\"&\"" + "extra": null, + "value": "&" } }, { @@ -277,9 +277,8 @@ "column": 37 } }, - "value": "&r;", - "rawValue": null, - "raw": "\"&r;\"" + "extra": null, + "value": "&r;" } } ], @@ -305,6 +304,7 @@ "children": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/basic/7/expected.json b/packages/babylon/test/fixtures/jsx/basic/7/expected.json index 6a87f0a92a..154626c2da 100644 --- a/packages/babylon/test/fixtures/jsx/basic/7/expected.json +++ b/packages/babylon/test/fixtures/jsx/basic/7/expected.json @@ -115,9 +115,8 @@ "column": 22 } }, - "value": "&&", - "rawValue": null, - "raw": "\"&&\"" + "extra": null, + "value": "&&" } } ], @@ -185,13 +184,13 @@ "column": 0 } }, - "value": "\nbar\nbaz\n", - "rawValue": null, - "raw": "\nbar\nbaz\n" + "extra": null, + "value": "\nbar\nbaz\n" } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/options.json b/packages/babylon/test/fixtures/jsx/options.json index 393a3c5f17..de157b98ca 100644 --- a/packages/babylon/test/fixtures/jsx/options.json +++ b/packages/babylon/test/fixtures/jsx/options.json @@ -1,3 +1,3 @@ { - "plugins": { "jsx": true } + "plugins": ["jsx"] } diff --git a/packages/babylon/test/fixtures/jsx/regression/1/expected.json b/packages/babylon/test/fixtures/jsx/regression/1/expected.json index e81c2275a0..568a15f9e9 100644 --- a/packages/babylon/test/fixtures/jsx/regression/1/expected.json +++ b/packages/babylon/test/fixtures/jsx/regression/1/expected.json @@ -135,9 +135,8 @@ "column": 7 } }, - "value": "foo ", - "rawValue": null, - "raw": "foo " + "extra": null, + "value": "foo " }, { "type": "JSXElement", @@ -212,9 +211,8 @@ "column": 21 } }, - "value": "test", - "rawValue": null, - "raw": "\"test\"" + "extra": null, + "value": "test" } } ], @@ -282,9 +280,8 @@ "column": 26 } }, - "value": " bar", - "rawValue": null, - "raw": " bar" + "extra": null, + "value": " bar" } ] }, @@ -302,13 +299,13 @@ "column": 34 } }, - "value": " baz", - "rawValue": null, - "raw": " baz" + "extra": null, + "value": " baz" } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/regression/4/expected.json b/packages/babylon/test/fixtures/jsx/regression/4/expected.json index 3b7587e891..6e86caee9b 100644 --- a/packages/babylon/test/fixtures/jsx/regression/4/expected.json +++ b/packages/babylon/test/fixtures/jsx/regression/4/expected.json @@ -135,13 +135,13 @@ "column": 10 } }, - "value": "/text", - "rawValue": null, - "raw": "/text" + "extra": null, + "value": "/text" } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/regression/6/expected.json b/packages/babylon/test/fixtures/jsx/regression/6/expected.json index 8a34a3b69a..44b08551ed 100644 --- a/packages/babylon/test/fixtures/jsx/regression/6/expected.json +++ b/packages/babylon/test/fixtures/jsx/regression/6/expected.json @@ -115,9 +115,8 @@ "column": 18 } }, - "value": "leading", - "rawValue": null, - "raw": "\"leading\"" + "extra": null, + "value": "leading" } }, { @@ -174,6 +173,7 @@ "children": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/regression/7/expected.json b/packages/babylon/test/fixtures/jsx/regression/7/expected.json index 0a092459c2..d82ea9606a 100644 --- a/packages/babylon/test/fixtures/jsx/regression/7/expected.json +++ b/packages/babylon/test/fixtures/jsx/regression/7/expected.json @@ -115,9 +115,8 @@ "column": 15 } }, - "value": "M230 80\n\t\tA 45 45, 0, 1, 0, 275 125\n L 275 80 Z", - "rawValue": null, - "raw": "\"M230 80\n\t\tA 45 45, 0, 1, 0, 275 125\n L 275 80 Z\"" + "extra": null, + "value": "M230 80\n\t\tA 45 45, 0, 1, 0, 275 125\n L 275 80 Z" } } ], @@ -143,6 +142,7 @@ "children": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/regression/issue-2083/expected.json b/packages/babylon/test/fixtures/jsx/regression/issue-2083/expected.json index fd7a654768..eeb0a95cc9 100644 --- a/packages/babylon/test/fixtures/jsx/regression/issue-2083/expected.json +++ b/packages/babylon/test/fixtures/jsx/regression/issue-2083/expected.json @@ -70,9 +70,7 @@ "column": 4 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "consequent": { "type": "JSXElement", @@ -123,7 +121,9 @@ }, "closingElement": null, "children": [], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "alternate": { "type": "JSXElement", @@ -177,6 +177,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/jsx/regression/issue-2114/expected.json b/packages/babylon/test/fixtures/jsx/regression/issue-2114/expected.json index 303c0e4ca7..15b1d87259 100644 --- a/packages/babylon/test/fixtures/jsx/regression/issue-2114/expected.json +++ b/packages/babylon/test/fixtures/jsx/regression/issue-2114/expected.json @@ -115,9 +115,8 @@ "column": 43 } }, - "value": "^([\\w\\.\\-]+\\s)*[\\w\\.\\-]+\\s?$", - "rawValue": null, - "raw": "\"^([\\w\\.\\-]+\\s)*[\\w\\.\\-]+\\s?$\"" + "extra": null, + "value": "^([\\w\\.\\-]+\\s)*[\\w\\.\\-]+\\s?$" } } ], @@ -173,6 +172,7 @@ "children": [] } } - ] + ], + "directives": [] } } \ No newline at end of file