Skip to content

Commit

Permalink
Tweak codetools_includes
Browse files Browse the repository at this point in the history
  • Loading branch information
ollydev committed Dec 30, 2023
1 parent d0a3916 commit 852bf4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/codetools/simba.ide_codetools_includes.pas
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ procedure TCodetoolsInclude.OnIncludeDirect(Sender: TmwBasePasLex);
FilePath := SimbaEnv.FindInclude(Sender.DirectiveParamAsFileName, [TSimbaPath.PathExtractDir(Sender.FileName)]);
if (FilePath = '') then
Exit;
if (Lexer.TokenID = tokIncludeOnceDirect) and (FIncludedFiles <> nil) and (FIncludedFiles.IndexOf(FileName) > -1) then
if (FIncludedFiles <> nil) and (FIncludedFiles.IndexOf(FileName) > -1) then
Exit;

PushLexer(TmwPasLex.CreateFromFile(FilePath));
Expand Down Expand Up @@ -327,7 +327,7 @@ function TCodetoolsIncludes.GetInclude(Lexer: TmwBasePasLex; IncludedFiles: TStr
Result := nil;

FileName := SimbaEnv.FindInclude(Lexer.DirectiveParamAsFileName, [TSimbaPath.PathExtractDir(Lexer.FileName)]);
if (FileName = '') or ((Lexer.TokenID = tokIncludeOnceDirect) and (IncludedFiles.IndexOf(FileName) > -1)) then
if (FileName = '') or (IncludedFiles.IndexOf(FileName) > -1) then
Exit;

Result := GetInclude(Lexer.SaveDefines(), IncludedFiles, FileName);
Expand Down

0 comments on commit 852bf4e

Please sign in to comment.