]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Implement CodeWriter.visit_foreach_statement()
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 23 Oct 2021 13:27:12 +0000 (15:27 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 24 Oct 2021 12:57:31 +0000 (14:57 +0200)
vala/valacodewriter.vala

index 24f204147e8751e2b8114a6c9529a715ed139254..82f7efb49b099c46ea11923bb04d2ae8222e1220 100644 (file)
@@ -1139,6 +1139,15 @@ public class Vala.CodeWriter : CodeVisitor {
        }
 
        public override void visit_foreach_statement (ForeachStatement stmt) {
+               write_indent ();
+               write_string ("foreach (");
+               write_type (stmt.type_reference);
+               write_string (" ");
+               write_string (stmt.variable_name);
+               write_string (" in ");
+               stmt.collection.accept (this);
+               write_string (")");
+               stmt.body.accept (this);
        }
 
        public override void visit_break_statement (BreakStatement stmt) {