mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 20:19:23 +02:00
codetools: search unit objc in modeswitch objc
git-svn-id: trunk@22764 -
This commit is contained in:
parent
8251b7bb32
commit
6ba3e8f884
@ -1859,6 +1859,8 @@ begin
|
||||
or ((Scanner.CompilerMode=cmMacPas)
|
||||
and (Scanner.PascalCompiler=pcFPC)
|
||||
and (CompareIdentifiers(PChar(Result),'MacPas')=0))
|
||||
or ((Scanner.CompilerModeSwitch=cmsObjectiveC1)
|
||||
and (CompareIdentifiers(PChar(Result),'ObjC')=0))
|
||||
then begin
|
||||
Result:='';
|
||||
exit;
|
||||
@ -5751,8 +5753,9 @@ function TFindDeclarationTool.FindIdentifierInHiddenUsedUnits(
|
||||
type
|
||||
SystemUnitType = (
|
||||
sutSystem,
|
||||
sutObjPas,
|
||||
sutMacPas,
|
||||
sutObjPas,
|
||||
sutObjC,
|
||||
sutLineInfo,
|
||||
sutHeapTrc,
|
||||
sutSysThrds,
|
||||
@ -5789,10 +5792,12 @@ begin
|
||||
end;
|
||||
if UpAtomIs(SystemAlias) or UpAtomIs('SYSTEM') then
|
||||
CurUnitType:=sutSystem
|
||||
else if UpAtomIs('OBJPAS') then
|
||||
CurUnitType:=sutObjPas
|
||||
else if UpAtomIs('MACPAS') then
|
||||
CurUnitType:=sutMacPas
|
||||
else if UpAtomIs('OBJPAS') then
|
||||
CurUnitType:=sutObjPas
|
||||
else if UpAtomIs('OBJC') then
|
||||
CurUnitType:=sutObjC
|
||||
else if UpAtomIs('LINEINFO') then
|
||||
CurUnitType:=sutLineInfo
|
||||
else if UpAtomIs('HEAPTRC') then
|
||||
@ -5830,6 +5835,12 @@ begin
|
||||
Result:=FindIdentifierInUsedUnit('ObjPas',Params);
|
||||
if Result and Params.IsFinal then exit;
|
||||
end;
|
||||
if (CurUnitType>sutObjC)
|
||||
and (Scanner.CompilerModeSwitch=cmsObjectiveC1) then begin
|
||||
// try hidden used fpc unit 'objc'
|
||||
Result:=FindIdentifierInUsedUnit('ObjC',Params);
|
||||
if Result and Params.IsFinal then exit;
|
||||
end;
|
||||
if (CurUnitType>sutMacPas)
|
||||
and (Scanner.CompilerMode=cmMacPas)
|
||||
and (Scanner.PascalCompiler=pcFPC) then begin
|
||||
|
Loading…
Reference in New Issue
Block a user