2007-03-04 Jürg Billeter <j@bitron.ch>
+ * vala/parser.y: pack all embedded stataments in blocks
+ * vala/vala.h: update
+
+2007-03-04 Jürg Billeter <j@bitron.ch>
+
* vala/valasemanticanalyzer.vala: check for inherited properties in
construct formal parameters
statement
: declaration_statement
- | embedded_statement
+ | block
+ | empty_statement
+ | expression_statement
+ | selection_statement
+ | iteration_statement
+ | jump_statement
+ | lock_statement
;
embedded_statement
: block
| empty_statement
+ {
+ ValaSourceReference *src = src(@1);
+ $$ = VALA_STATEMENT (vala_block_new (src));
+ vala_block_add_statement (VALA_BLOCK ($$), $1);
+ g_object_unref ($1);
+ g_object_unref (src);
+ }
| expression_statement
+ {
+ ValaSourceReference *src = src(@1);
+ $$ = VALA_STATEMENT (vala_block_new (src));
+ vala_block_add_statement (VALA_BLOCK ($$), $1);
+ g_object_unref ($1);
+ g_object_unref (src);
+ }
| selection_statement
+ {
+ ValaSourceReference *src = src(@1);
+ $$ = VALA_STATEMENT (vala_block_new (src));
+ vala_block_add_statement (VALA_BLOCK ($$), $1);
+ g_object_unref ($1);
+ g_object_unref (src);
+ }
| iteration_statement
+ {
+ ValaSourceReference *src = src(@1);
+ $$ = VALA_STATEMENT (vala_block_new (src));
+ vala_block_add_statement (VALA_BLOCK ($$), $1);
+ g_object_unref ($1);
+ g_object_unref (src);
+ }
| jump_statement
+ {
+ ValaSourceReference *src = src(@1);
+ $$ = VALA_STATEMENT (vala_block_new (src));
+ vala_block_add_statement (VALA_BLOCK ($$), $1);
+ g_object_unref ($1);
+ g_object_unref (src);
+ }
| lock_statement
+ {
+ ValaSourceReference *src = src(@1);
+ $$ = VALA_STATEMENT (vala_block_new (src));
+ vala_block_add_statement (VALA_BLOCK ($$), $1);
+ g_object_unref ($1);
+ g_object_unref (src);
+ }
;
block
#include <vala/valaconstant.h>
#include <vala/valaconstructor.h>
#include <vala/valacontinuestatement.h>
+#include <vala/valacreationmethod.h>
#include <vala/valadeclarationstatement.h>
#include <vala/valadestructor.h>
#include <vala/valadostatement.h>