[vala/0.42] vala: Implement check() for StatementList



commit bcaeb02aa729602715bebb8b62fb5b7858e17bdc
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Oct 24 14:05:09 2018 +0200

    vala: Implement check() for StatementList

 vala/valastatementlist.vala | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/vala/valastatementlist.vala b/vala/valastatementlist.vala
index 934227a1a..07a84139b 100644
--- a/vala/valastatementlist.vala
+++ b/vala/valastatementlist.vala
@@ -54,6 +54,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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]