bundle method
Process the import declaration within several sources, generate a single ASTCompilation for HTCompiler to compile.
Implementation
ASTCompilation bundle(HTSource source,
{Version? version, bool errorHandled = false}) {
final compilation = bundler.bundle(
source: source,
parser: _currentParser,
normalizePath: config.normalizeImportPath,
printPerformanceStatistics: config.printPerformanceStatistics,
version: version,
);
if (compilation.errors.isNotEmpty) {
for (final error in compilation.errors) {
if (errorHandled) {
throw error;
} else {
interpreter.processError(error);
}
}
}
return compilation;
}