mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 07:37:02 +02:00
IDE: on circle in macros of compiler options paths: do not raise exception, but store them, bug #18461
git-svn-id: trunk@29194 -
This commit is contained in:
parent
e9e589d484
commit
01c9842d3e
@ -271,6 +271,9 @@ type
|
||||
ParsedValues: array[TParsedCompilerOptString] of string;
|
||||
ParsedStamp: array[TParsedCompilerOptString] of integer; // see CompilerParseStamp
|
||||
Parsing: array[TParsedCompilerOptString] of boolean;
|
||||
ParsedErrorOption: TParsedCompilerOptString;
|
||||
ParsedErrorMsg: string;
|
||||
ParsedErrorStamp: integer; // see CompilerParseStamp
|
||||
// parsed except for platform macros
|
||||
ParsedPIValues: array[TParsedCompilerOptString] of string;
|
||||
ParsedPIStamp: array[TParsedCompilerOptString] of integer; // see CompilerParseStamp
|
||||
@ -284,6 +287,8 @@ type
|
||||
MacroValuesParsing: boolean;
|
||||
constructor Create(TheOwner: TObject);
|
||||
destructor Destroy; override;
|
||||
function HasParsedError: boolean;
|
||||
procedure ParsedError(Option: TParsedCompilerOptString; Msg: string);
|
||||
function GetUnparsedWithConditionals(Option: TParsedCompilerOptString): string;
|
||||
function GetParsedValue(Option: TParsedCompilerOptString;
|
||||
WithOverrides: boolean = true): string;
|
||||
@ -3418,6 +3423,21 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TParsedCompilerOptions.HasParsedError: boolean;
|
||||
begin
|
||||
Result:=(ParsedErrorStamp<>InvalidParseStamp)
|
||||
and (ParsedErrorStamp=CompilerParseStamp);
|
||||
end;
|
||||
|
||||
procedure TParsedCompilerOptions.ParsedError(Option: TParsedCompilerOptString;
|
||||
Msg: string);
|
||||
begin
|
||||
if HasParsedError then exit;
|
||||
ParsedErrorMsg:=Msg;
|
||||
ParsedErrorOption:=Option;
|
||||
ParsedErrorStamp:=CompilerParseStamp;
|
||||
end;
|
||||
|
||||
function TParsedCompilerOptions.GetUnparsedWithConditionals(
|
||||
Option: TParsedCompilerOptString): string;
|
||||
var
|
||||
@ -3469,7 +3489,7 @@ begin
|
||||
if ParsedStamp[Option]<>CompilerParseStamp then begin
|
||||
if Parsing[Option] then begin
|
||||
DebugLn('TParsedCompilerOptions.GetParsedValue Circle in Options: ',ParsedCompilerOptStringNames[Option],' Unparsed="',UnparsedValues[Option],'"');
|
||||
RaiseException('');
|
||||
ParsedError(Option,'Circle in macros');
|
||||
exit('');
|
||||
end;
|
||||
Parsing[Option]:=true;
|
||||
@ -3614,6 +3634,7 @@ begin
|
||||
end;
|
||||
InheritedMacroValuesStamp:=InvalidParseStamp;
|
||||
MacroValuesStamp:=InvalidParseStamp;
|
||||
ParsedErrorStamp:=InvalidParseStamp;
|
||||
end;
|
||||
|
||||
procedure TParsedCompilerOptions.InvalidateFiles;
|
||||
|
Loading…
Reference in New Issue
Block a user