mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 17:58:18 +02:00
codetools: clean up
git-svn-id: trunk@22107 -
This commit is contained in:
parent
bc4d902447
commit
10467a9126
@ -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
|
||||
|
@ -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');
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user