[vala/wip/transform: 98/99] Add more get_error_types
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/transform: 98/99] Add more get_error_types
- Date: Sun, 25 Sep 2016 19:24:38 +0000 (UTC)
commit b78b6372232b045ea983e82f24aa3805904f064c
Author: Luca Bruno <luca bruno immobiliare it>
Date: Wed Feb 5 10:35:16 2014 +0100
Add more get_error_types
codegen/valaccodetransformer.vala | 1 +
vala/valabinaryexpression.vala | 5 +++++
vala/valacastexpression.vala | 4 ++++
vala/valaconditionalexpression.vala | 6 ++++++
vala/valaelementaccess.vala | 7 +++++++
vala/valamemberaccess.vala | 6 ++++++
vala/valapointerindirection.vala | 4 ++++
vala/valaunaryexpression.vala | 4 ++++
8 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodetransformer.vala b/codegen/valaccodetransformer.vala
index aef6926..698723f 100644
--- a/codegen/valaccodetransformer.vala
+++ b/codegen/valaccodetransformer.vala
@@ -342,6 +342,7 @@ public class Vala.CCodeTransformer : CodeTransformer {
var replacement = return_temp_access (local, expr.value_type, target_type,
formal_target_type);
end_replace_expression (replacement);
+ return;
}
}
diff --git a/vala/valabinaryexpression.vala b/vala/valabinaryexpression.vala
index e2d05ec..27f0877 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 2e2aeb2..225e4a7 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..f35dab2 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..54263ed 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 b83243a..da12d27 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/valapointerindirection.vala b/vala/valapointerindirection.vala
index ec5d6cc..334bb17 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/valaunaryexpression.vala b/vala/valaunaryexpression.vala
index 239bbe1..341dd69 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]