[Vala] genie # comments

2009-07-14 Thread pancake
I have written my first patch for the vala compiler... well, to be exact it is only for the genie syntax parser. The attached patch adds support for python-like comments for the Genie compiler. This way it is possible to do things like that: $ cat vala/test.gs # Here is another comment init #

Re: [Vala] genie # comments

2009-07-14 Thread Endi
Maybe you could improve the comment handling code to do sth for this: http://mail.gnome.org/archives/vala-list/2009-April/msg00025.html This proposal says that the single line style comment, which describes your next few lines of code, could be used for debugging. This is very similar to the

Re: [Vala] genie # comments

2009-07-14 Thread pancake
This was discused some time ago and I don't think comments should be used as anything else than comments. And a compiler doesnt have to provide such mechanisms, if you know a bit of regexps you can do the same in perl or sed writing your own preprocessor which is as simple as: mv a.vala

Re: [Vala] genie # comments

2009-07-14 Thread Jamie McCracken
my only concern with # is its used for compiler directives in vala (and genie too) eg #ifdef need to find a way around that... jamie On Tue, 2009-07-14 at 11:44 +0200, pancake wrote: I have written my first patch for the vala compiler... well, to be exact it is only for the genie syntax

[Vala] Errors handling in vala compiler

2009-07-14 Thread Yu Feng
Dear list, Is there any documents/instructions on how grammar/semantics erros handled by the compiler? I can see there is a 'check' method for each node which recursively checks the children of the node. It returns a false on error, and writes the error message to stderr. But how and why does