]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codewriter: Prepend "yield" if is_yield_expression is set on MethodCall/ObjectCreatio...
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 22 Sep 2018 12:49:33 +0000 (14:49 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 23 Sep 2018 07:40:25 +0000 (09:40 +0200)
vala/valacodewriter.vala

index a65956133d9aa3042eb56f53242358cc25d3d9df..b80e99b6c829296a88207cf39c5ca6f8cee494ca 100644 (file)
@@ -1237,6 +1237,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 (" (");
 
@@ -1293,6 +1297,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 ");
                }