From: Rico Tzschichholz Date: Sat, 22 Sep 2018 12:49:33 +0000 (+0200) Subject: codewriter: Prepend "yield" if is_yield_expression is set on MethodCall/ObjectCreatio... X-Git-Tag: 0.43.1~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce7c31eaff13fcd8c2da7a0d52deb8f97043df24;p=thirdparty%2Fvala.git codewriter: Prepend "yield" if is_yield_expression is set on MethodCall/ObjectCreationExpression --- 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 "); }