rollup 4.9.4 → 4.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/rollup +2 -2
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/parseAst.js +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +33 -11
- package/dist/es/shared/parseAst.js +318 -361
- package/dist/es/shared/watch.js +2 -2
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/parseAst.js +2 -2
- package/dist/rollup.js +2 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/parseAst.js +318 -361
- package/dist/shared/rollup.js +33 -11
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +28 -26
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.9.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.9.6
|
|
4
|
+
Sun, 21 Jan 2024 05:51:51 GMT - commit ecb6b0a430098052781aa6ee04ec92ee70960321
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -957,21 +957,21 @@ function warnDeprecationWithOptions(deprecation, urlSnippet, activeDeprecation,
|
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
throw new Error(`Unknown node type: ${nodeType}`);
|
|
968
|
-
}
|
|
969
|
-
return converter(position + 1, buffer, readString);
|
|
970
|
-
};
|
|
960
|
+
// This file is generated by scripts/generate-ast-converters.js.
|
|
961
|
+
// Do not edit this file directly.
|
|
962
|
+
const ANNOTATION_KEY = '_rollupAnnotations';
|
|
963
|
+
const INVALID_ANNOTATION_KEY = '_rollupRemoved';
|
|
964
|
+
function convertProgram(buffer, readString) {
|
|
965
|
+
return convertNode(0, new Uint32Array(buffer), readString);
|
|
966
|
+
}
|
|
971
967
|
/* eslint-disable sort-keys */
|
|
972
968
|
const nodeConverters = [
|
|
973
|
-
|
|
974
|
-
|
|
969
|
+
function parseError(position, buffer, readString) {
|
|
970
|
+
const pos = buffer[position++];
|
|
971
|
+
const message = convertString(position, buffer, readString);
|
|
972
|
+
error(logParseError(message, pos));
|
|
973
|
+
},
|
|
974
|
+
function arrayExpression(position, buffer, readString) {
|
|
975
975
|
const start = buffer[position++];
|
|
976
976
|
const end = buffer[position++];
|
|
977
977
|
const elements = convertNodeList(position, buffer, readString);
|
|
@@ -982,8 +982,7 @@ const nodeConverters = [
|
|
|
982
982
|
elements
|
|
983
983
|
};
|
|
984
984
|
},
|
|
985
|
-
|
|
986
|
-
(position, buffer, readString) => {
|
|
985
|
+
function arrayPattern(position, buffer, readString) {
|
|
987
986
|
const start = buffer[position++];
|
|
988
987
|
const end = buffer[position++];
|
|
989
988
|
const elements = convertNodeList(position, buffer, readString);
|
|
@@ -994,30 +993,30 @@ const nodeConverters = [
|
|
|
994
993
|
elements
|
|
995
994
|
};
|
|
996
995
|
},
|
|
997
|
-
|
|
998
|
-
(position, buffer, readString) => {
|
|
996
|
+
function arrowFunctionExpression(position, buffer, readString) {
|
|
999
997
|
const start = buffer[position++];
|
|
1000
998
|
const end = buffer[position++];
|
|
1001
|
-
const
|
|
1002
|
-
const
|
|
1003
|
-
const expression =
|
|
999
|
+
const flags = buffer[position++];
|
|
1000
|
+
const async = (flags & 1) === 1;
|
|
1001
|
+
const expression = (flags & 2) === 2;
|
|
1002
|
+
const generator = (flags & 4) === 4;
|
|
1004
1003
|
const parameters = convertNodeList(buffer[position++], buffer, readString);
|
|
1005
1004
|
const body = convertNode(buffer[position++], buffer, readString);
|
|
1006
|
-
const annotations =
|
|
1007
|
-
return
|
|
1005
|
+
const annotations = convertAnnotations(position, buffer);
|
|
1006
|
+
return {
|
|
1008
1007
|
type: 'ArrowFunctionExpression',
|
|
1009
1008
|
start,
|
|
1010
1009
|
end,
|
|
1011
1010
|
async,
|
|
1012
|
-
body,
|
|
1013
1011
|
expression,
|
|
1014
1012
|
generator,
|
|
1015
|
-
|
|
1016
|
-
params: parameters
|
|
1017
|
-
|
|
1013
|
+
...(annotations.length > 0 ? { [ANNOTATION_KEY]: annotations } : {}),
|
|
1014
|
+
params: parameters,
|
|
1015
|
+
body,
|
|
1016
|
+
id: null
|
|
1017
|
+
};
|
|
1018
1018
|
},
|
|
1019
|
-
|
|
1020
|
-
(position, buffer, readString) => {
|
|
1019
|
+
function assignmentExpression(position, buffer, readString) {
|
|
1021
1020
|
const start = buffer[position++];
|
|
1022
1021
|
const end = buffer[position++];
|
|
1023
1022
|
const operator = FIXED_STRINGS[buffer[position++]];
|
|
@@ -1027,13 +1026,12 @@ const nodeConverters = [
|
|
|
1027
1026
|
type: 'AssignmentExpression',
|
|
1028
1027
|
start,
|
|
1029
1028
|
end,
|
|
1030
|
-
left,
|
|
1031
1029
|
operator,
|
|
1030
|
+
left,
|
|
1032
1031
|
right
|
|
1033
1032
|
};
|
|
1034
1033
|
},
|
|
1035
|
-
|
|
1036
|
-
(position, buffer, readString) => {
|
|
1034
|
+
function assignmentPattern(position, buffer, readString) {
|
|
1037
1035
|
const start = buffer[position++];
|
|
1038
1036
|
const end = buffer[position++];
|
|
1039
1037
|
const right = convertNode(buffer[position++], buffer, readString);
|
|
@@ -1046,20 +1044,18 @@ const nodeConverters = [
|
|
|
1046
1044
|
right
|
|
1047
1045
|
};
|
|
1048
1046
|
},
|
|
1049
|
-
|
|
1050
|
-
(position, buffer, readString) => {
|
|
1047
|
+
function awaitExpression(position, buffer, readString) {
|
|
1051
1048
|
const start = buffer[position++];
|
|
1052
1049
|
const end = buffer[position++];
|
|
1053
1050
|
const argument = convertNode(position, buffer, readString);
|
|
1054
1051
|
return {
|
|
1055
1052
|
type: 'AwaitExpression',
|
|
1056
1053
|
start,
|
|
1057
|
-
|
|
1058
|
-
|
|
1054
|
+
end,
|
|
1055
|
+
argument
|
|
1059
1056
|
};
|
|
1060
1057
|
},
|
|
1061
|
-
|
|
1062
|
-
(position, buffer, readString) => {
|
|
1058
|
+
function binaryExpression(position, buffer, readString) {
|
|
1063
1059
|
const start = buffer[position++];
|
|
1064
1060
|
const end = buffer[position++];
|
|
1065
1061
|
const operator = FIXED_STRINGS[buffer[position++]];
|
|
@@ -1069,68 +1065,67 @@ const nodeConverters = [
|
|
|
1069
1065
|
type: 'BinaryExpression',
|
|
1070
1066
|
start,
|
|
1071
1067
|
end,
|
|
1072
|
-
left,
|
|
1073
1068
|
operator,
|
|
1069
|
+
left,
|
|
1074
1070
|
right
|
|
1075
1071
|
};
|
|
1076
1072
|
},
|
|
1077
|
-
|
|
1078
|
-
(position, buffer, readString) => {
|
|
1073
|
+
function blockStatement(position, buffer, readString) {
|
|
1079
1074
|
const start = buffer[position++];
|
|
1080
1075
|
const end = buffer[position++];
|
|
1081
1076
|
const body = convertNodeList(position, buffer, readString);
|
|
1082
1077
|
return {
|
|
1083
1078
|
type: 'BlockStatement',
|
|
1084
1079
|
start,
|
|
1085
|
-
|
|
1086
|
-
|
|
1080
|
+
end,
|
|
1081
|
+
body
|
|
1087
1082
|
};
|
|
1088
1083
|
},
|
|
1089
|
-
|
|
1090
|
-
(position, buffer, readString) => {
|
|
1084
|
+
function breakStatement(position, buffer, readString) {
|
|
1091
1085
|
const start = buffer[position++];
|
|
1092
1086
|
const end = buffer[position++];
|
|
1093
|
-
const labelPosition = buffer[position
|
|
1087
|
+
const labelPosition = buffer[position];
|
|
1088
|
+
const label = labelPosition === 0 ? null : convertNode(labelPosition, buffer, readString);
|
|
1094
1089
|
return {
|
|
1095
1090
|
type: 'BreakStatement',
|
|
1096
1091
|
start,
|
|
1097
1092
|
end,
|
|
1098
|
-
label
|
|
1093
|
+
label
|
|
1099
1094
|
};
|
|
1100
1095
|
},
|
|
1101
|
-
|
|
1102
|
-
(position, buffer, readString) => {
|
|
1096
|
+
function callExpression(position, buffer, readString) {
|
|
1103
1097
|
const start = buffer[position++];
|
|
1104
1098
|
const end = buffer[position++];
|
|
1105
|
-
const
|
|
1099
|
+
const flags = buffer[position++];
|
|
1100
|
+
const optional = (flags & 1) === 1;
|
|
1106
1101
|
const callee = convertNode(buffer[position++], buffer, readString);
|
|
1107
|
-
const
|
|
1108
|
-
const annotations =
|
|
1109
|
-
return
|
|
1102
|
+
const callArguments = convertNodeList(buffer[position++], buffer, readString);
|
|
1103
|
+
const annotations = convertAnnotations(position, buffer);
|
|
1104
|
+
return {
|
|
1110
1105
|
type: 'CallExpression',
|
|
1111
1106
|
start,
|
|
1112
1107
|
end,
|
|
1113
|
-
|
|
1108
|
+
optional,
|
|
1109
|
+
...(annotations.length > 0 ? { [ANNOTATION_KEY]: annotations } : {}),
|
|
1114
1110
|
callee,
|
|
1115
|
-
|
|
1116
|
-
}
|
|
1111
|
+
arguments: callArguments
|
|
1112
|
+
};
|
|
1117
1113
|
},
|
|
1118
|
-
|
|
1119
|
-
(position, buffer, readString) => {
|
|
1114
|
+
function catchClause(position, buffer, readString) {
|
|
1120
1115
|
const start = buffer[position++];
|
|
1121
1116
|
const end = buffer[position++];
|
|
1122
1117
|
const parameterPosition = buffer[position++];
|
|
1118
|
+
const parameter = parameterPosition === 0 ? null : convertNode(parameterPosition, buffer, readString);
|
|
1123
1119
|
const body = convertNode(buffer[position], buffer, readString);
|
|
1124
1120
|
return {
|
|
1125
1121
|
type: 'CatchClause',
|
|
1126
1122
|
start,
|
|
1127
1123
|
end,
|
|
1128
|
-
|
|
1129
|
-
|
|
1124
|
+
param: parameter,
|
|
1125
|
+
body
|
|
1130
1126
|
};
|
|
1131
1127
|
},
|
|
1132
|
-
|
|
1133
|
-
(position, buffer, readString) => {
|
|
1128
|
+
function chainExpression(position, buffer, readString) {
|
|
1134
1129
|
const start = buffer[position++];
|
|
1135
1130
|
const end = buffer[position++];
|
|
1136
1131
|
const expression = convertNode(position, buffer, readString);
|
|
@@ -1141,8 +1136,7 @@ const nodeConverters = [
|
|
|
1141
1136
|
expression
|
|
1142
1137
|
};
|
|
1143
1138
|
},
|
|
1144
|
-
|
|
1145
|
-
(position, buffer, readString) => {
|
|
1139
|
+
function classBody(position, buffer, readString) {
|
|
1146
1140
|
const start = buffer[position++];
|
|
1147
1141
|
const end = buffer[position++];
|
|
1148
1142
|
const body = convertNodeList(position, buffer, readString);
|
|
@@ -1153,40 +1147,41 @@ const nodeConverters = [
|
|
|
1153
1147
|
body
|
|
1154
1148
|
};
|
|
1155
1149
|
},
|
|
1156
|
-
|
|
1157
|
-
(position, buffer, readString) => {
|
|
1150
|
+
function classDeclaration(position, buffer, readString) {
|
|
1158
1151
|
const start = buffer[position++];
|
|
1159
1152
|
const end = buffer[position++];
|
|
1160
1153
|
const idPosition = buffer[position++];
|
|
1154
|
+
const id = idPosition === 0 ? null : convertNode(idPosition, buffer, readString);
|
|
1161
1155
|
const superClassPosition = buffer[position++];
|
|
1156
|
+
const superClass = superClassPosition === 0 ? null : convertNode(superClassPosition, buffer, readString);
|
|
1162
1157
|
const body = convertNode(buffer[position], buffer, readString);
|
|
1163
1158
|
return {
|
|
1164
1159
|
type: 'ClassDeclaration',
|
|
1165
1160
|
start,
|
|
1166
1161
|
end,
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1162
|
+
id,
|
|
1163
|
+
superClass,
|
|
1164
|
+
body
|
|
1170
1165
|
};
|
|
1171
1166
|
},
|
|
1172
|
-
|
|
1173
|
-
(position, buffer, readString) => {
|
|
1167
|
+
function classExpression(position, buffer, readString) {
|
|
1174
1168
|
const start = buffer[position++];
|
|
1175
1169
|
const end = buffer[position++];
|
|
1176
1170
|
const idPosition = buffer[position++];
|
|
1171
|
+
const id = idPosition === 0 ? null : convertNode(idPosition, buffer, readString);
|
|
1177
1172
|
const superClassPosition = buffer[position++];
|
|
1173
|
+
const superClass = superClassPosition === 0 ? null : convertNode(superClassPosition, buffer, readString);
|
|
1178
1174
|
const body = convertNode(buffer[position], buffer, readString);
|
|
1179
1175
|
return {
|
|
1180
1176
|
type: 'ClassExpression',
|
|
1181
1177
|
start,
|
|
1182
1178
|
end,
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1179
|
+
id,
|
|
1180
|
+
superClass,
|
|
1181
|
+
body
|
|
1186
1182
|
};
|
|
1187
1183
|
},
|
|
1188
|
-
|
|
1189
|
-
(position, buffer, readString) => {
|
|
1184
|
+
function conditionalExpression(position, buffer, readString) {
|
|
1190
1185
|
const start = buffer[position++];
|
|
1191
1186
|
const end = buffer[position++];
|
|
1192
1187
|
const consequent = convertNode(buffer[position++], buffer, readString);
|
|
@@ -1196,25 +1191,24 @@ const nodeConverters = [
|
|
|
1196
1191
|
type: 'ConditionalExpression',
|
|
1197
1192
|
start,
|
|
1198
1193
|
end,
|
|
1199
|
-
|
|
1194
|
+
test,
|
|
1200
1195
|
consequent,
|
|
1201
|
-
|
|
1196
|
+
alternate
|
|
1202
1197
|
};
|
|
1203
1198
|
},
|
|
1204
|
-
|
|
1205
|
-
(position, buffer, readString) => {
|
|
1199
|
+
function continueStatement(position, buffer, readString) {
|
|
1206
1200
|
const start = buffer[position++];
|
|
1207
1201
|
const end = buffer[position++];
|
|
1208
1202
|
const labelPosition = buffer[position];
|
|
1203
|
+
const label = labelPosition === 0 ? null : convertNode(labelPosition, buffer, readString);
|
|
1209
1204
|
return {
|
|
1210
1205
|
type: 'ContinueStatement',
|
|
1211
1206
|
start,
|
|
1212
1207
|
end,
|
|
1213
|
-
label
|
|
1208
|
+
label
|
|
1214
1209
|
};
|
|
1215
1210
|
},
|
|
1216
|
-
|
|
1217
|
-
(position, buffer) => {
|
|
1211
|
+
function debuggerStatement(position, buffer) {
|
|
1218
1212
|
const start = buffer[position++];
|
|
1219
1213
|
const end = buffer[position++];
|
|
1220
1214
|
return {
|
|
@@ -1223,8 +1217,20 @@ const nodeConverters = [
|
|
|
1223
1217
|
end
|
|
1224
1218
|
};
|
|
1225
1219
|
},
|
|
1226
|
-
|
|
1227
|
-
|
|
1220
|
+
function directive(position, buffer, readString) {
|
|
1221
|
+
const start = buffer[position++];
|
|
1222
|
+
const end = buffer[position++];
|
|
1223
|
+
const expression = convertNode(buffer[position++], buffer, readString);
|
|
1224
|
+
const directive = convertString(position, buffer, readString);
|
|
1225
|
+
return {
|
|
1226
|
+
type: 'ExpressionStatement',
|
|
1227
|
+
start,
|
|
1228
|
+
end,
|
|
1229
|
+
directive,
|
|
1230
|
+
expression
|
|
1231
|
+
};
|
|
1232
|
+
},
|
|
1233
|
+
function doWhileStatement(position, buffer, readString) {
|
|
1228
1234
|
const start = buffer[position++];
|
|
1229
1235
|
const end = buffer[position++];
|
|
1230
1236
|
const test = convertNode(buffer[position++], buffer, readString);
|
|
@@ -1237,8 +1243,7 @@ const nodeConverters = [
|
|
|
1237
1243
|
test
|
|
1238
1244
|
};
|
|
1239
1245
|
},
|
|
1240
|
-
|
|
1241
|
-
(position, buffer) => {
|
|
1246
|
+
function emptyStatement(position, buffer) {
|
|
1242
1247
|
const start = buffer[position++];
|
|
1243
1248
|
const end = buffer[position++];
|
|
1244
1249
|
return {
|
|
@@ -1247,24 +1252,23 @@ const nodeConverters = [
|
|
|
1247
1252
|
end
|
|
1248
1253
|
};
|
|
1249
1254
|
},
|
|
1250
|
-
|
|
1251
|
-
(position, buffer, readString) => {
|
|
1255
|
+
function exportAllDeclaration(position, buffer, readString) {
|
|
1252
1256
|
const start = buffer[position++];
|
|
1253
1257
|
const end = buffer[position++];
|
|
1254
1258
|
const exportedPosition = buffer[position++];
|
|
1259
|
+
const exported = exportedPosition === 0 ? null : convertNode(exportedPosition, buffer, readString);
|
|
1255
1260
|
const source = convertNode(buffer[position++], buffer, readString);
|
|
1256
1261
|
const attributes = convertNodeList(buffer[position], buffer, readString);
|
|
1257
1262
|
return {
|
|
1258
1263
|
type: 'ExportAllDeclaration',
|
|
1259
1264
|
start,
|
|
1260
1265
|
end,
|
|
1261
|
-
exported
|
|
1266
|
+
exported,
|
|
1262
1267
|
source,
|
|
1263
1268
|
attributes
|
|
1264
1269
|
};
|
|
1265
1270
|
},
|
|
1266
|
-
|
|
1267
|
-
(position, buffer, readString) => {
|
|
1271
|
+
function exportDefaultDeclaration(position, buffer, readString) {
|
|
1268
1272
|
const start = buffer[position++];
|
|
1269
1273
|
const end = buffer[position++];
|
|
1270
1274
|
const declaration = convertNode(position, buffer, readString);
|
|
@@ -1275,59 +1279,50 @@ const nodeConverters = [
|
|
|
1275
1279
|
declaration
|
|
1276
1280
|
};
|
|
1277
1281
|
},
|
|
1278
|
-
|
|
1279
|
-
(position, buffer, readString) => {
|
|
1282
|
+
function exportNamedDeclaration(position, buffer, readString) {
|
|
1280
1283
|
const start = buffer[position++];
|
|
1281
1284
|
const end = buffer[position++];
|
|
1282
|
-
const declarationPosition = buffer[position++];
|
|
1283
1285
|
const sourcePosition = buffer[position++];
|
|
1286
|
+
const source = sourcePosition === 0 ? null : convertNode(sourcePosition, buffer, readString);
|
|
1284
1287
|
const attributes = convertNodeList(buffer[position++], buffer, readString);
|
|
1288
|
+
const declarationPosition = buffer[position++];
|
|
1289
|
+
const declaration = declarationPosition === 0 ? null : convertNode(declarationPosition, buffer, readString);
|
|
1285
1290
|
const specifiers = convertNodeList(position, buffer, readString);
|
|
1286
1291
|
return {
|
|
1287
1292
|
type: 'ExportNamedDeclaration',
|
|
1288
1293
|
start,
|
|
1289
1294
|
end,
|
|
1290
|
-
declaration: declarationPosition
|
|
1291
|
-
? convertNode(declarationPosition, buffer, readString)
|
|
1292
|
-
: null,
|
|
1293
|
-
source: sourcePosition ? convertNode(sourcePosition, buffer, readString) : null,
|
|
1294
1295
|
specifiers,
|
|
1295
|
-
|
|
1296
|
+
source,
|
|
1297
|
+
attributes,
|
|
1298
|
+
declaration
|
|
1296
1299
|
};
|
|
1297
1300
|
},
|
|
1298
|
-
|
|
1299
|
-
(position, buffer, readString) => {
|
|
1301
|
+
function exportSpecifier(position, buffer, readString) {
|
|
1300
1302
|
const start = buffer[position++];
|
|
1301
1303
|
const end = buffer[position++];
|
|
1302
1304
|
const exportedPosition = buffer[position++];
|
|
1303
1305
|
const local = convertNode(position, buffer, readString);
|
|
1304
|
-
const exported = exportedPosition ? convertNode(exportedPosition, buffer, readString) : local;
|
|
1305
1306
|
return {
|
|
1306
1307
|
type: 'ExportSpecifier',
|
|
1307
1308
|
start,
|
|
1308
1309
|
end,
|
|
1309
|
-
|
|
1310
|
-
local
|
|
1310
|
+
local,
|
|
1311
|
+
exported: exportedPosition === 0 ? { ...local } : convertNode(exportedPosition, buffer, readString)
|
|
1311
1312
|
};
|
|
1312
1313
|
},
|
|
1313
|
-
|
|
1314
|
-
(position, buffer, readString) => {
|
|
1314
|
+
function expressionStatement(position, buffer, readString) {
|
|
1315
1315
|
const start = buffer[position++];
|
|
1316
1316
|
const end = buffer[position++];
|
|
1317
|
-
const directivePosition = buffer[position++];
|
|
1318
1317
|
const expression = convertNode(position, buffer, readString);
|
|
1319
1318
|
return {
|
|
1320
1319
|
type: 'ExpressionStatement',
|
|
1321
1320
|
start,
|
|
1322
1321
|
end,
|
|
1323
|
-
expression
|
|
1324
|
-
...(directivePosition
|
|
1325
|
-
? { directive: convertString(directivePosition, buffer, readString) }
|
|
1326
|
-
: {})
|
|
1322
|
+
expression
|
|
1327
1323
|
};
|
|
1328
1324
|
},
|
|
1329
|
-
|
|
1330
|
-
(position, buffer, readString) => {
|
|
1325
|
+
function forInStatement(position, buffer, readString) {
|
|
1331
1326
|
const start = buffer[position++];
|
|
1332
1327
|
const end = buffer[position++];
|
|
1333
1328
|
const right = convertNode(buffer[position++], buffer, readString);
|
|
@@ -1337,16 +1332,16 @@ const nodeConverters = [
|
|
|
1337
1332
|
type: 'ForInStatement',
|
|
1338
1333
|
start,
|
|
1339
1334
|
end,
|
|
1340
|
-
body,
|
|
1341
1335
|
left,
|
|
1342
|
-
right
|
|
1336
|
+
right,
|
|
1337
|
+
body
|
|
1343
1338
|
};
|
|
1344
1339
|
},
|
|
1345
|
-
|
|
1346
|
-
(position, buffer, readString) => {
|
|
1340
|
+
function forOfStatement(position, buffer, readString) {
|
|
1347
1341
|
const start = buffer[position++];
|
|
1348
1342
|
const end = buffer[position++];
|
|
1349
|
-
const
|
|
1343
|
+
const flags = buffer[position++];
|
|
1344
|
+
const awaited = (flags & 1) === 1;
|
|
1350
1345
|
const right = convertNode(buffer[position++], buffer, readString);
|
|
1351
1346
|
const body = convertNode(buffer[position++], buffer, readString);
|
|
1352
1347
|
const left = convertNode(position, buffer, readString);
|
|
@@ -1355,75 +1350,80 @@ const nodeConverters = [
|
|
|
1355
1350
|
start,
|
|
1356
1351
|
end,
|
|
1357
1352
|
await: awaited,
|
|
1358
|
-
body,
|
|
1359
1353
|
left,
|
|
1360
|
-
right
|
|
1354
|
+
right,
|
|
1355
|
+
body
|
|
1361
1356
|
};
|
|
1362
1357
|
},
|
|
1363
|
-
|
|
1364
|
-
(position, buffer, readString) => {
|
|
1358
|
+
function forStatement(position, buffer, readString) {
|
|
1365
1359
|
const start = buffer[position++];
|
|
1366
1360
|
const end = buffer[position++];
|
|
1367
1361
|
const initPosition = buffer[position++];
|
|
1362
|
+
const init = initPosition === 0 ? null : convertNode(initPosition, buffer, readString);
|
|
1368
1363
|
const testPosition = buffer[position++];
|
|
1364
|
+
const test = testPosition === 0 ? null : convertNode(testPosition, buffer, readString);
|
|
1369
1365
|
const updatePosition = buffer[position++];
|
|
1366
|
+
const update = updatePosition === 0 ? null : convertNode(updatePosition, buffer, readString);
|
|
1370
1367
|
const body = convertNode(buffer[position], buffer, readString);
|
|
1371
1368
|
return {
|
|
1372
1369
|
type: 'ForStatement',
|
|
1373
1370
|
start,
|
|
1374
1371
|
end,
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1372
|
+
init,
|
|
1373
|
+
test,
|
|
1374
|
+
update,
|
|
1375
|
+
body
|
|
1379
1376
|
};
|
|
1380
1377
|
},
|
|
1381
|
-
|
|
1382
|
-
(position, buffer, readString) => {
|
|
1378
|
+
function functionDeclaration(position, buffer, readString) {
|
|
1383
1379
|
const start = buffer[position++];
|
|
1384
1380
|
const end = buffer[position++];
|
|
1385
|
-
const
|
|
1386
|
-
const
|
|
1381
|
+
const flags = buffer[position++];
|
|
1382
|
+
const async = (flags & 1) === 1;
|
|
1383
|
+
const generator = (flags & 2) === 2;
|
|
1387
1384
|
const idPosition = buffer[position++];
|
|
1385
|
+
const id = idPosition === 0 ? null : convertNode(idPosition, buffer, readString);
|
|
1388
1386
|
const parameters = convertNodeList(buffer[position++], buffer, readString);
|
|
1389
1387
|
const body = convertNode(buffer[position++], buffer, readString);
|
|
1390
|
-
const annotations =
|
|
1391
|
-
return
|
|
1388
|
+
const annotations = convertAnnotations(position, buffer);
|
|
1389
|
+
return {
|
|
1392
1390
|
type: 'FunctionDeclaration',
|
|
1393
1391
|
start,
|
|
1394
1392
|
end,
|
|
1395
1393
|
async,
|
|
1396
|
-
body,
|
|
1397
|
-
expression: false,
|
|
1398
1394
|
generator,
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1395
|
+
...(annotations.length > 0 ? { [ANNOTATION_KEY]: annotations } : {}),
|
|
1396
|
+
id,
|
|
1397
|
+
params: parameters,
|
|
1398
|
+
body,
|
|
1399
|
+
expression: false
|
|
1400
|
+
};
|
|
1402
1401
|
},
|
|
1403
|
-
|
|
1404
|
-
(position, buffer, readString) => {
|
|
1402
|
+
function functionExpression(position, buffer, readString) {
|
|
1405
1403
|
const start = buffer[position++];
|
|
1406
1404
|
const end = buffer[position++];
|
|
1407
|
-
const
|
|
1408
|
-
const
|
|
1405
|
+
const flags = buffer[position++];
|
|
1406
|
+
const async = (flags & 1) === 1;
|
|
1407
|
+
const generator = (flags & 2) === 2;
|
|
1409
1408
|
const idPosition = buffer[position++];
|
|
1409
|
+
const id = idPosition === 0 ? null : convertNode(idPosition, buffer, readString);
|
|
1410
1410
|
const parameters = convertNodeList(buffer[position++], buffer, readString);
|
|
1411
1411
|
const body = convertNode(buffer[position++], buffer, readString);
|
|
1412
|
-
const annotations =
|
|
1413
|
-
return
|
|
1412
|
+
const annotations = convertAnnotations(position, buffer);
|
|
1413
|
+
return {
|
|
1414
1414
|
type: 'FunctionExpression',
|
|
1415
1415
|
start,
|
|
1416
1416
|
end,
|
|
1417
1417
|
async,
|
|
1418
|
-
body,
|
|
1419
|
-
expression: false,
|
|
1420
1418
|
generator,
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1419
|
+
...(annotations.length > 0 ? { [ANNOTATION_KEY]: annotations } : {}),
|
|
1420
|
+
id,
|
|
1421
|
+
params: parameters,
|
|
1422
|
+
body,
|
|
1423
|
+
expression: false
|
|
1424
|
+
};
|
|
1424
1425
|
},
|
|
1425
|
-
|
|
1426
|
-
(position, buffer, readString) => {
|
|
1426
|
+
function identifier(position, buffer, readString) {
|
|
1427
1427
|
const start = buffer[position++];
|
|
1428
1428
|
const end = buffer[position++];
|
|
1429
1429
|
const name = convertString(position, buffer, readString);
|
|
@@ -1434,24 +1434,23 @@ const nodeConverters = [
|
|
|
1434
1434
|
name
|
|
1435
1435
|
};
|
|
1436
1436
|
},
|
|
1437
|
-
|
|
1438
|
-
(position, buffer, readString) => {
|
|
1437
|
+
function ifStatement(position, buffer, readString) {
|
|
1439
1438
|
const start = buffer[position++];
|
|
1440
1439
|
const end = buffer[position++];
|
|
1441
1440
|
const consequent = convertNode(buffer[position++], buffer, readString);
|
|
1442
1441
|
const alternatePosition = buffer[position++];
|
|
1442
|
+
const alternate = alternatePosition === 0 ? null : convertNode(alternatePosition, buffer, readString);
|
|
1443
1443
|
const test = convertNode(position, buffer, readString);
|
|
1444
1444
|
return {
|
|
1445
1445
|
type: 'IfStatement',
|
|
1446
1446
|
start,
|
|
1447
1447
|
end,
|
|
1448
|
-
|
|
1448
|
+
test,
|
|
1449
1449
|
consequent,
|
|
1450
|
-
|
|
1450
|
+
alternate
|
|
1451
1451
|
};
|
|
1452
1452
|
},
|
|
1453
|
-
|
|
1454
|
-
(position, buffer, readString) => {
|
|
1453
|
+
function importAttribute(position, buffer, readString) {
|
|
1455
1454
|
const start = buffer[position++];
|
|
1456
1455
|
const end = buffer[position++];
|
|
1457
1456
|
const value = convertNode(buffer[position++], buffer, readString);
|
|
@@ -1464,8 +1463,7 @@ const nodeConverters = [
|
|
|
1464
1463
|
value
|
|
1465
1464
|
};
|
|
1466
1465
|
},
|
|
1467
|
-
|
|
1468
|
-
(position, buffer, readString) => {
|
|
1466
|
+
function importDeclaration(position, buffer, readString) {
|
|
1469
1467
|
const start = buffer[position++];
|
|
1470
1468
|
const end = buffer[position++];
|
|
1471
1469
|
const source = convertNode(buffer[position++], buffer, readString);
|
|
@@ -1475,13 +1473,12 @@ const nodeConverters = [
|
|
|
1475
1473
|
type: 'ImportDeclaration',
|
|
1476
1474
|
start,
|
|
1477
1475
|
end,
|
|
1478
|
-
source,
|
|
1479
1476
|
specifiers,
|
|
1477
|
+
source,
|
|
1480
1478
|
attributes
|
|
1481
1479
|
};
|
|
1482
1480
|
},
|
|
1483
|
-
|
|
1484
|
-
(position, buffer, readString) => {
|
|
1481
|
+
function importDefaultSpecifier(position, buffer, readString) {
|
|
1485
1482
|
const start = buffer[position++];
|
|
1486
1483
|
const end = buffer[position++];
|
|
1487
1484
|
const local = convertNode(position, buffer, readString);
|
|
@@ -1492,22 +1489,21 @@ const nodeConverters = [
|
|
|
1492
1489
|
local
|
|
1493
1490
|
};
|
|
1494
1491
|
},
|
|
1495
|
-
|
|
1496
|
-
(position, buffer, readString) => {
|
|
1492
|
+
function importExpression(position, buffer, readString) {
|
|
1497
1493
|
const start = buffer[position++];
|
|
1498
1494
|
const end = buffer[position++];
|
|
1499
1495
|
const optionsPosition = buffer[position++];
|
|
1496
|
+
const options = optionsPosition === 0 ? null : convertNode(optionsPosition, buffer, readString);
|
|
1500
1497
|
const source = convertNode(position, buffer, readString);
|
|
1501
1498
|
return {
|
|
1502
1499
|
type: 'ImportExpression',
|
|
1503
1500
|
start,
|
|
1504
1501
|
end,
|
|
1505
1502
|
source,
|
|
1506
|
-
options
|
|
1503
|
+
options
|
|
1507
1504
|
};
|
|
1508
1505
|
},
|
|
1509
|
-
|
|
1510
|
-
(position, buffer, readString) => {
|
|
1506
|
+
function importNamespaceSpecifier(position, buffer, readString) {
|
|
1511
1507
|
const start = buffer[position++];
|
|
1512
1508
|
const end = buffer[position++];
|
|
1513
1509
|
const local = convertNode(position, buffer, readString);
|
|
@@ -1518,23 +1514,20 @@ const nodeConverters = [
|
|
|
1518
1514
|
local
|
|
1519
1515
|
};
|
|
1520
1516
|
},
|
|
1521
|
-
|
|
1522
|
-
(position, buffer, readString) => {
|
|
1517
|
+
function importSpecifier(position, buffer, readString) {
|
|
1523
1518
|
const start = buffer[position++];
|
|
1524
1519
|
const end = buffer[position++];
|
|
1525
1520
|
const importedPosition = buffer[position++];
|
|
1526
1521
|
const local = convertNode(buffer[position], buffer, readString);
|
|
1527
|
-
const imported = importedPosition ? convertNode(importedPosition, buffer, readString) : local;
|
|
1528
1522
|
return {
|
|
1529
1523
|
type: 'ImportSpecifier',
|
|
1530
1524
|
start,
|
|
1531
1525
|
end,
|
|
1532
|
-
imported,
|
|
1526
|
+
imported: importedPosition === 0 ? { ...local } : convertNode(importedPosition, buffer, readString),
|
|
1533
1527
|
local
|
|
1534
1528
|
};
|
|
1535
1529
|
},
|
|
1536
|
-
|
|
1537
|
-
(position, buffer, readString) => {
|
|
1530
|
+
function labeledStatement(position, buffer, readString) {
|
|
1538
1531
|
const start = buffer[position++];
|
|
1539
1532
|
const end = buffer[position++];
|
|
1540
1533
|
const body = convertNode(buffer[position++], buffer, readString);
|
|
@@ -1543,67 +1536,63 @@ const nodeConverters = [
|
|
|
1543
1536
|
type: 'LabeledStatement',
|
|
1544
1537
|
start,
|
|
1545
1538
|
end,
|
|
1546
|
-
|
|
1547
|
-
|
|
1539
|
+
label,
|
|
1540
|
+
body
|
|
1548
1541
|
};
|
|
1549
1542
|
},
|
|
1550
|
-
|
|
1551
|
-
(position, buffer, readString) => {
|
|
1543
|
+
function literalBigInt(position, buffer, readString) {
|
|
1552
1544
|
const start = buffer[position++];
|
|
1553
1545
|
const end = buffer[position++];
|
|
1554
|
-
const
|
|
1555
|
-
const
|
|
1556
|
-
const value = convertString(position, buffer, readString);
|
|
1546
|
+
const raw = convertString(buffer[position++], buffer, readString);
|
|
1547
|
+
const bigint = convertString(position, buffer, readString);
|
|
1557
1548
|
return {
|
|
1558
1549
|
type: 'Literal',
|
|
1559
1550
|
start,
|
|
1560
1551
|
end,
|
|
1552
|
+
bigint,
|
|
1561
1553
|
raw,
|
|
1562
|
-
value
|
|
1554
|
+
value: BigInt(bigint)
|
|
1563
1555
|
};
|
|
1564
1556
|
},
|
|
1565
|
-
|
|
1566
|
-
(position, buffer) => {
|
|
1557
|
+
function literalBoolean(position, buffer) {
|
|
1567
1558
|
const start = buffer[position++];
|
|
1568
1559
|
const end = buffer[position++];
|
|
1569
|
-
const
|
|
1560
|
+
const flags = buffer[position++];
|
|
1561
|
+
const value = (flags & 1) === 1;
|
|
1570
1562
|
return {
|
|
1571
1563
|
type: 'Literal',
|
|
1572
1564
|
start,
|
|
1573
1565
|
end,
|
|
1574
|
-
|
|
1575
|
-
value
|
|
1566
|
+
value,
|
|
1567
|
+
raw: value ? 'true' : 'false'
|
|
1576
1568
|
};
|
|
1577
1569
|
},
|
|
1578
|
-
|
|
1579
|
-
(position, buffer, readString) => {
|
|
1570
|
+
function literalNull(position, buffer) {
|
|
1580
1571
|
const start = buffer[position++];
|
|
1581
1572
|
const end = buffer[position++];
|
|
1582
|
-
const rawPosition = buffer[position++];
|
|
1583
|
-
const raw = rawPosition ? convertString(rawPosition, buffer, readString) : undefined;
|
|
1584
|
-
const value = new DataView(buffer.buffer).getFloat64(position << 2, true);
|
|
1585
1573
|
return {
|
|
1586
1574
|
type: 'Literal',
|
|
1587
1575
|
start,
|
|
1588
1576
|
end,
|
|
1589
|
-
raw,
|
|
1590
|
-
value
|
|
1577
|
+
raw: 'null',
|
|
1578
|
+
value: null
|
|
1591
1579
|
};
|
|
1592
1580
|
},
|
|
1593
|
-
|
|
1594
|
-
(position, buffer) => {
|
|
1581
|
+
function literalNumber(position, buffer, readString) {
|
|
1595
1582
|
const start = buffer[position++];
|
|
1596
1583
|
const end = buffer[position++];
|
|
1584
|
+
const rawPosition = buffer[position++];
|
|
1585
|
+
const raw = rawPosition === 0 ? undefined : convertString(rawPosition, buffer, readString);
|
|
1586
|
+
const value = new DataView(buffer.buffer).getFloat64(position << 2, true);
|
|
1597
1587
|
return {
|
|
1598
1588
|
type: 'Literal',
|
|
1599
1589
|
start,
|
|
1600
1590
|
end,
|
|
1601
|
-
raw
|
|
1602
|
-
value
|
|
1591
|
+
raw,
|
|
1592
|
+
value
|
|
1603
1593
|
};
|
|
1604
1594
|
},
|
|
1605
|
-
|
|
1606
|
-
(position, buffer, readString) => {
|
|
1595
|
+
function literalRegExp(position, buffer, readString) {
|
|
1607
1596
|
const start = buffer[position++];
|
|
1608
1597
|
const end = buffer[position++];
|
|
1609
1598
|
const pattern = convertString(buffer[position++], buffer, readString);
|
|
@@ -1613,30 +1602,25 @@ const nodeConverters = [
|
|
|
1613
1602
|
start,
|
|
1614
1603
|
end,
|
|
1615
1604
|
raw: `/${pattern}/${flags}`,
|
|
1616
|
-
regex: {
|
|
1617
|
-
flags,
|
|
1618
|
-
pattern
|
|
1619
|
-
},
|
|
1605
|
+
regex: { flags, pattern },
|
|
1620
1606
|
value: new RegExp(pattern, flags)
|
|
1621
1607
|
};
|
|
1622
1608
|
},
|
|
1623
|
-
|
|
1624
|
-
(position, buffer, readString) => {
|
|
1609
|
+
function literalString(position, buffer, readString) {
|
|
1625
1610
|
const start = buffer[position++];
|
|
1626
1611
|
const end = buffer[position++];
|
|
1627
|
-
const
|
|
1628
|
-
const raw = convertString(
|
|
1612
|
+
const rawPosition = buffer[position++];
|
|
1613
|
+
const raw = rawPosition === 0 ? undefined : convertString(rawPosition, buffer, readString);
|
|
1614
|
+
const value = convertString(position, buffer, readString);
|
|
1629
1615
|
return {
|
|
1630
1616
|
type: 'Literal',
|
|
1631
1617
|
start,
|
|
1632
1618
|
end,
|
|
1633
|
-
|
|
1634
|
-
raw
|
|
1635
|
-
value: BigInt(bigint)
|
|
1619
|
+
value,
|
|
1620
|
+
raw
|
|
1636
1621
|
};
|
|
1637
1622
|
},
|
|
1638
|
-
|
|
1639
|
-
(position, buffer, readString) => {
|
|
1623
|
+
function logicalExpression(position, buffer, readString) {
|
|
1640
1624
|
const start = buffer[position++];
|
|
1641
1625
|
const end = buffer[position++];
|
|
1642
1626
|
const operator = FIXED_STRINGS[buffer[position++]];
|
|
@@ -1646,17 +1630,17 @@ const nodeConverters = [
|
|
|
1646
1630
|
type: 'LogicalExpression',
|
|
1647
1631
|
start,
|
|
1648
1632
|
end,
|
|
1649
|
-
left,
|
|
1650
1633
|
operator,
|
|
1634
|
+
left,
|
|
1651
1635
|
right
|
|
1652
1636
|
};
|
|
1653
1637
|
},
|
|
1654
|
-
|
|
1655
|
-
(position, buffer, readString) => {
|
|
1638
|
+
function memberExpression(position, buffer, readString) {
|
|
1656
1639
|
const start = buffer[position++];
|
|
1657
1640
|
const end = buffer[position++];
|
|
1658
|
-
const
|
|
1659
|
-
const computed =
|
|
1641
|
+
const flags = buffer[position++];
|
|
1642
|
+
const computed = (flags & 1) === 1;
|
|
1643
|
+
const optional = (flags & 2) === 2;
|
|
1660
1644
|
const property = convertNode(buffer[position++], buffer, readString);
|
|
1661
1645
|
const object = convertNode(position, buffer, readString);
|
|
1662
1646
|
return {
|
|
@@ -1664,13 +1648,12 @@ const nodeConverters = [
|
|
|
1664
1648
|
start,
|
|
1665
1649
|
end,
|
|
1666
1650
|
computed,
|
|
1667
|
-
object,
|
|
1668
1651
|
optional,
|
|
1652
|
+
object,
|
|
1669
1653
|
property
|
|
1670
1654
|
};
|
|
1671
1655
|
},
|
|
1672
|
-
|
|
1673
|
-
(position, buffer, readString) => {
|
|
1656
|
+
function metaProperty(position, buffer, readString) {
|
|
1674
1657
|
const start = buffer[position++];
|
|
1675
1658
|
const end = buffer[position++];
|
|
1676
1659
|
const property = convertNode(buffer[position++], buffer, readString);
|
|
@@ -1683,43 +1666,42 @@ const nodeConverters = [
|
|
|
1683
1666
|
property
|
|
1684
1667
|
};
|
|
1685
1668
|
},
|
|
1686
|
-
|
|
1687
|
-
(position, buffer, readString) => {
|
|
1669
|
+
function methodDefinition(position, buffer, readString) {
|
|
1688
1670
|
const start = buffer[position++];
|
|
1689
1671
|
const end = buffer[position++];
|
|
1690
|
-
const
|
|
1691
|
-
const computed =
|
|
1692
|
-
const isStatic =
|
|
1672
|
+
const flags = buffer[position++];
|
|
1673
|
+
const computed = (flags & 1) === 1;
|
|
1674
|
+
const isStatic = (flags & 2) === 2;
|
|
1693
1675
|
const value = convertNode(buffer[position++], buffer, readString);
|
|
1676
|
+
const kind = FIXED_STRINGS[buffer[position++]];
|
|
1694
1677
|
const key = convertNode(position, buffer, readString);
|
|
1695
1678
|
return {
|
|
1696
1679
|
type: 'MethodDefinition',
|
|
1697
1680
|
start,
|
|
1698
1681
|
end,
|
|
1699
1682
|
computed,
|
|
1700
|
-
key,
|
|
1701
|
-
kind,
|
|
1702
1683
|
static: isStatic,
|
|
1703
|
-
|
|
1684
|
+
key,
|
|
1685
|
+
value,
|
|
1686
|
+
kind
|
|
1704
1687
|
};
|
|
1705
1688
|
},
|
|
1706
|
-
|
|
1707
|
-
(position, buffer, readString) => {
|
|
1689
|
+
function newExpression(position, buffer, readString) {
|
|
1708
1690
|
const start = buffer[position++];
|
|
1709
1691
|
const end = buffer[position++];
|
|
1710
1692
|
const callee = convertNode(buffer[position++], buffer, readString);
|
|
1711
|
-
const
|
|
1712
|
-
const annotations =
|
|
1713
|
-
return
|
|
1693
|
+
const callArguments = convertNodeList(buffer[position++], buffer, readString);
|
|
1694
|
+
const annotations = convertAnnotations(position, buffer);
|
|
1695
|
+
return {
|
|
1714
1696
|
type: 'NewExpression',
|
|
1715
1697
|
start,
|
|
1716
1698
|
end,
|
|
1717
|
-
|
|
1718
|
-
callee
|
|
1719
|
-
|
|
1699
|
+
...(annotations.length > 0 ? { [ANNOTATION_KEY]: annotations } : {}),
|
|
1700
|
+
callee,
|
|
1701
|
+
arguments: callArguments
|
|
1702
|
+
};
|
|
1720
1703
|
},
|
|
1721
|
-
|
|
1722
|
-
(position, buffer, readString) => {
|
|
1704
|
+
function objectExpression(position, buffer, readString) {
|
|
1723
1705
|
const start = buffer[position++];
|
|
1724
1706
|
const end = buffer[position++];
|
|
1725
1707
|
const properties = convertNodeList(position, buffer, readString);
|
|
@@ -1730,8 +1712,7 @@ const nodeConverters = [
|
|
|
1730
1712
|
properties
|
|
1731
1713
|
};
|
|
1732
1714
|
},
|
|
1733
|
-
|
|
1734
|
-
(position, buffer, readString) => {
|
|
1715
|
+
function objectPattern(position, buffer, readString) {
|
|
1735
1716
|
const start = buffer[position++];
|
|
1736
1717
|
const end = buffer[position++];
|
|
1737
1718
|
const properties = convertNodeList(position, buffer, readString);
|
|
@@ -1742,8 +1723,7 @@ const nodeConverters = [
|
|
|
1742
1723
|
properties
|
|
1743
1724
|
};
|
|
1744
1725
|
},
|
|
1745
|
-
|
|
1746
|
-
(position, buffer, readString) => {
|
|
1726
|
+
function privateIdentifier(position, buffer, readString) {
|
|
1747
1727
|
const start = buffer[position++];
|
|
1748
1728
|
const end = buffer[position++];
|
|
1749
1729
|
const name = convertString(position, buffer, readString);
|
|
@@ -1754,62 +1734,62 @@ const nodeConverters = [
|
|
|
1754
1734
|
name
|
|
1755
1735
|
};
|
|
1756
1736
|
},
|
|
1757
|
-
|
|
1758
|
-
(position, buffer, readString) => {
|
|
1737
|
+
function program(position, buffer, readString) {
|
|
1759
1738
|
const start = buffer[position++];
|
|
1760
1739
|
const end = buffer[position++];
|
|
1761
|
-
const annotations =
|
|
1740
|
+
const annotations = convertAnnotations(buffer[position++], buffer);
|
|
1762
1741
|
const body = convertNodeList(position, buffer, readString);
|
|
1763
|
-
return
|
|
1742
|
+
return {
|
|
1764
1743
|
type: 'Program',
|
|
1765
1744
|
start,
|
|
1766
1745
|
end,
|
|
1767
1746
|
body,
|
|
1747
|
+
...(annotations.length > 0 ? { [INVALID_ANNOTATION_KEY]: annotations } : {}),
|
|
1768
1748
|
sourceType: 'module'
|
|
1769
|
-
}
|
|
1749
|
+
};
|
|
1770
1750
|
},
|
|
1771
|
-
|
|
1772
|
-
(position, buffer, readString) => {
|
|
1751
|
+
function property(position, buffer, readString) {
|
|
1773
1752
|
const start = buffer[position++];
|
|
1774
1753
|
const end = buffer[position++];
|
|
1775
|
-
const
|
|
1776
|
-
const method =
|
|
1777
|
-
const
|
|
1778
|
-
const
|
|
1779
|
-
const
|
|
1780
|
-
const
|
|
1754
|
+
const flags = buffer[position++];
|
|
1755
|
+
const method = (flags & 1) === 1;
|
|
1756
|
+
const shorthand = (flags & 2) === 2;
|
|
1757
|
+
const computed = (flags & 4) === 4;
|
|
1758
|
+
const keyPosition = buffer[position++];
|
|
1759
|
+
const value = convertNode(buffer[position++], buffer, readString);
|
|
1760
|
+
const kind = FIXED_STRINGS[buffer[position]];
|
|
1781
1761
|
return {
|
|
1782
1762
|
type: 'Property',
|
|
1783
1763
|
start,
|
|
1784
1764
|
end,
|
|
1785
|
-
computed,
|
|
1786
|
-
key,
|
|
1787
|
-
kind,
|
|
1788
1765
|
method,
|
|
1789
1766
|
shorthand,
|
|
1790
|
-
|
|
1767
|
+
computed,
|
|
1768
|
+
key: keyPosition === 0 ? { ...value } : convertNode(keyPosition, buffer, readString),
|
|
1769
|
+
value,
|
|
1770
|
+
kind
|
|
1791
1771
|
};
|
|
1792
1772
|
},
|
|
1793
|
-
|
|
1794
|
-
(position, buffer, readString) => {
|
|
1773
|
+
function propertyDefinition(position, buffer, readString) {
|
|
1795
1774
|
const start = buffer[position++];
|
|
1796
1775
|
const end = buffer[position++];
|
|
1797
|
-
const
|
|
1798
|
-
const
|
|
1776
|
+
const flags = buffer[position++];
|
|
1777
|
+
const computed = (flags & 1) === 1;
|
|
1778
|
+
const isStatic = (flags & 2) === 2;
|
|
1799
1779
|
const valuePosition = buffer[position++];
|
|
1780
|
+
const value = valuePosition === 0 ? null : convertNode(valuePosition, buffer, readString);
|
|
1800
1781
|
const key = convertNode(position, buffer, readString);
|
|
1801
1782
|
return {
|
|
1802
1783
|
type: 'PropertyDefinition',
|
|
1803
1784
|
start,
|
|
1804
1785
|
end,
|
|
1805
1786
|
computed,
|
|
1806
|
-
key,
|
|
1807
1787
|
static: isStatic,
|
|
1808
|
-
|
|
1788
|
+
key,
|
|
1789
|
+
value
|
|
1809
1790
|
};
|
|
1810
1791
|
},
|
|
1811
|
-
|
|
1812
|
-
(position, buffer, readString) => {
|
|
1792
|
+
function restElement(position, buffer, readString) {
|
|
1813
1793
|
const start = buffer[position++];
|
|
1814
1794
|
const end = buffer[position++];
|
|
1815
1795
|
const argument = convertNode(position, buffer, readString);
|
|
@@ -1820,20 +1800,19 @@ const nodeConverters = [
|
|
|
1820
1800
|
argument
|
|
1821
1801
|
};
|
|
1822
1802
|
},
|
|
1823
|
-
|
|
1824
|
-
(position, buffer, readString) => {
|
|
1803
|
+
function returnStatement(position, buffer, readString) {
|
|
1825
1804
|
const start = buffer[position++];
|
|
1826
1805
|
const end = buffer[position++];
|
|
1827
1806
|
const argumentPosition = buffer[position];
|
|
1807
|
+
const argument = argumentPosition === 0 ? null : convertNode(argumentPosition, buffer, readString);
|
|
1828
1808
|
return {
|
|
1829
1809
|
type: 'ReturnStatement',
|
|
1830
1810
|
start,
|
|
1831
1811
|
end,
|
|
1832
|
-
argument
|
|
1812
|
+
argument
|
|
1833
1813
|
};
|
|
1834
1814
|
},
|
|
1835
|
-
|
|
1836
|
-
(position, buffer, readString) => {
|
|
1815
|
+
function sequenceExpression(position, buffer, readString) {
|
|
1837
1816
|
const start = buffer[position++];
|
|
1838
1817
|
const end = buffer[position++];
|
|
1839
1818
|
const expressions = convertNodeList(position, buffer, readString);
|
|
@@ -1844,8 +1823,7 @@ const nodeConverters = [
|
|
|
1844
1823
|
expressions
|
|
1845
1824
|
};
|
|
1846
1825
|
},
|
|
1847
|
-
|
|
1848
|
-
(position, buffer, readString) => {
|
|
1826
|
+
function spreadElement(position, buffer, readString) {
|
|
1849
1827
|
const start = buffer[position++];
|
|
1850
1828
|
const end = buffer[position++];
|
|
1851
1829
|
const argument = convertNode(position, buffer, readString);
|
|
@@ -1856,8 +1834,7 @@ const nodeConverters = [
|
|
|
1856
1834
|
argument
|
|
1857
1835
|
};
|
|
1858
1836
|
},
|
|
1859
|
-
|
|
1860
|
-
(position, buffer, readString) => {
|
|
1837
|
+
function staticBlock(position, buffer, readString) {
|
|
1861
1838
|
const start = buffer[position++];
|
|
1862
1839
|
const end = buffer[position++];
|
|
1863
1840
|
const body = convertNodeList(position, buffer, readString);
|
|
@@ -1868,8 +1845,7 @@ const nodeConverters = [
|
|
|
1868
1845
|
body
|
|
1869
1846
|
};
|
|
1870
1847
|
},
|
|
1871
|
-
|
|
1872
|
-
(position, buffer) => {
|
|
1848
|
+
function superElement(position, buffer) {
|
|
1873
1849
|
const start = buffer[position++];
|
|
1874
1850
|
const end = buffer[position++];
|
|
1875
1851
|
return {
|
|
@@ -1878,22 +1854,21 @@ const nodeConverters = [
|
|
|
1878
1854
|
end
|
|
1879
1855
|
};
|
|
1880
1856
|
},
|
|
1881
|
-
|
|
1882
|
-
(position, buffer, readString) => {
|
|
1857
|
+
function switchCase(position, buffer, readString) {
|
|
1883
1858
|
const start = buffer[position++];
|
|
1884
1859
|
const end = buffer[position++];
|
|
1885
1860
|
const testPosition = buffer[position++];
|
|
1861
|
+
const test = testPosition === 0 ? null : convertNode(testPosition, buffer, readString);
|
|
1886
1862
|
const consequent = convertNodeList(buffer[position], buffer, readString);
|
|
1887
1863
|
return {
|
|
1888
1864
|
type: 'SwitchCase',
|
|
1889
1865
|
start,
|
|
1890
1866
|
end,
|
|
1891
|
-
|
|
1892
|
-
|
|
1867
|
+
test,
|
|
1868
|
+
consequent
|
|
1893
1869
|
};
|
|
1894
1870
|
},
|
|
1895
|
-
|
|
1896
|
-
(position, buffer, readString) => {
|
|
1871
|
+
function switchStatement(position, buffer, readString) {
|
|
1897
1872
|
const start = buffer[position++];
|
|
1898
1873
|
const end = buffer[position++];
|
|
1899
1874
|
const cases = convertNodeList(buffer[position++], buffer, readString);
|
|
@@ -1902,12 +1877,11 @@ const nodeConverters = [
|
|
|
1902
1877
|
type: 'SwitchStatement',
|
|
1903
1878
|
start,
|
|
1904
1879
|
end,
|
|
1905
|
-
|
|
1906
|
-
|
|
1880
|
+
discriminant,
|
|
1881
|
+
cases
|
|
1907
1882
|
};
|
|
1908
1883
|
},
|
|
1909
|
-
|
|
1910
|
-
(position, buffer, readString) => {
|
|
1884
|
+
function taggedTemplateExpression(position, buffer, readString) {
|
|
1911
1885
|
const start = buffer[position++];
|
|
1912
1886
|
const end = buffer[position++];
|
|
1913
1887
|
const quasi = convertNode(buffer[position++], buffer, readString);
|
|
@@ -1916,30 +1890,27 @@ const nodeConverters = [
|
|
|
1916
1890
|
type: 'TaggedTemplateExpression',
|
|
1917
1891
|
start,
|
|
1918
1892
|
end,
|
|
1919
|
-
|
|
1920
|
-
|
|
1893
|
+
tag,
|
|
1894
|
+
quasi
|
|
1921
1895
|
};
|
|
1922
1896
|
},
|
|
1923
|
-
|
|
1924
|
-
(position, buffer, readString) => {
|
|
1897
|
+
function templateElement(position, buffer, readString) {
|
|
1925
1898
|
const start = buffer[position++];
|
|
1926
1899
|
const end = buffer[position++];
|
|
1927
|
-
const
|
|
1900
|
+
const flags = buffer[position++];
|
|
1901
|
+
const tail = (flags & 1) === 1;
|
|
1928
1902
|
const cookedPosition = buffer[position++];
|
|
1903
|
+
const cooked = cookedPosition === 0 ? undefined : convertString(cookedPosition, buffer, readString);
|
|
1929
1904
|
const raw = convertString(position, buffer, readString);
|
|
1930
1905
|
return {
|
|
1931
1906
|
type: 'TemplateElement',
|
|
1932
1907
|
start,
|
|
1933
1908
|
end,
|
|
1934
1909
|
tail,
|
|
1935
|
-
value: {
|
|
1936
|
-
cooked: cookedPosition ? convertString(cookedPosition, buffer, readString) : null,
|
|
1937
|
-
raw
|
|
1938
|
-
}
|
|
1910
|
+
value: { cooked, raw }
|
|
1939
1911
|
};
|
|
1940
1912
|
},
|
|
1941
|
-
|
|
1942
|
-
(position, buffer, readString) => {
|
|
1913
|
+
function templateLiteral(position, buffer, readString) {
|
|
1943
1914
|
const start = buffer[position++];
|
|
1944
1915
|
const end = buffer[position++];
|
|
1945
1916
|
const expressions = convertNodeList(buffer[position++], buffer, readString);
|
|
@@ -1948,12 +1919,11 @@ const nodeConverters = [
|
|
|
1948
1919
|
type: 'TemplateLiteral',
|
|
1949
1920
|
start,
|
|
1950
1921
|
end,
|
|
1951
|
-
|
|
1952
|
-
|
|
1922
|
+
quasis,
|
|
1923
|
+
expressions
|
|
1953
1924
|
};
|
|
1954
1925
|
},
|
|
1955
|
-
|
|
1956
|
-
(position, buffer) => {
|
|
1926
|
+
function thisExpression(position, buffer) {
|
|
1957
1927
|
const start = buffer[position++];
|
|
1958
1928
|
const end = buffer[position++];
|
|
1959
1929
|
return {
|
|
@@ -1962,8 +1932,7 @@ const nodeConverters = [
|
|
|
1962
1932
|
end
|
|
1963
1933
|
};
|
|
1964
1934
|
},
|
|
1965
|
-
|
|
1966
|
-
(position, buffer, readString) => {
|
|
1935
|
+
function throwStatement(position, buffer, readString) {
|
|
1967
1936
|
const start = buffer[position++];
|
|
1968
1937
|
const end = buffer[position++];
|
|
1969
1938
|
const argument = convertNode(position, buffer, readString);
|
|
@@ -1974,24 +1943,24 @@ const nodeConverters = [
|
|
|
1974
1943
|
argument
|
|
1975
1944
|
};
|
|
1976
1945
|
},
|
|
1977
|
-
|
|
1978
|
-
(position, buffer, readString) => {
|
|
1946
|
+
function tryStatement(position, buffer, readString) {
|
|
1979
1947
|
const start = buffer[position++];
|
|
1980
1948
|
const end = buffer[position++];
|
|
1981
1949
|
const handlerPosition = buffer[position++];
|
|
1950
|
+
const handler = handlerPosition === 0 ? null : convertNode(handlerPosition, buffer, readString);
|
|
1982
1951
|
const finalizerPosition = buffer[position++];
|
|
1952
|
+
const finalizer = finalizerPosition === 0 ? null : convertNode(finalizerPosition, buffer, readString);
|
|
1983
1953
|
const block = convertNode(position, buffer, readString);
|
|
1984
1954
|
return {
|
|
1985
1955
|
type: 'TryStatement',
|
|
1986
1956
|
start,
|
|
1987
1957
|
end,
|
|
1988
1958
|
block,
|
|
1989
|
-
|
|
1990
|
-
|
|
1959
|
+
handler,
|
|
1960
|
+
finalizer
|
|
1991
1961
|
};
|
|
1992
1962
|
},
|
|
1993
|
-
|
|
1994
|
-
(position, buffer, readString) => {
|
|
1963
|
+
function unaryExpression(position, buffer, readString) {
|
|
1995
1964
|
const start = buffer[position++];
|
|
1996
1965
|
const end = buffer[position++];
|
|
1997
1966
|
const operator = FIXED_STRINGS[buffer[position++]];
|
|
@@ -2000,29 +1969,28 @@ const nodeConverters = [
|
|
|
2000
1969
|
type: 'UnaryExpression',
|
|
2001
1970
|
start,
|
|
2002
1971
|
end,
|
|
2003
|
-
argument,
|
|
2004
1972
|
operator,
|
|
1973
|
+
argument,
|
|
2005
1974
|
prefix: true
|
|
2006
1975
|
};
|
|
2007
1976
|
},
|
|
2008
|
-
|
|
2009
|
-
(position, buffer, readString) => {
|
|
1977
|
+
function updateExpression(position, buffer, readString) {
|
|
2010
1978
|
const start = buffer[position++];
|
|
2011
1979
|
const end = buffer[position++];
|
|
2012
|
-
const
|
|
1980
|
+
const flags = buffer[position++];
|
|
1981
|
+
const prefix = (flags & 1) === 1;
|
|
2013
1982
|
const operator = FIXED_STRINGS[buffer[position++]];
|
|
2014
1983
|
const argument = convertNode(position, buffer, readString);
|
|
2015
1984
|
return {
|
|
2016
1985
|
type: 'UpdateExpression',
|
|
2017
1986
|
start,
|
|
2018
1987
|
end,
|
|
2019
|
-
|
|
1988
|
+
prefix,
|
|
2020
1989
|
operator,
|
|
2021
|
-
|
|
1990
|
+
argument
|
|
2022
1991
|
};
|
|
2023
1992
|
},
|
|
2024
|
-
|
|
2025
|
-
(position, buffer, readString) => {
|
|
1993
|
+
function variableDeclaration(position, buffer, readString) {
|
|
2026
1994
|
const start = buffer[position++];
|
|
2027
1995
|
const end = buffer[position++];
|
|
2028
1996
|
const kind = FIXED_STRINGS[buffer[position++]];
|
|
@@ -2031,26 +1999,25 @@ const nodeConverters = [
|
|
|
2031
1999
|
type: 'VariableDeclaration',
|
|
2032
2000
|
start,
|
|
2033
2001
|
end,
|
|
2034
|
-
|
|
2035
|
-
|
|
2002
|
+
kind,
|
|
2003
|
+
declarations
|
|
2036
2004
|
};
|
|
2037
2005
|
},
|
|
2038
|
-
|
|
2039
|
-
(position, buffer, readString) => {
|
|
2006
|
+
function variableDeclarator(position, buffer, readString) {
|
|
2040
2007
|
const start = buffer[position++];
|
|
2041
2008
|
const end = buffer[position++];
|
|
2042
|
-
const
|
|
2009
|
+
const initPosition = buffer[position++];
|
|
2010
|
+
const init = initPosition === 0 ? null : convertNode(initPosition, buffer, readString);
|
|
2043
2011
|
const id = convertNode(position, buffer, readString);
|
|
2044
2012
|
return {
|
|
2045
2013
|
type: 'VariableDeclarator',
|
|
2046
2014
|
start,
|
|
2047
2015
|
end,
|
|
2048
2016
|
id,
|
|
2049
|
-
init
|
|
2017
|
+
init
|
|
2050
2018
|
};
|
|
2051
2019
|
},
|
|
2052
|
-
|
|
2053
|
-
(position, buffer, readString) => {
|
|
2020
|
+
function whileStatement(position, buffer, readString) {
|
|
2054
2021
|
const start = buffer[position++];
|
|
2055
2022
|
const end = buffer[position++];
|
|
2056
2023
|
const body = convertNode(buffer[position++], buffer, readString);
|
|
@@ -2059,32 +2026,37 @@ const nodeConverters = [
|
|
|
2059
2026
|
type: 'WhileStatement',
|
|
2060
2027
|
start,
|
|
2061
2028
|
end,
|
|
2062
|
-
|
|
2063
|
-
|
|
2029
|
+
test,
|
|
2030
|
+
body
|
|
2064
2031
|
};
|
|
2065
2032
|
},
|
|
2066
|
-
|
|
2067
|
-
(position, buffer, readString) => {
|
|
2033
|
+
function yieldExpression(position, buffer, readString) {
|
|
2068
2034
|
const start = buffer[position++];
|
|
2069
2035
|
const end = buffer[position++];
|
|
2070
|
-
const
|
|
2036
|
+
const flags = buffer[position++];
|
|
2037
|
+
const delegate = (flags & 1) === 1;
|
|
2071
2038
|
const argumentPosition = buffer[position];
|
|
2039
|
+
const argument = argumentPosition === 0 ? null : convertNode(argumentPosition, buffer, readString);
|
|
2072
2040
|
return {
|
|
2073
2041
|
type: 'YieldExpression',
|
|
2074
2042
|
start,
|
|
2075
2043
|
end,
|
|
2076
|
-
|
|
2077
|
-
|
|
2044
|
+
delegate,
|
|
2045
|
+
argument
|
|
2078
2046
|
};
|
|
2079
|
-
},
|
|
2080
|
-
// index:76; Syntax Error
|
|
2081
|
-
(position, buffer, readString) => {
|
|
2082
|
-
const pos = buffer[position++];
|
|
2083
|
-
const message = convertString(position, buffer, readString);
|
|
2084
|
-
error(logParseError(message, pos));
|
|
2085
2047
|
}
|
|
2086
2048
|
];
|
|
2087
|
-
|
|
2049
|
+
function convertNode(position, buffer, readString) {
|
|
2050
|
+
const nodeType = buffer[position];
|
|
2051
|
+
const converter = nodeConverters[nodeType];
|
|
2052
|
+
/* istanbul ignore if: This should never be executed but is a safeguard against faulty buffers */
|
|
2053
|
+
if (!converter) {
|
|
2054
|
+
console.trace();
|
|
2055
|
+
throw new Error(`Unknown node type: ${nodeType}`);
|
|
2056
|
+
}
|
|
2057
|
+
return converter(position + 1, buffer, readString);
|
|
2058
|
+
}
|
|
2059
|
+
function convertNodeList(position, buffer, readString) {
|
|
2088
2060
|
const length = buffer[position++];
|
|
2089
2061
|
const list = [];
|
|
2090
2062
|
for (let index = 0; index < length; index++) {
|
|
@@ -2092,8 +2064,8 @@ const convertNodeList = (position, buffer, readString) => {
|
|
|
2092
2064
|
list.push(nodePosition ? convertNode(nodePosition, buffer, readString) : null);
|
|
2093
2065
|
}
|
|
2094
2066
|
return list;
|
|
2095
|
-
}
|
|
2096
|
-
const
|
|
2067
|
+
}
|
|
2068
|
+
const convertAnnotations = (position, buffer) => {
|
|
2097
2069
|
const length = buffer[position++];
|
|
2098
2070
|
const list = [];
|
|
2099
2071
|
for (let index = 0; index < length; index++) {
|
|
@@ -2107,22 +2079,11 @@ const convertAnnotation = (position, buffer) => {
|
|
|
2107
2079
|
const type = FIXED_STRINGS[buffer[position]];
|
|
2108
2080
|
return { end, start, type };
|
|
2109
2081
|
};
|
|
2110
|
-
const addAnnotationProperty = (node, annotations, key) => {
|
|
2111
|
-
if (annotations.length > 0) {
|
|
2112
|
-
return {
|
|
2113
|
-
...node,
|
|
2114
|
-
[key]: annotations
|
|
2115
|
-
};
|
|
2116
|
-
}
|
|
2117
|
-
return node;
|
|
2118
|
-
};
|
|
2119
2082
|
const convertString = (position, buffer, readString) => {
|
|
2120
2083
|
const length = buffer[position++];
|
|
2121
2084
|
const bytePosition = position << 2;
|
|
2122
2085
|
return readString(bytePosition, length);
|
|
2123
2086
|
};
|
|
2124
|
-
const ANNOTATION_KEY = '_rollupAnnotations';
|
|
2125
|
-
const INVALID_ANNOTATION_KEY = '_rollupRemoved';
|
|
2126
2087
|
|
|
2127
2088
|
function getReadStringFunction(astBuffer) {
|
|
2128
2089
|
if (typeof Buffer !== 'undefined' && astBuffer instanceof Buffer) {
|
|
@@ -2140,15 +2101,11 @@ function getReadStringFunction(astBuffer) {
|
|
|
2140
2101
|
|
|
2141
2102
|
const parseAst = (input, { allowReturnOutsideFunction = false } = {}) => {
|
|
2142
2103
|
const astBuffer = parse(input, allowReturnOutsideFunction);
|
|
2143
|
-
|
|
2144
|
-
const result = convertProgram(astBuffer.buffer, readString);
|
|
2145
|
-
return result;
|
|
2104
|
+
return convertProgram(astBuffer.buffer, getReadStringFunction(astBuffer));
|
|
2146
2105
|
};
|
|
2147
2106
|
const parseAstAsync = async (input, { allowReturnOutsideFunction = false, signal } = {}) => {
|
|
2148
2107
|
const astBuffer = await parseAsync(input, allowReturnOutsideFunction, signal);
|
|
2149
|
-
|
|
2150
|
-
const result = convertProgram(astBuffer.buffer, readString);
|
|
2151
|
-
return result;
|
|
2108
|
+
return convertProgram(astBuffer.buffer, getReadStringFunction(astBuffer));
|
|
2152
2109
|
};
|
|
2153
2110
|
|
|
2154
2111
|
export { ANNOTATION_KEY, INVALID_ANNOTATION_KEY, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_AMD_ID, URL_OUTPUT_DIR, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, URL_OUTPUT_FORMAT, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_SOURCEMAPFILE, URL_PRESERVEENTRYSIGNATURES, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_WATCH, addTrailingSlashIfMissed, augmentCodeLocation, error, getAliasName, getImportPath, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, logFileReferenceIdNotFoundForFilename, logFirstSideEffect, logIllegalIdentifierAsName, logIllegalImportReassignment, logImplicitDependantCannotBeExternal, logImplicitDependantIsNotIncluded, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logIncompatibleExportOptionValue, logInconsistentImportAttributes, logInputHookInOutputPlugin, logInternalIdCannotBeExternal, logInvalidAddonPluginHook, logInvalidAnnotation, logInvalidExportOptionValue, logInvalidFormatForTopLevelAwait, logInvalidFunctionPluginHook, logInvalidLogPosition, logInvalidOption, logInvalidRollupPhaseForChunkEmission, logInvalidSetAssetSourceCall, logInvalidSourcemapForError, logLevelPriority, logMissingEntryExport, logMissingExport, logMissingFileOrDirOption, logMissingGlobalName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logOptimizeChunkStatus, logPluginError, logRedeclarationError, logShimmedExport, logSourcemapBroken, logSyntheticNamedExportsNeedNamespaceExport, logThisIsUndefined, logUnexpectedNamedImport, logUnexpectedNamespaceReexport, logUnknownOption, logUnresolvedEntry, logUnresolvedImplicitDependant, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logUnusedExternalImports, normalize, parseAst, parseAstAsync, printQuotedStringList, relative, relativeId, warnDeprecation };
|