[Vala] Comments in code generator

2008-07-23 Thread Sam Liddicott
My first changes to he code generator will be to permit each generated node to emit comments. The code generator will them be able to generate commented code explaining the reason code was generated. I plan on multiple levels of detail. The comment construction will also serve as a guide to

Re: [Vala] const pointers

2008-07-23 Thread Jürg Billeter
On Sun, 2008-06-08 at 06:20 -0700, Michael Lawrence wrote: Is there any way in vala to specify 'const void*' / 'gconstpointer'? I often get warnings from gcc, because 'void*' in vapi files translate to gpointer, not gconstpointer. If not, maybe 'void*' should be made 'const void* by

Re: [Vala] non-null checking and g(s)lists

2008-07-23 Thread Jürg Billeter
On Mon, 2008-06-09 at 14:56 -0700, Michael Lawrence wrote: Since empty G(S)Lists are NULL, whenever using a G(S)List as a parameter, I need to specify ?. It's a bit strange to assert that G(S)List parameters are non-null, as they are actually valid G(S)Lists. Yes, that's a strange special

Re: [Vala] Verbatim strings containing

2008-07-23 Thread Jürg Billeter
On Mon, 2008-06-23 at 17:37 +0100, Sam Liddicott wrote: How should be quoted inside a verbatim string? Verbatim strings don't have support for escaping, so you need to resort to normal string literals if you need triple double quotes in a string. How will string literal concatenation work?

Re: [Vala] inherited method attributes: instancepos inconsistencies

2008-07-23 Thread Jürg Billeter
On Thu, 2008-06-26 at 15:09 +0100, Sam Liddicott wrote: We see that the last function (above) has the arguments the wrong way around because I had removed the instance_pos. But in fact it is only the entry method that needs to take into account instance_pos when ordering it's declared

Re: [Vala] property overrides need to be declared public?

2008-07-23 Thread Jürg Billeter
On Fri, 2008-06-27 at 22:42 -0700, Michael Lawrence wrote: When overriding a property, I found that I needed to declare it 'public' before it was actually accessible (i.e. the internal getter function was defined but the override was not registered in class_init). Is this by design? It's

Re: [Vala] inherited method attributes: instancepos inconsistencies

2008-07-23 Thread Sam Liddicott
* Jürg Billeter wrote, On 23/07/08 10:40: On Thu, 2008-06-26 at 15:09 +0100, Sam Liddicott wrote: We see that the last function (above) has the arguments the wrong way around because I had removed the instance_pos. But in fact it is only the entry method that needs to take into account

[Vala] Adding comments during code generation

2008-07-23 Thread Sam Liddicott
So that the code generator can annotate generated code with it's own comments, I think that CCodeNode needs to have a comment field (clearly not a CCodeComment). The writer methods of *Declaration classes will write out the comment field with each declarator. When a declarator is created, e.g.

[Vala] valac makefile problem

2008-07-23 Thread Sam Liddicott
The valac makefiles seem to be a bit buggy. I made this change (among others) to ccode/valaccodedeclaration.vala: -public CCodeDeclaration (string type_name) { +public CCodeDeclaration (string type_name, string comment=) { and then typed: make but got errors like: gcc -DHAVE_CONFIG_H

[Vala] __FILE__ and __LINE__ equivalent in vala

2008-07-23 Thread Sam Liddicott
What's the equivalent of __FILE__ and __LINE__ in vala? Is there an irc on which I get better ask some of these questions? thanks Sam ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] property overrides need to be declared public?

2008-07-23 Thread Michael Lawrence
On Wed, Jul 23, 2008 at 2:43 AM, Jürg Billeter [EMAIL PROTECTED] wrote: On Fri, 2008-06-27 at 22:42 -0700, Michael Lawrence wrote: When overriding a property, I found that I needed to declare it 'public' before it was actually accessible (i.e. the internal getter function was defined but

Re: [Vala] property overrides need to be declared public?

2008-07-23 Thread Jürg Billeter
On Wed, 2008-07-23 at 06:19 -0700, Michael Lawrence wrote: On Wed, Jul 23, 2008 at 2:43 AM, Jürg Billeter [EMAIL PROTECTED] wrote: On Fri, 2008-06-27 at 22:42 -0700, Michael Lawrence wrote: When overriding a property, I found that I needed to declare it

Re: [Vala] valac makefile problem

2008-07-23 Thread Jürg Billeter
On Wed, 2008-07-23 at 14:07 +0100, Sam Liddicott wrote: Even compiling valac without this change, and then using that to compile itself with this change results in the same error: I tried make distclean and still the same problem. Is there something wrong with the make file? There is

Re: [Vala] __FILE__ and __LINE__ equivalent in vala

2008-07-23 Thread Jürg Billeter
On Wed, 2008-07-23 at 14:14 +0100, Sam Liddicott wrote: What's the equivalent of __FILE__ and __LINE__ in vala? There is no direct equivalent at the moment, however, we support the [Diagnostics] attribute to automatically include the current file and line in logged messages. Is there an irc on