Commit 591615af authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

fix generating switch statements

2006-11-24  Jürg Billeter  <j@bitron.ch>

	* vala/valacodegenerator.vala: fix generating switch statements

svn path=/trunk/; revision=182
parent 0866265e
2006-11-24 Jürg Billeter <j@bitron.ch>
* vala/valacodegenerator.vala: fix generating switch statements
2006-11-23 Jürg Billeter <j@bitron.ch>
* vala/valacodegenerator.vala: allow main methods without parameters and
......
......@@ -2117,7 +2117,13 @@ public class Vala.CodeGenerator : CodeVisitor {
var cblock = new CCodeBlock ();
foreach (Statement body_stmt in section.get_statements ()) {
cblock.add_statement ((CCodeStatement) body_stmt.ccodenode);
if (body_stmt.ccodenode is CCodeFragment) {
foreach (CCodeStatement cstmt in ((CCodeFragment) body_stmt.ccodenode).get_children ()) {
cblock.add_statement (cstmt);
}
} else {
cblock.add_statement ((CCodeStatement) body_stmt.ccodenode);
}
}
var cdo = new CCodeDoStatement (cblock, new CCodeConstant ("0"));
......
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