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