Adem schrieb: > On 2010-05-31 05:36, Doug Chamberlin wrote: > > Doug, > >> I have great interest in a parser-based code formatting tool. However, > I have doubt that using the compiler's parser is the best solution. > > It may not be the best solution basically bexause it was written solely > for the compiler's needs. IOW, a very customized, special purpose one. > > Yet, as far as parser goes, it is the best solution. Because it is the > originial source of information. Any new additions as well as > corrections go in there --
This is not necessarily true. Someone might hack in support for a new procedure specifier. However, it is not guranteed that this one would be exposed in any way to an external interface. > if something then begin > something; > end else begin > somethingelse; > end; > > it can also reorganize some comments in such constructs. The compiler simply discards comments and it has no infrastructure to link comments in any way to code. -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
