[vala/staging] codewriter: Prepend "yield" if is_yield_expression is set on MethodCall/ObjectCreationExpression
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codewriter: Prepend "yield" if is_yield_expression is set on MethodCall/ObjectCreationExpression
- Date: Sat, 22 Sep 2018 14:35:24 +0000 (UTC)
commit ce7c31eaff13fcd8c2da7a0d52deb8f97043df24
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Sep 22 14:49:33 2018 +0200
codewriter: Prepend "yield" if is_yield_expression is set on MethodCall/ObjectCreationExpression
vala/valacodewriter.vala | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/vala/valacodewriter.vala b/vala/valacodewriter.vala
index 43b4312f6..620e45896 100644
--- a/vala/valacodewriter.vala
+++ b/vala/valacodewriter.vala
@@ -1220,6 +1220,10 @@ public class Vala.CodeWriter : CodeVisitor {
}
public override void visit_method_call (MethodCall expr) {
+ if (expr.is_yield_expression) {
+ write_string ("yield ");
+ }
+
expr.call.accept (this);
write_string (" (");
@@ -1276,6 +1280,10 @@ public class Vala.CodeWriter : CodeVisitor {
}
public override void visit_object_creation_expression (ObjectCreationExpression expr) {
+ if (expr.is_yield_expression) {
+ write_string ("yield ");
+ }
+
if (!expr.struct_creation) {
write_string ("new ");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]