mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-26 13:31:27 +01:00
fcl-js: srcmap: added option smoAllowSrcLine0
git-svn-id: trunk@39769 -
This commit is contained in:
parent
202146bf48
commit
6b30c5f7c7
@ -54,7 +54,8 @@ type
|
|||||||
TSourceMapOption = (
|
TSourceMapOption = (
|
||||||
smoAddMonotonous, // true = AddMapping GeneratedLine/Col must be behind last add, false = check all adds for duplicate
|
smoAddMonotonous, // true = AddMapping GeneratedLine/Col must be behind last add, false = check all adds for duplicate
|
||||||
smoAutoLineStart, // automatically add a first column mapping, repeating last mapping
|
smoAutoLineStart, // automatically add a first column mapping, repeating last mapping
|
||||||
smoSafetyHeader // insert ')]}' at start
|
smoSafetyHeader, // insert ')]}' at start
|
||||||
|
smoAllowSrcLine0 // don't bark on SrcLine=0
|
||||||
);
|
);
|
||||||
TSourceMapOptions = set of TSourceMapOption;
|
TSourceMapOptions = set of TSourceMapOption;
|
||||||
const
|
const
|
||||||
@ -548,7 +549,10 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if SrcLine<1 then
|
if SrcLine<1 then
|
||||||
RaiseInvalid('invalid SrcLine');
|
begin
|
||||||
|
if (SrcLine<0) or not (smoAllowSrcLine0 in Options) then
|
||||||
|
RaiseInvalid('invalid SrcLine');
|
||||||
|
end;
|
||||||
if SrcCol<0 then
|
if SrcCol<0 then
|
||||||
RaiseInvalid('invalid SrcCol');
|
RaiseInvalid('invalid SrcCol');
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user