2020-07-19 13:49:44 -04:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
|
|
|
|
|
|
|
((window) => {
|
2020-09-16 16:22:43 -04:00
|
|
|
const core = window.Deno.core;
|
2020-07-19 13:49:44 -04:00
|
|
|
|
2020-09-12 05:53:57 -04:00
|
|
|
function opFormatDiagnostics(diagnostics) {
|
2020-09-16 16:22:43 -04:00
|
|
|
return core.jsonOpSync("op_format_diagnostic", diagnostics);
|
2020-07-19 13:49:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
function opApplySourceMap(location) {
|
2020-09-16 16:22:43 -04:00
|
|
|
const res = core.jsonOpSync("op_apply_source_map", location);
|
2020-07-19 13:49:44 -04:00
|
|
|
return {
|
|
|
|
fileName: res.fileName,
|
|
|
|
lineNumber: res.lineNumber,
|
|
|
|
columnNumber: res.columnNumber,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
window.__bootstrap.errorStack = {
|
|
|
|
opApplySourceMap,
|
|
|
|
opFormatDiagnostics,
|
|
|
|
};
|
|
|
|
})(this);
|