Commit 1587c08a authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

pack all embedded stataments in blocks update

2007-03-04  Jürg Billeter  <j@bitron.ch>

	* vala/parser.y: pack all embedded stataments in blocks
	* vala/vala.h: update

svn path=/trunk/; revision=221
parent 0b996ba3
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
......
......@@ -1225,17 +1225,65 @@ expression
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
......
......@@ -15,6 +15,7 @@
#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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment