]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Implement check() for StatementList
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 24 Oct 2018 12:05:09 +0000 (14:05 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 24 Oct 2018 12:09:23 +0000 (14:09 +0200)
vala/valastatementlist.vala

index 5159598151c653776347b55fa90767acee96fedd..f773a5ca7d7ab16f7aa90a230335ac741d81c562 100644 (file)
@@ -60,6 +60,15 @@ public class Vala.StatementList : CodeNode, Statement {
                }
        }
 
+       public override bool check (CodeContext context) {
+               foreach (Statement stmt in list) {
+                       if (!stmt.check (context)) {
+                               return false;
+                       }
+               }
+               return true;
+       }
+
        public override void emit (CodeGenerator codegen) {
                foreach (Statement stmt in list) {
                        stmt.emit (codegen);