diff --git a/test/esprima.js.html b/test/esprima.js.html
index 04ef0b6f8..52fed83f3 100644
--- a/test/esprima.js.html
+++ b/test/esprima.js.html
@@ -181,16 +181,16 @@
3810
3811
3812
-3813
+3813
+3814
+3815
+3816
+3817 |
@@ -4199,28 +4203,28 @@
1
-1203
+1224
1
-5809
+5915
1
-218
+224
1
-263
+266
1
-31893
+32246
@@ -4231,13 +4235,13 @@
1
-31426
+31735
1
-8885
+9000
@@ -4245,7 +4249,7 @@
1
-15737
+15896
@@ -4270,7 +4274,7 @@
1
-625
+632
@@ -4282,18 +4286,18 @@
108
-517
+524
1
-596
+603
1
-2719
+2755
44
@@ -4301,17 +4305,17 @@
-2675
+2711
177
-551
+566
-371
+377
-589
+597
@@ -4320,7 +4324,7 @@
93
-564
+571
12
@@ -4331,15 +4335,15 @@
1
-23982
+24255
-23982
-23982
+24255
+24255
-23982
-29354
+24255
+29665
-29354
+29665
318
318
39
@@ -4349,7 +4353,7 @@
39
39
-29036
+29347
1020
64
2
@@ -4374,13 +4378,13 @@
-28016
-351
+28327
+371
-351
+371
39
39
-312
+332
68
68
@@ -4388,11 +4392,11 @@
2
-244
+264
-27665
-5763
-21902
+27956
+5845
+22111
117
117
2
@@ -4400,7 +4404,7 @@
117
117
-21785
+21994
@@ -4466,49 +4470,49 @@
1
-4081
+4120
-4081
-4081
-15685
-15685
+4120
+4120
+15838
+15838
19
19
-15666
-11895
+15819
+12024
-3771
+3795
-4062
+4101
1
-4110
+4149
-4110
+4149
-4110
+4149
-4074
-1355
-2719
-1399
-1320
+4113
+1358
+2755
+1429
+1326
24
-1296
+1302
153
-1143
+1149
-4074
+4113
@@ -4521,7 +4525,7 @@
1
-6182
+6259
@@ -4529,7 +4533,7 @@
-6182
+6259
@@ -4544,8 +4548,8 @@
-5273
-5273
+5342
+5342
@@ -4554,10 +4558,10 @@
-909
+917
-909
+917
52
@@ -4597,18 +4601,18 @@
4
-861
+869
-861
-861
-861
+869
+869
+869
-861
+869
9
3
3
@@ -4623,7 +4627,7 @@
-858
+866
6
6
@@ -4634,7 +4638,7 @@
-852
+860
3
3
@@ -4645,7 +4649,7 @@
-849
+857
3
3
@@ -4658,7 +4662,7 @@
-846
+854
167
167
@@ -4669,9 +4673,9 @@
-679
-659
-659
+687
+671
+671
@@ -4680,49 +4684,49 @@
-20
+16
1
-599
+611
-599
-599
+611
+611
-599
-599
-599
-596
-596
+611
+611
+611
+608
+608
-596
-96
-29
-29
-56
-56
-4
+608
+102
+32
+32
+62
+62
+7
-52
+55
-29
+32
4
-25
-4
-4
+28
+7
+7
4
-21
+24
@@ -4730,7 +4734,7 @@
-67
+70
29
29
41
@@ -4757,21 +4761,21 @@
-38
+41
4
-534
-721
-413
-413
+543
+733
+419
+419
-308
+314
-537
+546
12
12
78
@@ -4782,23 +4786,23 @@
-537
-25
+546
+28
-25
-25
-17
+28
+28
+20
-25
-25
-9
-9
+28
+28
12
-
-
-
12
+21
+3
+3
+
+18
16
@@ -4809,13 +4813,13 @@
-521
-385
+530
+391
16
-505
+514
@@ -4827,22 +4831,22 @@
1
-457
+463
-457
-457
+463
+463
-457
-457
+463
+463
-457
-4710
+463
+4776
-4710
-441
-441
-4269
+4776
+447
+447
+4329
121
121
115
@@ -4909,18 +4913,18 @@
3
-4148
+4208
8
-4140
+4200
-457
+463
16
-441
+447
@@ -4931,58 +4935,58 @@
1
-48
+51
-48
-48
+51
+51
-48
-48
-48
-48
+51
+51
+51
+51
-48
-238
-238
-238
+51
+247
+247
+247
112
25
-126
+135
7
7
4
3
-119
-32
-32
-87
+128
+35
+35
+93
25
-62
+68
4
-40
+43
8
-32
+35
-32
-32
-36
-36
-
+35
+35
+42
+42
+3
-36
-36
+39
+39
10
10
7
@@ -5002,20 +5006,20 @@
3
-26
-26
+29
+29
-32
-32
+35
+35
8
-24
+27
-24
+27
@@ -5023,19 +5027,19 @@
1
-64
+67
1
-12691
+12880
-12691
+12880
-12667
-1319
+12856
+1374
@@ -5043,65 +5047,65 @@
-11348
+11482
-11348
-2446
+11482
+2468
-8902
-457
+9014
+463
-8445
-4110
+8551
+4149
-4335
-75
+4402
+78
3
-72
+75
-4260
-596
+4324
+608
-3664
+3716
1
-10772
+10923
-10772
-10772
-10772
-10772
+10923
+10923
+10923
+10923
-10772
+10923
-10760
-10760
-10760
+10915
+10915
+10915
-10760
+10915
1
-1919
+1957
-1919
-1919
-1919
-1919
-1783
-1783
-1783
+1957
+1957
+1957
+1957
+1821
+1821
+1821
1
@@ -5125,9 +5129,9 @@
-302
+308
-302
+308
@@ -5136,7 +5140,7 @@
-465
+472
@@ -5196,13 +5200,13 @@
-38
+54
-1263
+1275
@@ -5229,7 +5233,7 @@
-44
+47
@@ -5255,7 +5259,7 @@
-2522
+2535
@@ -5279,7 +5283,7 @@
-1085
+1106
@@ -5287,7 +5291,7 @@
-72
+75
@@ -5320,7 +5324,7 @@
-1075
+1090
@@ -5405,7 +5409,7 @@
-124
+127
@@ -5413,7 +5417,7 @@
-177
+180
@@ -5457,7 +5461,7 @@
1
-888
+908
@@ -5466,19 +5470,20 @@
-888
-474
-474
-474
-474
+908
+498
+498
+498
+498
-414
-414
-414
-414
+410
+410
+410
+410
-888
+908
+908
1
@@ -5497,23 +5502,23 @@
1
-288
-60
+312
+80
-228
+232
16
-212
+216
4
-208
+212
4
-204
+208
88
4
84
@@ -5524,16 +5529,16 @@
-116
+120
1
-4246
-4246
-48
+4313
+4313
+56
@@ -5541,8 +5546,8 @@
1
-1184
-1184
+1214
+1214
4
@@ -5550,25 +5555,25 @@
1
-27646
+27856
1
-6002
+6032
1
-2329
+2344
-2329
-812
+2344
+821
-1517
-1517
+1523
+1523
@@ -5583,26 +5588,26 @@
1
-1472
+1487
-1472
-535
-535
+1487
+541
+541
-937
-937
-937
+946
+946
+946
27
-910
+919
3
3
-907
+916
28
@@ -5777,22 +5782,22 @@
1
-3143
+3160
-3143
+3160
-3143
-1365
+3160
+1361
-1778
-936
+1799
+954
14
-924
+942
-842
+845
144
3
3
@@ -5803,32 +5808,32 @@
-710
+713
113
113
113
-597
+600
4
4
4
-593
+596
50
-543
+546
199
-344
+347
216
-128
-48
+131
+51
80
@@ -5857,19 +5862,19 @@
1
-64
+67
-64
+67
4
-60
+63
1
-64
+67
-64
+67
1
@@ -5895,24 +5900,24 @@
1
-1727
+1730
-1727
+1730
-1291
-88
+1298
+89
62
58
-26
+27
3
3
-23
-19
+24
+20
-1283
+1290
@@ -5937,13 +5942,13 @@
1
-3143
+3160
-2699
-809
+2720
+818
-1890
+1902
64
20
@@ -5957,19 +5962,19 @@
40
-1866
+1878
1
-3230
+3247
-3230
-2406
+3247
+2420
-824
+827
52
52
@@ -5984,13 +5989,13 @@
28
-772
+775
20
20
20
-752
+755
15
15
15
@@ -6000,17 +6005,17 @@
11
-737
+740
1
-2647
+2668
-2647
-777
+2668
+786
-1870
+1882
18
18
@@ -6058,8 +6063,8 @@
-86
-86
+92
+92
@@ -6068,10 +6073,10 @@
54
-1531
+1537
-1870
+1882
@@ -6083,24 +6088,24 @@
1
-2825
+2836
-2825
-2825
+2836
+2836
-2825
+2836
-2345
-2345
-2345
-2129
+2360
+2360
+2360
+2138
-216
-216
+222
+222
-216
+222
-200
+206
102
@@ -6117,27 +6122,27 @@
102
-200
+206
-200
-200
-200
-248
-248
+206
+206
+206
+254
+254
-200
+206
1
-2825
+2836
-2825
+2836
-2329
+2344
6
6
6
@@ -6149,18 +6154,18 @@
6
-2329
+2344
1
-2825
+2836
-2825
-2825
+2836
+2836
-2329
+2344
251
20
@@ -6176,15 +6181,15 @@
215
-2078
+2093
1
-2215
+2223
-1727
+1739
6
6
@@ -6196,97 +6201,97 @@
-1727
+1739
1
-221
+229
-221
-385
-177
+229
+401
+181
-208
-172
-
+220
+184
+4
-172
+180
-185
+193
1
-221
+229
-221
+229
-221
+229
-185
+193
-177
+181
1
-874
+896
-874
-88
+896
+100
-790
+800
1
-261
+276
-213
+216
12
-205
+208
31
19
-174
-117
-113
+177
+120
+116
-177
+180
1
-208
+223
-208
-261
-177
-124
+223
+276
+180
+127
53
-124
+127
1
-150
+157
-150
+157
-150
+157
-78
+81
-78
+81
@@ -6294,11 +6299,11 @@
1
-33
+41
-33
+41
-33
+41
21
@@ -6308,8 +6313,8 @@
1
-38
-38
+54
+54
@@ -6712,12 +6717,15 @@
1
-30
+34
+
+34
+
+34
+34
+4
-30
-30
-30
30
30
@@ -6730,14 +6738,14 @@
1
-37
+41
-37
+41
-37
+41
-37
-30
+41
+34
29
@@ -6765,21 +6773,21 @@
1
-2520
+2559
-2520
+2559
24
-2496
-528
+2535
+548
-38
+54
-156
+160
198
@@ -6787,8 +6795,8 @@
-2104
-671
+2123
+682
60
@@ -6810,9 +6818,9 @@
30
-37
+41
-150
+157
86
@@ -6822,10 +6830,10 @@
-1484
+1492
-1284
+1296
59
59
@@ -6839,30 +6847,30 @@
27
-1225
+1237
-1205
+1217
1
-492
+499
-492
+499
-492
-751
-476
+499
+758
+480
-275
+278
-275
-267
-267
+278
+270
+270
-
+3
267
267
@@ -6877,42 +6885,42 @@
-476
-476
-476
-476
+483
+483
+483
+483
-476
-476
-476
-476
+483
+483
+483
+483
-476
-555
-288
+483
+570
+291
-267
-79
-
+279
+91
+4
-79
+87
-288
+295
-288
-288
-288
-288
+291
+291
+291
+291
-288
+291
1
-409
-409
+416
+416
-409
+416
103
103
136
@@ -6948,9 +6956,9 @@
-393
+400
-393
+400
@@ -6959,44 +6967,44 @@
1
-320
+327
-320
-320
-320
-300
+327
+327
+327
+307
40
12
-260
+267
17
17
-243
+250
4
4
-292
-276
-276
-276
-276
+299
+283
+283
+283
+283
49
-276
-276
-96
+283
+283
+99
36
-60
+63
22
-44
+47
-44
+47
1
@@ -7046,37 +7054,37 @@
1
-2590
-944
+2652
+970
-33
+41
-317
+324
-594
+605
-1646
-1642
+1682
+1670
1
-1759
+1794
-1759
-1828
-1828
-1685
+1794
+1863
+1863
+1717
-143
-143
-143
+146
+146
+146
-
+3
143
143
@@ -7091,22 +7099,22 @@
-1755
-1697
-1017
+1790
+1729
+1029
4
-1013
+1025
-1075
+1090
1
-1895
-1895
-1895
-1759
-1075
+1930
+1930
+1930
+1794
+1090
@@ -7134,16 +7142,16 @@
1
-3263
+3317
-3263
-3263
-3263
+3317
+3317
+3317
-3263
-5185
+3317
+5247
-5185
+5247
391
391
29
@@ -7169,7 +7177,7 @@
353
-4794
+4856
431
34
5
@@ -7204,7 +7212,7 @@
-4363
+4425
135
135
41
@@ -7240,9 +7248,9 @@
24
-4228
-1198
-3030
+4290
+1226
+3064
39
39
2
@@ -7250,7 +7258,7 @@
39
39
-2991
+3025
@@ -7369,10 +7377,10 @@
1
-13166
+13292
-13166
-13166
+13292
+13292
@@ -7383,13 +7391,13 @@
-13166
-11858
-11858
-11858
+13292
+11972
+11972
+11972
-13166
+13292
48
48
@@ -7407,12 +7415,12 @@
-13166
-4502
-4478
+13292
+4554
+4530
-4502
-4478
+4554
+4530
@@ -7425,7 +7433,7 @@
-13166
+13292
1
@@ -7471,91 +7479,91 @@
1
-1416
+1430
-1416
-1416
+1430
+1430
-1416
+1430
-1416
-124
+1430
+126
80
80
80
80
-44
+46
6
6
6
6
-38
-38
-38
-38
+40
+40
+40
+40
-1416
+1430
1
-20456
+20684
-20456
-20456
-49552
-49456
-49456
-29734
+20684
+20684
+50112
+50016
+50016
+30076
-19722
+19940
-20456
+20684
1
-734
+744
-19084
-13202
+19344
+13346
-19084
-760
+19344
+776
-760
+776
152
-760
+776
128
-760
-760
+776
+776
24
24
24
-736
+752
66
66
66
-760
-760
+776
+776
24
24
24
-736
+752
66
@@ -7564,107 +7572,107 @@
-19084
-11682
+19344
+11794
-11682
+11794
-11682
-11682
-11682
+11794
+11794
+11794
-11682
-4350
+11794
+4400
-11682
+11794
24
-11682
-480
+11794
+496
+
+
+11794
+
+
+
+
+1
+
+1930
+
+1930
+474
+474
-11682
-
-
-
-
-1
-
-1895
-
-1895
-464
-464
-
-
-1895
-
-734
-734
-734
-734
-734
-734
-
-734
-
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-
-
-1895
+1930
+
+744
+744
+744
+744
+744
+744
+
+744
+
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+
+
+1930
45
45
@@ -7674,63 +7682,63 @@
1
-1895
-464
-
-
-1895
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-734
-
-
-1895
+1930
+474
+
+
+1930
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+744
+
+
+1930
45
45
1
-1895
+1930
-1895
-1895
+1930
+1930
7
-1895
-1895
-1895
-1895
-1895
-1895
-1895
-1895
+1930
+1930
+1930
+1930
+1930
+1930
+1930
+1930
@@ -7738,24 +7746,24 @@
-1895
-1895
-1887
-1887
+1930
+1930
+1922
+1922
-1887
+1922
45
-1887
-464
+1922
+474
-1887
+1922
68
-1895
-1892
+1930
+1927
@@ -7765,31 +7773,31 @@
-1895
-1895
-1895
-1075
+1930
+1930
+1930
+1090
54
54
-1075
+1090
45
45
-1075
+1090
68
-1075
-734
+1090
+744
-820
+840
-1895
-1895
+1930
+1930
-1075
+1090
@@ -8233,7 +8241,7 @@
}
function getEscapedIdentifier() {
- var ch, id, type;
+ var ch, id;
ch = source.charCodeAt(index++);
id = String.fromCharCode(ch);
@@ -8530,7 +8538,7 @@
if (index < length) {
ch = source[index];
- Eif (isIdentifierStart(ch.charCodeAt(0))) {
+ if (isIdentifierStart(ch.charCodeAt(0))) {
throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
}
}
@@ -8606,9 +8614,9 @@
if (ch && isDecimalDigit(ch.charCodeAt(0))) {
number += source[index++];
while (index < length) {
- Iif (!isDecimalDigit(source.charCodeAt(index))) {
- ch = source[index];
- break;
+ if (!isDecimalDigit(source.charCodeAt(index))) {
+ ch = source[index];
+ break;
}
number += source[index++];
}
@@ -8789,8 +8797,8 @@
flags = '';
while (index < length) {
ch = source[index];
- Iif (!isIdentifierPart(ch.charCodeAt(0))) {
- break;
+ if (!isIdentifierPart(ch.charCodeAt(0))) {
+ break;
}
++index;
@@ -9290,6 +9298,7 @@
error.column = index - lineStart + 1;
}
+ error.description = msg;
throw error;
}
@@ -10022,8 +10031,8 @@
break;
}
statement = parseSourceElement();
- Iif (typeof statement === 'undefined') {
- break;
+ if (typeof statement === 'undefined') {
+ break;
}
list.push(statement);
}
@@ -10078,13 +10087,13 @@
function parseVariableDeclarationList(kind) {
var list = [];
- while (index < length) {
+ do {
list.push(parseVariableDeclaration(kind));
if (!match(',')) {
break;
}
lex();
- }
+ } while (index < length);
return list;
}
@@ -10529,13 +10538,16 @@
expectKeyword('catch');
expect('(');
- Eif (!match(')')) {
- param = parseExpression();
- // 12.14.1
- if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) {
- throwErrorTolerant({}, Messages.StrictCatchVariable);
- }
+ if (match(')')) {
+ throwUnexpected(lookahead);
+ }
+
+ param = parseExpression();
+ // 12.14.1
+ if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) {
+ throwErrorTolerant({}, Messages.StrictCatchVariable);
}
+
expect(')');
body = parseBlock();
return delegate.createCatchClause(param, body);
@@ -10672,9 +10684,9 @@
sourceElement = parseSourceElement();
sourceElements.push(sourceElement);
- Iif (sourceElement.expression.type !== Syntax.Literal) {
+ if (sourceElement.expression.type !== Syntax.Literal) {
// this is not directive
- break;
+ break;
}
directive = source.slice(token.range[0] + 1, token.range[1] - 1);
if (directive === 'use strict') {
@@ -10704,8 +10716,8 @@
break;
}
sourceElement = parseSourceElement();
- Iif (typeof sourceElement === 'undefined') {
- break;
+ if (typeof sourceElement === 'undefined') {
+ break;
}
sourceElements.push(sourceElement);
}
@@ -10886,9 +10898,9 @@
sourceElement = parseSourceElement();
sourceElements.push(sourceElement);
- Iif (sourceElement.expression.type !== Syntax.Literal) {
+ if (sourceElement.expression.type !== Syntax.Literal) {
// this is not directive
- break;
+ break;
}
directive = source.slice(token.range[0] + 1, token.range[1] - 1);
if (directive === 'use strict') {
|