mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 21:35:57 +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;
|
ParsedValues: array[TParsedCompilerOptString] of string;
|
||||||
ParsedStamp: array[TParsedCompilerOptString] of integer; // see CompilerParseStamp
|
ParsedStamp: array[TParsedCompilerOptString] of integer; // see CompilerParseStamp
|
||||||
Parsing: array[TParsedCompilerOptString] of boolean;
|
Parsing: array[TParsedCompilerOptString] of boolean;
|
||||||
|
ParsedErrorOption: TParsedCompilerOptString;
|
||||||
|
ParsedErrorMsg: string;
|
||||||
|
ParsedErrorStamp: integer; // see CompilerParseStamp
|
||||||
// parsed except for platform macros
|
// parsed except for platform macros
|
||||||
ParsedPIValues: array[TParsedCompilerOptString] of string;
|
ParsedPIValues: array[TParsedCompilerOptString] of string;
|
||||||
ParsedPIStamp: array[TParsedCompilerOptString] of integer; // see CompilerParseStamp
|
ParsedPIStamp: array[TParsedCompilerOptString] of integer; // see CompilerParseStamp
|
||||||
@ -284,6 +287,8 @@ type
|
|||||||
MacroValuesParsing: boolean;
|
MacroValuesParsing: boolean;
|
||||||
constructor Create(TheOwner: TObject);
|
constructor Create(TheOwner: TObject);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
function HasParsedError: boolean;
|
||||||
|
procedure ParsedError(Option: TParsedCompilerOptString; Msg: string);
|
||||||
function GetUnparsedWithConditionals(Option: TParsedCompilerOptString): string;
|
function GetUnparsedWithConditionals(Option: TParsedCompilerOptString): string;
|
||||||
function GetParsedValue(Option: TParsedCompilerOptString;
|
function GetParsedValue(Option: TParsedCompilerOptString;
|
||||||
WithOverrides: boolean = true): string;
|
WithOverrides: boolean = true): string;
|
||||||
@ -3418,6 +3423,21 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
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(
|
function TParsedCompilerOptions.GetUnparsedWithConditionals(
|
||||||
Option: TParsedCompilerOptString): string;
|
Option: TParsedCompilerOptString): string;
|
||||||
var
|
var
|
||||||
@ -3469,7 +3489,7 @@ begin
|
|||||||
if ParsedStamp[Option]<>CompilerParseStamp then begin
|
if ParsedStamp[Option]<>CompilerParseStamp then begin
|
||||||
if Parsing[Option] then begin
|
if Parsing[Option] then begin
|
||||||
DebugLn('TParsedCompilerOptions.GetParsedValue Circle in Options: ',ParsedCompilerOptStringNames[Option],' Unparsed="',UnparsedValues[Option],'"');
|
DebugLn('TParsedCompilerOptions.GetParsedValue Circle in Options: ',ParsedCompilerOptStringNames[Option],' Unparsed="',UnparsedValues[Option],'"');
|
||||||
RaiseException('');
|
ParsedError(Option,'Circle in macros');
|
||||||
exit('');
|
exit('');
|
||||||
end;
|
end;
|
||||||
Parsing[Option]:=true;
|
Parsing[Option]:=true;
|
||||||
@ -3614,6 +3634,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
InheritedMacroValuesStamp:=InvalidParseStamp;
|
InheritedMacroValuesStamp:=InvalidParseStamp;
|
||||||
MacroValuesStamp:=InvalidParseStamp;
|
MacroValuesStamp:=InvalidParseStamp;
|
||||||
|
ParsedErrorStamp:=InvalidParseStamp;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TParsedCompilerOptions.InvalidateFiles;
|
procedure TParsedCompilerOptions.InvalidateFiles;
|
||||||
|
Loading…
Reference in New Issue
Block a user