mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 04:19:47 +02:00
codetools: fixed result of ExploreUnitDirectives
git-svn-id: trunk@41678 -
This commit is contained in:
parent
c1b253f642
commit
2334f84a57
@ -1859,6 +1859,7 @@ end;
|
||||
function TCodeToolManager.ExploreUnitDirectives(Code: TCodeBuffer; out
|
||||
aScanner: TLinkScanner): boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.ExploreUnitDirectives A ',dbgs(FCurCodeTool.Scanner<>nil));
|
||||
@ -1868,6 +1869,7 @@ begin
|
||||
if not aScanner.StoreDirectives then
|
||||
aScanner.DemandStoreDirectives;
|
||||
aScanner.Scan(lsrEnd,true);
|
||||
Result:=true;
|
||||
except
|
||||
on e: Exception do Result:=HandleException(e);
|
||||
end;
|
||||
|
@ -32,6 +32,16 @@ uses
|
||||
const RangeCheckDisabledConst1 = Byte(300);
|
||||
{$EndIf}
|
||||
|
||||
{$IF defined(de)}
|
||||
const t1 = 1;
|
||||
{$ELSEIF defined(ru)}
|
||||
const t2 = 2;
|
||||
{$ELSEIF defined(fr)}
|
||||
const t3 = 3;
|
||||
{$ELSE}
|
||||
const t4 = 4;
|
||||
{$IFEND}
|
||||
|
||||
const RangeCheckDisabledConst2 = Word(-1);
|
||||
|
||||
{$IfDef RangeCheck}
|
||||
|
@ -46,7 +46,7 @@ begin
|
||||
writeln(' ',ParamStr(0));
|
||||
writeln(' ',ParamStr(0),' <filename>');
|
||||
end;
|
||||
Filename:=ExpandFileName('scanexamples'+PathDelim+'directives1.pas');
|
||||
Filename:=ExpandFileName(SetDirSeparators('scanexamples/directives1.pas'));
|
||||
|
||||
// load the file
|
||||
Code:=CodeToolBoss.LoadFile(Filename,true,false);
|
||||
|
Loading…
Reference in New Issue
Block a user