mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 12:59:14 +02:00
codetools: CheckAndImproveExpr_Brackets: fixed setting Changed
git-svn-id: trunk@48648 -
This commit is contained in:
parent
6b40ae4e5d
commit
3bf0f2e328
@ -734,6 +734,7 @@ begin
|
|||||||
if AtomIs(')') then begin
|
if AtomIs(')') then begin
|
||||||
ToPos:=SrcPos;
|
ToPos:=SrcPos;
|
||||||
DebugLn(['TCompilerDirectivesTree.CheckAndImproveExpr_Brackets removing unneeded brackets']);
|
DebugLn(['TCompilerDirectivesTree.CheckAndImproveExpr_Brackets removing unneeded brackets']);
|
||||||
|
Changed:=true;
|
||||||
Replace(FromPos,ToPos,GetIdentifier(@Src[NameStart]));
|
Replace(FromPos,ToPos,GetIdentifier(@Src[NameStart]));
|
||||||
MoveCursorToPos(FromPos);
|
MoveCursorToPos(FromPos);
|
||||||
end;
|
end;
|
||||||
@ -1830,7 +1831,7 @@ procedure TCompilerDirectivesTree.ReduceCompilerDirectives(
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure CheckMacroInExpression(Node: TCodeTreeNode; NameStart: integer;
|
procedure CheckMacroInExpression(Node: TCodeTreeNode; NameStart: integer;
|
||||||
Complex: boolean; var Changed: boolean);
|
Complex: boolean; var {%H-}Changed: boolean);
|
||||||
var
|
var
|
||||||
MacroNode: TCompilerMacroStats;
|
MacroNode: TCompilerMacroStats;
|
||||||
begin
|
begin
|
||||||
@ -2313,7 +2314,10 @@ var
|
|||||||
begin
|
begin
|
||||||
if Code=nil then
|
if Code=nil then
|
||||||
exit('P='+IntToStr(p));
|
exit('P='+IntToStr(p));
|
||||||
Result:=Code.Filename;
|
if WithFilename then
|
||||||
|
Result:=Code.Filename
|
||||||
|
else
|
||||||
|
Result:='';
|
||||||
Code.AbsoluteToLineCol(p,Line,Column);
|
Code.AbsoluteToLineCol(p,Line,Column);
|
||||||
Result+='('+IntToStr(Line)+','+IntToStr(Column)+')';
|
Result+='('+IntToStr(Line)+','+IntToStr(Column)+')';
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user