mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-10 22:07:33 +01:00
codetools: searching macpas unit in macpas mode
git-svn-id: trunk@9761 -
This commit is contained in:
parent
ba9be92970
commit
bb6be8d3c7
@ -4619,17 +4619,19 @@ end;
|
||||
|
||||
function TFindDeclarationTool.FindIdentifierInHiddenUsedUnits(
|
||||
Params: TFindDeclarationParams): boolean;
|
||||
const
|
||||
sutSystem = 1;
|
||||
sutObjPas = 2;
|
||||
sutLineInfo = 3;
|
||||
sutHeapTrc = 4;
|
||||
sutSysThrds = 5;
|
||||
sutNone = 6;
|
||||
type
|
||||
SystemUnitType = (
|
||||
sutSystem,
|
||||
sutObjPas,
|
||||
sutMacPas,
|
||||
sutLineInfo,
|
||||
sutHeapTrc,
|
||||
sutSysThrds,
|
||||
sutNone);
|
||||
var
|
||||
OldInput: TFindDeclarationInput;
|
||||
SystemAlias: string;
|
||||
CurUnitType: integer;
|
||||
CurUnitType: SystemUnitType;
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF ShowTriedContexts}
|
||||
@ -4660,6 +4662,8 @@ begin
|
||||
CurUnitType:=sutSystem
|
||||
else if UpAtomIs('OBJPAS') then
|
||||
CurUnitType:=sutObjPas
|
||||
else if UpAtomIs('MACPAS') then
|
||||
CurUnitType:=sutMacPas
|
||||
else if UpAtomIs('LINEINFO') then
|
||||
CurUnitType:=sutLineInfo
|
||||
else if UpAtomIs('HEAPTRC') then
|
||||
@ -4697,6 +4701,13 @@ begin
|
||||
Result:=FindIdentifierInUsedUnit('ObjPas',Params);
|
||||
if Result then exit;
|
||||
end;
|
||||
if (CurUnitType>sutMacPas)
|
||||
and (Scanner.CompilerMode=cmMacPas)
|
||||
and (Scanner.PascalCompiler=pcFPC) then begin
|
||||
// try hidden used fpc unit 'macpas'
|
||||
Result:=FindIdentifierInUsedUnit('MacPas',Params);
|
||||
if Result then exit;
|
||||
end;
|
||||
if (CurUnitType>sutSystem) then begin
|
||||
// try hidden used unit 'system'
|
||||
if not CompareSrcIdentifiers(Params.Identifier,'system')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user