Hi, On Sat, 2009-05-09 at 23:32 +0200, gege2061 wrote: > I continu my learning of the vala parser. > > I seek to get the local variables of a method. I tested > Method.body.get_local_variables() but the list is empty. > > What is the good way?
Local variables have block scope, which means that you might need to call get_local_variables() on a child block of the method body. If you want to list all local variables in a method, you need to iterate over all block children and call get_local_variables() on each. Jürg _______________________________________________ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list