mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-06 10:37:49 +02:00
* Merge * Support for $I %unit% %module% %filename% includes
This commit is contained in:
parent
6b2fb0f806
commit
992481dffe
@ -3060,6 +3060,7 @@ begin
|
||||
FCurModule:=Module;
|
||||
HasFinished:=true;
|
||||
try
|
||||
Scanner.CurModuleName:=AUnitName;
|
||||
if Assigned(Engine.Package) then
|
||||
begin
|
||||
Module.PackageName := Engine.Package.Name;
|
||||
@ -3231,6 +3232,7 @@ begin
|
||||
HasFinished:=true;
|
||||
FCurModule:=Module;
|
||||
try
|
||||
Scanner.CurModuleName:=N;
|
||||
if Assigned(Engine.Package) then
|
||||
begin
|
||||
Module.PackageName := Engine.Package.Name;
|
||||
@ -3307,6 +3309,7 @@ begin
|
||||
HasFinished:=true;
|
||||
FCurModule:=Module;
|
||||
try
|
||||
Scanner.CurModuleName:=N;
|
||||
if Assigned(Engine.Package) then
|
||||
begin
|
||||
Module.PackageName := Engine.Package.Name;
|
||||
|
@ -703,6 +703,7 @@ type
|
||||
FAllowedModeSwitches: TModeSwitches;
|
||||
FAllowedValueSwitches: TValueSwitches;
|
||||
FConditionEval: TCondDirectiveEvaluator;
|
||||
FCurModulename: string;
|
||||
FCurrentBoolSwitches: TBoolSwitches;
|
||||
FCurrentModeSwitches: TModeSwitches;
|
||||
FCurrentValueSwitches: TValueSwitchArray;
|
||||
@ -864,6 +865,7 @@ type
|
||||
property Files: TStrings read FFiles;
|
||||
property CurSourceFile: TLineReader read FCurSourceFile;
|
||||
property CurFilename: string read FCurFilename;
|
||||
property CurModuleName: string read FCurModulename Write FCurModuleName;
|
||||
property CurLine: string read FCurLine;
|
||||
property CurRow: Integer read FCurRow;
|
||||
property CurColumn: Integer read GetCurColumn;
|
||||
|
@ -2877,6 +2877,17 @@ begin
|
||||
SetStr(CurFilename);
|
||||
exit;
|
||||
end;
|
||||
'%filename%':
|
||||
begin
|
||||
SetStr(ExtractFileName(CurFilename));
|
||||
exit;
|
||||
end;
|
||||
'%unit%',
|
||||
'%module%':
|
||||
begin
|
||||
SetStr(CurModuleName);
|
||||
exit;
|
||||
end;
|
||||
'%line%':
|
||||
begin
|
||||
SetStr(IntToStr(CurRow));
|
||||
|
Loading…
Reference in New Issue
Block a user