mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 10:49:27 +02:00
IDE: macro loop marker
git-svn-id: trunk@44091 -
This commit is contained in:
parent
c0c6cfb914
commit
ee2a512b9b
@ -1919,7 +1919,8 @@ var
|
||||
OutFilename: String;
|
||||
begin
|
||||
Result:=TargetFilename;
|
||||
IDEMacros.SubstituteMacros(Result);
|
||||
if not IDEMacros.SubstituteMacros(Result) then
|
||||
exit;
|
||||
if (Result<>'') and FilenameIsAbsolute(Result) then begin
|
||||
// fully specified target filename
|
||||
end else if Result<>'' then begin
|
||||
|
@ -311,33 +311,34 @@ begin
|
||||
inc(InUse);
|
||||
if InUse>MaxUsePerMacro then begin
|
||||
// cycle detected
|
||||
MacroStr:='<CYCLE:'+MacroName+'>';
|
||||
Result:=false;
|
||||
exit;
|
||||
Handled:=true;
|
||||
MacroStr:='<MACRO-CYCLE:'+MacroName+'>';
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if fBusy=nil then fBusy:=TStringList.Create;
|
||||
try
|
||||
fBusy.Add(MacroName);
|
||||
if MacroParam<>'' then begin
|
||||
// substitute param
|
||||
if not SubstituteStr(MacroParam,Data,Depth+1) then begin
|
||||
if not Handled then begin
|
||||
if fBusy=nil then fBusy:=TStringList.Create;
|
||||
try
|
||||
fBusy.Add(MacroName);
|
||||
if MacroParam<>'' then begin
|
||||
// substitute param
|
||||
if not SubstituteStr(MacroParam,Data,Depth+1) then begin
|
||||
Result:=false;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
// find macro and get value
|
||||
ExecuteMacro(MacroName,MacroParam,Data,Handled,Abort,Depth+1);
|
||||
if Abort then begin
|
||||
Result:=false;
|
||||
exit;
|
||||
end;
|
||||
finally
|
||||
fBusy.Delete(fBusy.Count-1);
|
||||
end;
|
||||
// find macro and get value
|
||||
ExecuteMacro(MacroName,MacroParam,Data,Handled,Abort,Depth+1);
|
||||
if Abort then begin
|
||||
Result:=false;
|
||||
exit;
|
||||
end;
|
||||
finally
|
||||
fBusy.Delete(fBusy.Count-1);
|
||||
MacroStr:=MacroParam;
|
||||
end;
|
||||
MacroStr:=MacroParam;
|
||||
// mark unhandled macros
|
||||
if not Handled and MarkUnhandledMacros then begin
|
||||
MacroStr:=Format(lisTMunknownMacro, [MacroStr]);
|
||||
|
Loading…
Reference in New Issue
Block a user