[vala/wip/transform: 91/100] Accept method call children
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/transform: 91/100] Accept method call children
- Date: Sun, 9 Feb 2014 10:48:35 +0000 (UTC)
commit 6d7b9f6c6fcfcae7b99519bc86449155e4042753
Author: Luca Bruno <luca bruno immobiliare it>
Date: Mon Feb 3 13:03:21 2014 +0100
Accept method call children
codegen/valaccodetransformer.vala | 14 ++++++++++++++
vala/valamethodcall.vala | 3 +++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodetransformer.vala b/codegen/valaccodetransformer.vala
index 52d5a4e..cc9d5bb 100644
--- a/codegen/valaccodetransformer.vala
+++ b/codegen/valaccodetransformer.vala
@@ -359,8 +359,11 @@ public class Vala.CCodeTransformer : CodeTransformer {
var replacement = return_temp_access (local, expr.value_type, target_type,
formal_target_type);
end_replace_expression (replacement);
+ return;
}
}
+
+ expr.accept_children (this);
}
public override void visit_conditional_expression (ConditionalExpression expr) {
@@ -476,8 +479,11 @@ public class Vala.CCodeTransformer : CodeTransformer {
var replacement = return_temp_access (local, expr.value_type, target_type,
formal_target_type);
end_replace_expression (replacement);
+ return;
}
}
+
+ expr.accept_children (this);
}
Expression stringify (Expression expr) {
@@ -527,4 +533,12 @@ public class Vala.CCodeTransformer : CodeTransformer {
public override void visit_assignment (Assignment a) {
a.accept_children (this);
}
+
+ public override void visit_cast_expression (CastExpression expr) {
+ expr.accept_children (this);
+ }
+
+ public override void visit_lambda_expression (LambdaExpression expr) {
+ expr.accept_children (this);
+ }
}
diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala
index 6b86486..48c2c7f 100644
--- a/vala/valamethodcall.vala
+++ b/vala/valamethodcall.vala
@@ -761,6 +761,9 @@ public class Vala.MethodCall : Expression {
public override string to_string () {
var b = new StringBuilder ();
b.append_c ('(');
+ if (is_yield_expression) {
+ b.append ("yield ");
+ }
b.append (call.to_string ());
b.append_c ('(');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]