PageRenderTime 24ms CodeModel.GetById 14ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 1ms

/components/codetools/examples/testscompleteblock/procedurebeginifbegin1.inc

http://github.com/graemeg/lazarus
Pascal | 22 lines | 16 code | 3 blank | 3 comment | 2 complexity | e11e5008c6e199c2491d9032d92cafe0 MD5 | raw file
 1{%MainUnit unit1.pas}
 2procedure Do1;
 3  procedure BeginBlock(Typ: TFABBlockType);
 4  var
 5    ParentBlock: PBlock;
 6  begin
 7    if (Stack.Top>=0) then begin
 8      ParentBlock:=@Stack.Stack[Stack.Top];
 9      if (ParentBlock^.InnerStartPos=AtomStart)
10      and (Policies<>nil) then begin
11        Policies.AddIndent(ParentBlock^.Typ,Typ,ParentBlock^.InnerIdent);
12
13    end;
14    Stack.BeginBlock(Typ,AtomStart);
15    {$IFDEF ShowCodeBeautifierParser}
16    DebugLn([GetIndentStr(Stack.Top*2),'BeginBlock ',FABBlockTypeNames[Typ],' ',GetAtomString(@Src[AtomStart],NestedComments),' at ',PosToStr(p)]);
17    {$ENDIF}
18  end;
19begin
20
21end;
22