codetools: clean up

git-svn-id: trunk@22107 -
This commit is contained in:
mattias 2009-10-12 11:35:01 +00:00
parent bc4d902447
commit 10467a9126
3 changed files with 3 additions and 15 deletions

View File

@ -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

View File

@ -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');

View File

@ -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;