Hi,

I have problems understanding how to traverse a CodeTree. The code I'm talking about is pasted below together with the testunit I parsed.

The result I get from the code is:

4 Unit
5 Interface Section
16 Uses Section
6 Implementation

I would expect though that I would also see the items behind the implementation section. How can I access them?

Darius

CodeNode := CodeTool.Tree.Root;
repeat
 WriteLn(Format('%d %s', [CodeNode.Desc, CodeNode.DescAsString]));
 CodeNode := CodeNode.Next;
until CodeNode = nil;

//-Test unit-------------------------------
unit Unit1;

{$mode objfpc}{$H+}

interface

uses
 Classes, SysUtils;

implementation

procedure test;
begin
end;

end. //-Test unit-------------------------------

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to