diff --git a/components/codetools/codetoolmanager.pas b/components/codetools/codetoolmanager.pas index ea4d271ab2..037f717217 100644 --- a/components/codetools/codetoolmanager.pas +++ b/components/codetools/codetoolmanager.pas @@ -1343,7 +1343,6 @@ end; function TCodeToolManager.GetNestedCommentsFlagForFile( const Filename: string): boolean; var - Evaluator: TExpressionEvaluator; Directory: String; begin Result:=false; @@ -1351,13 +1350,7 @@ begin // check pascal compiler is FPC and mode is FPC or OBJFPC if GetPascalCompilerForDirectory(Directory)<>pcFPC then exit; if not (GetCompilerModeForDirectory(Directory) in [cmFPC,cmOBJFPC]) then exit; - // check Nested Compiler define is on - Evaluator:=DefineTree.GetDefinesForDirectory(Directory,true); - if Evaluator=nil then exit; - if ((Evaluator.IsDefined(NestedCompilerDefine)) - or (CompareFileExt(Filename,'pp',false)=0)) - then - Result:=true; + Result:=true; end; function TCodeToolManager.GetPascalCompilerForDirectory(const Directory: string diff --git a/components/codetools/linkscanner.pas b/components/codetools/linkscanner.pas index b2fb40caaa..5999ee99cc 100644 --- a/components/codetools/linkscanner.pas +++ b/components/codetools/linkscanner.pas @@ -54,7 +54,6 @@ uses const PascalCompilerDefine = ExternalMacroStart+'Compiler'; - NestedCompilerDefine = ExternalMacroStart+'NestedComments'; MissingIncludeFileCode = Pointer(1); @@ -1187,11 +1186,9 @@ begin // nested comments FNestedComments:=false; - if ((PascalCompiler=pcFPC) and (CompilerMode in [cmFPC,cmOBJFPC])) - or FInitValues.IsDefined(NestedCompilerDefine) - then + if ((PascalCompiler=pcFPC) and (CompilerMode in [cmFPC,cmOBJFPC])) then FNestedComments:=true; - //DebugLn(['TLinkScanner.Scan ',MainFilename,' ',PascalCompilerNames[PascalCompiler],' ',CompilerModeNames[CompilerMode],' ',FInitValues.IsDefined(NestedCompilerDefine),' FNestedComments=',FNestedComments]); + //DebugLn(['TLinkScanner.Scan ',MainFilename,' ',PascalCompilerNames[PascalCompiler],' ',CompilerModeNames[CompilerMode],' FNestedComments=',FNestedComments]); //DebugLn(Values.AsString); FMacrosOn:=(Values.Variables['MACROS']<>'0'); diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index 2bd3856c27..78de43d379 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -1010,8 +1010,6 @@ end; function TPascalParserTool.KeyWordFuncClassSection: boolean; // change section in a class (public, private, protected, published) -var - p: PChar; begin // end last section CurNode.EndPos:=CurPos.StartPos;