[Gambas-devel] gambas editor added PrettyPrinter
Charlie
karl.reinl at ...16...
Tue Jul 13 22:49:25 CEST 2004
Benoit Minisini schrieb:
>On Monday 12 July 2004 00:46, Charlie Reinl wrote:
>
>
>>Salut,
>>
>>based on 0.94 (not 0.94a) I added to the gb.qt.editor a PrettyPrinter.
>>( editor.TabLength return a int now, I changed it for this version)
>>
>>I send you a gambas project (Indenter4-0.0.4.tar.gz) to test it and the
>>*.cpp and *.h files I changed (editor_new.tar.gz) , copy them to
>>/.../gambas-0.94/src/lib/qt/editor/ then compile/install it.
>>
>>The PrettyPrinter does not make the sourcecode only readable, he also
>>detects Errors .
>>When sourcecode loos his Structure a if/endif , for/next etc. is not
closed
>>correctly.
>>
>>Please let me know what you think about.
>>
>>Amicalement
>>Charlie
>>PS: Try to post that mail since yesterday late night , and had problems
>>till now
>>
>>
>
>Hi, Charlie
>
>Having a pretty printer is a good idea, but I think that the way you
>implemented it is not the good way! You should have told me before...
>
>The good way would have been using the gb.eval component that includes
the
>gambas compiler parser in its code. With a few changes in the parser code
>(just to keep the spaces in a beginning of a line), rewriting a line
of code
>from its result is very simple!
>
Yeah, thats the info I parsed the gambas sourcecode for, but to close to
'compile'
>As for the detection of error in code structure, the compiler already
detect
>that, so it is not useful to add it in the pretty-printer. It is not its
>role.
>
>
Yes it does, but with PrettyPrinter it will be visual.
>If you are interested, look at ./lib/eval/eval_read.c or
./comp/gbc_read.c.
>Add #define DEBUG at the beginning of ./comp/gbc_read.c and the
compiler will
>display the result of the parser at each compilation.
>
>
Thanks for your hint, I'm just a beginner (once again) in C. And I use
my old knowlege.
>Regards,
>
>
Amicalement
Charlie
More information about the Devel
mailing list