mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 13:56:00 +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(
|
function TCodeToolManager.GetNestedCommentsFlagForFile(
|
||||||
const Filename: string): boolean;
|
const Filename: string): boolean;
|
||||||
var
|
var
|
||||||
Evaluator: TExpressionEvaluator;
|
|
||||||
Directory: String;
|
Directory: String;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
@ -1351,13 +1350,7 @@ begin
|
|||||||
// check pascal compiler is FPC and mode is FPC or OBJFPC
|
// check pascal compiler is FPC and mode is FPC or OBJFPC
|
||||||
if GetPascalCompilerForDirectory(Directory)<>pcFPC then exit;
|
if GetPascalCompilerForDirectory(Directory)<>pcFPC then exit;
|
||||||
if not (GetCompilerModeForDirectory(Directory) in [cmFPC,cmOBJFPC]) then exit;
|
if not (GetCompilerModeForDirectory(Directory) in [cmFPC,cmOBJFPC]) then exit;
|
||||||
// check Nested Compiler define is on
|
Result:=true;
|
||||||
Evaluator:=DefineTree.GetDefinesForDirectory(Directory,true);
|
|
||||||
if Evaluator=nil then exit;
|
|
||||||
if ((Evaluator.IsDefined(NestedCompilerDefine))
|
|
||||||
or (CompareFileExt(Filename,'pp',false)=0))
|
|
||||||
then
|
|
||||||
Result:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCodeToolManager.GetPascalCompilerForDirectory(const Directory: string
|
function TCodeToolManager.GetPascalCompilerForDirectory(const Directory: string
|
||||||
|
@ -54,7 +54,6 @@ uses
|
|||||||
|
|
||||||
const
|
const
|
||||||
PascalCompilerDefine = ExternalMacroStart+'Compiler';
|
PascalCompilerDefine = ExternalMacroStart+'Compiler';
|
||||||
NestedCompilerDefine = ExternalMacroStart+'NestedComments';
|
|
||||||
|
|
||||||
MissingIncludeFileCode = Pointer(1);
|
MissingIncludeFileCode = Pointer(1);
|
||||||
|
|
||||||
@ -1187,11 +1186,9 @@ begin
|
|||||||
|
|
||||||
// nested comments
|
// nested comments
|
||||||
FNestedComments:=false;
|
FNestedComments:=false;
|
||||||
if ((PascalCompiler=pcFPC) and (CompilerMode in [cmFPC,cmOBJFPC]))
|
if ((PascalCompiler=pcFPC) and (CompilerMode in [cmFPC,cmOBJFPC])) then
|
||||||
or FInitValues.IsDefined(NestedCompilerDefine)
|
|
||||||
then
|
|
||||||
FNestedComments:=true;
|
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);
|
//DebugLn(Values.AsString);
|
||||||
FMacrosOn:=(Values.Variables['MACROS']<>'0');
|
FMacrosOn:=(Values.Variables['MACROS']<>'0');
|
||||||
|
@ -1010,8 +1010,6 @@ end;
|
|||||||
|
|
||||||
function TPascalParserTool.KeyWordFuncClassSection: boolean;
|
function TPascalParserTool.KeyWordFuncClassSection: boolean;
|
||||||
// change section in a class (public, private, protected, published)
|
// change section in a class (public, private, protected, published)
|
||||||
var
|
|
||||||
p: PChar;
|
|
||||||
begin
|
begin
|
||||||
// end last section
|
// end last section
|
||||||
CurNode.EndPos:=CurPos.StartPos;
|
CurNode.EndPos:=CurPos.StartPos;
|
||||||
|
Loading…
Reference in New Issue
Block a user