[vala/wip/transform: 99/104] Implement more get_error_types



commit 1f96457a0418db7029449337683f5e9cf81f3423
Author: Luca Bruno <lucabru src gnome org>
Date:   Thu Feb 6 21:13:15 2014 +0100

    Implement more get_error_types

 vala/valabinaryexpression.vala         |    5 +++++
 vala/valacastexpression.vala           |    4 ++++
 vala/valaconditionalexpression.vala    |    6 ++++++
 vala/valaelementaccess.vala            |    7 +++++++
 vala/valamemberaccess.vala             |    6 ++++++
 vala/valanamedargument.vala            |    4 ++++
 vala/valaobjectcreationexpression.vala |    4 ++++
 vala/valapointerindirection.vala       |    4 ++++
 vala/valapostfixexpression.vala        |    4 ++++
 vala/valatypecheck.vala                |    4 ++++
 vala/valaunaryexpression.vala          |    4 ++++
 11 files changed, 52 insertions(+), 0 deletions(-)
---
diff --git a/vala/valabinaryexpression.vala b/vala/valabinaryexpression.vala
index c6579d6..6235090 100644
--- a/vala/valabinaryexpression.vala
+++ b/vala/valabinaryexpression.vala
@@ -141,6 +141,11 @@ public class Vala.BinaryExpression : Expression {
                return left.is_non_null () && right.is_non_null ();
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               left.get_error_types (collection, source_reference);
+               right.get_error_types (collection, source_reference);
+       }
+       
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valacastexpression.vala b/vala/valacastexpression.vala
index 99d6743..c3cc573 100644
--- a/vala/valacastexpression.vala
+++ b/vala/valacastexpression.vala
@@ -119,6 +119,10 @@ public class Vala.CastExpression : Expression {
                }
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               inner.get_error_types (collection, source_reference);
+       }
+       
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valaconditionalexpression.vala b/vala/valaconditionalexpression.vala
index 5658373..9c37806 100644
--- a/vala/valaconditionalexpression.vala
+++ b/vala/valaconditionalexpression.vala
@@ -116,6 +116,12 @@ public class Vala.ConditionalExpression : Expression {
                }
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               condition.get_error_types (collection, source_reference);
+               true_expression.get_error_types (collection, source_reference);
+               false_expression.get_error_types (collection, source_reference);
+       }
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valaelementaccess.vala b/vala/valaelementaccess.vala
index 8d67998..e2870e1 100644
--- a/vala/valaelementaccess.vala
+++ b/vala/valaelementaccess.vala
@@ -110,6 +110,13 @@ public class Vala.ElementAccess : Expression {
                return container.is_pure ();
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               container.get_error_types (collection, source_reference);
+               foreach (Expression e in indices) {
+                       e.get_error_types (collection, source_reference);
+               }
+       }
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 4fd337f..49f724d 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -189,6 +189,12 @@ public class Vala.MemberAccess : Expression {
                }
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               if (inner != null) {
+                       inner.get_error_types (collection, source_reference);
+               }
+       }
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valanamedargument.vala b/vala/valanamedargument.vala
index 3ee9156..a1f52b4 100644
--- a/vala/valanamedargument.vala
+++ b/vala/valanamedargument.vala
@@ -61,6 +61,10 @@ public class Vala.NamedArgument : Expression {
                return inner.is_pure ();
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               inner.get_error_types (collection, source_reference);
+       }
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala
index a2c697a..c053399 100644
--- a/vala/valaobjectcreationexpression.vala
+++ b/vala/valaobjectcreationexpression.vala
@@ -411,6 +411,10 @@ public class Vala.ObjectCreationExpression : Expression {
                        var m = (Method) symbol_reference;
                        m.get_error_types (collection, source_reference);
                }
+
+               foreach (Expression expr in argument_list) {
+                       expr.get_error_types (collection, source_reference);
+               }
        }
 
        public override void emit (CodeGenerator codegen) {
diff --git a/vala/valapointerindirection.vala b/vala/valapointerindirection.vala
index ec5d6cc..18238ed 100644
--- a/vala/valapointerindirection.vala
+++ b/vala/valapointerindirection.vala
@@ -67,6 +67,10 @@ public class Vala.PointerIndirection : Expression {
                return inner.is_pure ();
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               inner.get_error_types (collection, source_reference);
+       }
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valapostfixexpression.vala b/vala/valapostfixexpression.vala
index 8ab2be7..82b41ba 100644
--- a/vala/valapostfixexpression.vala
+++ b/vala/valapostfixexpression.vala
@@ -78,6 +78,10 @@ public class Vala.PostfixExpression : Expression {
                }
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               inner.get_error_types (collection, source_reference);
+       }
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valatypecheck.vala b/vala/valatypecheck.vala
index ed024b3..44a30b1 100644
--- a/vala/valatypecheck.vala
+++ b/vala/valatypecheck.vala
@@ -93,6 +93,10 @@ public class Vala.TypeCheck : Expression {
                }
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               expression.get_error_types (collection, source_reference);
+       }
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valaunaryexpression.vala b/vala/valaunaryexpression.vala
index 6033964..9f1d7c2 100644
--- a/vala/valaunaryexpression.vala
+++ b/vala/valaunaryexpression.vala
@@ -146,6 +146,10 @@ public class Vala.UnaryExpression : Expression {
                return null;
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               inner.get_error_types (collection, source_reference);
+       }
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;


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