mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 04:20:29 +01:00
codetools: complete block: begin begin begin end end
git-svn-id: trunk@20457 -
This commit is contained in:
parent
6bf2f76a84
commit
8209691967
@ -381,8 +381,9 @@ var
|
||||
if (Stack.Top>=0) then begin
|
||||
ParentBlock:=@Stack.Stack[Stack.Top];
|
||||
if (ParentBlock^.InnerStartPos=AtomStart)
|
||||
and (Policies<>nil) then
|
||||
and (Policies<>nil) then begin
|
||||
Policies.AddIndent(ParentBlock^.Typ,Typ,ParentBlock^.InnerIdent);
|
||||
end;
|
||||
end;
|
||||
Stack.BeginBlock(Typ,AtomStart);
|
||||
{$IFDEF ShowCodeBeautifierParser}
|
||||
|
||||
@ -5316,6 +5316,7 @@ var
|
||||
NeedCompletion:=false;
|
||||
repeat
|
||||
ReadNextAtom;
|
||||
if CurPos.StartPos>=StartNode.EndPos then break;
|
||||
|
||||
//DebugLn(['ReadStatements Atom=',GetAtom,' TopTyp=',ord(TopBlockType(Stack)),' Top=',Stack.Top]);
|
||||
if (Stack.Top>=0) and (Stack.Stack[Stack.Top].InnerIndent<0)
|
||||
@ -5713,8 +5714,8 @@ begin
|
||||
//DebugLn(['TStandardCodeTool.CompleteBlock ',StartNode.DescAsString]);
|
||||
|
||||
if StartNode.Desc in AllPascalStatements then begin
|
||||
if (StartNode.Parent<>nil)
|
||||
and (StartNode.Parent.Desc in AllPascalStatements) then
|
||||
while (StartNode.Parent<>nil)
|
||||
and (StartNode.Parent.Desc in AllPascalStatements) do
|
||||
StartNode:=StartNode.Parent;
|
||||
if not CompleteStatements(Stack) then exit;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user