mirror of
https://github.com/morluto/rea.git
synced 2026-12-07 02:33:06 +08:00
@@ -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