[Lazarus] code formating [wan: Re: WriteLn back to the GUI]

Juha Manninen juha.manninen62 at gmail.com
Mon Oct 28 08:02:00 CET 2013

On Mon, Oct 28, 2013 at 4:05 AM, ListMember <listmember at letterboxes.org> wrote:
> I have read a little more about codetools [
> http://wiki.freepascal.org/Codetools ] and Cody [
> http://wiki.freepascal.org/Cody ].
> The combination of the two seems already able do a number of feats that not
> even professional/paid packages (that I know of in Delphi world) can.
> I am wondering if it wouldn't be better idea (for me) to work on codetools
> rather than fcl-passrc?

If you plan to modify code in-place then certainly yes.
There was a plan to replace JCF parser with fcl-passrc but later I
realized it would not work.
fcl-passrc is basically a one-way parser. Writing modified code back
would loose both original formatting and comments.

The downside of CodeTools is that it is not a full parser for the
code. It stores in its parse tree definitions of types, variables,
classes and functions but not the code itself. Yet, it provides
primitives for help parsing the code.
For example Codetools is used for the Delphi converter. For
replacement of functions it needs to parse the function parameters by
The design of CodeTools makes it good for working on broken code while
you are editing it. Code completion and browsing in editor work much
better than in Delphi.

BTW, I did not notice that JCF parser is too slow. Its problem is that
nobody is updating it for the latest pascal syntax.
Both fcl-passrc and CodeTools are maintained better.


More information about the Lazarus mailing list