pastojs: compile with pas2js

This commit is contained in:
mattias 2022-02-12 22:34:11 +01:00
parent b2251e3469
commit 0fb08a7619

View File

@ -25,7 +25,7 @@ unit FPPJsSrcMap;
interface interface
uses uses
SysUtils, Classes, math, SysUtils, math,
jswriter, jstree, JSSrcMap, fpjson, Pas2JSUtils; jswriter, jstree, JSSrcMap, fpjson, Pas2JSUtils;
type type
@ -230,7 +230,9 @@ procedure TPas2JSMapper.SaveJSToStream(WithUTF8BOM: boolean;
const MapFilename: string; s: TFPJSStream); const MapFilename: string; s: TFPJSStream);
var var
MapSrc: string; MapSrc: string;
{$ifndef pas2js} {$ifdef pas2js}
i: integer;
{$ELSE}
bom: string; bom: string;
{$endif} {$endif}
begin begin
@ -240,7 +242,7 @@ begin
MapSrc:=''; MapSrc:='';
{$ifdef pas2js} {$ifdef pas2js}
if WithUTF8BOM then ; if WithUTF8BOM then ;
for i:=0 to FBufPos-1 do for i:=0 to BufferLength-1 do
s.push(Buffer[i]); s.push(Buffer[i]);
if MapSrc<>'' then if MapSrc<>'' then
s.push(MapSrc); s.push(MapSrc);