[Gambas-devel] about PrettyPrinter

Benoit Minisini gambas at ...1...
Thu Aug 12 23:40:12 CEST 2004


On Sunday 08 August 2004 11:49, Benoit Minisini wrote:
> I think... I think :-)

I continue...

>
> Wouldn't it be a better idea to pretty print the code directly with the
> compiler, or to create a pretty-printer program that uses the same sources
> than the compiler ? This need passing many options to the command line, but
> I think syntax analyzing code must be centralized as much as possible.
>

I think you could have wrote your pretty printer in Gambas, as the 
GambasEditor class has a method, Analyze() that splits a line into symbols, 
spaces, comments, operators... and tells you what is what. I made it to 
implement automatic completion, display method signatures and find symbol 
definitions in code.

I think it would be a good idea. Is it a problem for you to rewrite your C 
pretty printer in Gambas, if I tell you how to use the Analyze() method ?

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list