mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 10:43:30 +00:00
1 parent
553262443a
commit
ba7c3dafab
8 files changed
+151
-23
No files matched your search
@@ -5,7 +5,7 @@ import {
|
||||
} from "./SourceMapFormat.js";
|
||||
|
||||
/** Determine whether a leaf-local mapping falls before its enclosing boundary. */
|
||||
export const isBeforeSourceMapLeafStop = (
|
||||
const isBeforeSourceMapLeafStop = (
|
||||
leaf: SourceMapLeaf,
|
||||
line: number,
|
||||
column: number,
|
||||
@@ -40,6 +40,11 @@ export const decodeValidatedSourceMapLeaves = (
|
||||
const generatedLine = leaf.offset.line + line;
|
||||
const generatedColumn =
|
||||
segment[0] + (line === 0 ? leaf.offset.column : 0);
|
||||
if (!isBeforeSourceMapLeafStop(leaf, line, segment[0]))
|
||||
throw new SourceMapFormatFailure(
|
||||
"section-overlap",
|
||||
"Embedded source-map mappings overlap the following section boundary.",
|
||||
);
|
||||
if (
|
||||
!Number.isSafeInteger(generatedLine) ||
|
||||
!Number.isSafeInteger(generatedColumn) ||
|
||||
|
||||
Reference in new issue
Block a user