[vala/wip/transform: 57/124] Resolve symbols during transformation



commit 64a550798ff9953c174e716b8e2b1a2869a3a065
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue Jan 3 12:37:00 2012 +0100

    Resolve symbols during transformation

 codegen/valagvarianttransformer.vala | 5 ++++-
 vala/valacodetransformer.vala        | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/codegen/valagvarianttransformer.vala b/codegen/valagvarianttransformer.vala
index a48189d6b..7d9b8a6ab 100644
--- a/codegen/valagvarianttransformer.vala
+++ b/codegen/valagvarianttransformer.vala
@@ -270,6 +270,9 @@ public class Vala.GVariantTransformer : CodeTransformer {
                                b.add_expression (call);
                        }
                        b.add_return (expression (@"$builder.end ()"));
+
+                       b.pop_method ();
+                       check (m);
                }
 
                var call = (MethodCall) expression (m.name+"()");
@@ -286,7 +289,7 @@ public class Vala.GVariantTransformer : CodeTransformer {
                        var builderinit = expression (@"new GLib.VariantBuilder (new GLib.VariantType 
(\"$(get_type_signature (type))\"))");
                        var builder = b.add_temp_declaration (null, builderinit);
 
-                       var for_each = expression (@"ht.for_each ((k,v) => $builder.add (\"{?*}\", k, v))");
+                       var for_each = expression (@"ht.for_each ((k,v) => { GLib.Variant k1 = k; 
GLib.Variant v1 = v; $builder.add (\"{?*}\", k, v); })");
                        b.add_expression (for_each);
                        b.add_return (expression (@"$builder.end ()"));
 
diff --git a/vala/valacodetransformer.vala b/vala/valacodetransformer.vala
index ec2d6b6c2..12dfe7479 100644
--- a/vala/valacodetransformer.vala
+++ b/vala/valacodetransformer.vala
@@ -45,6 +45,7 @@ public class Vala.CodeTransformer : CodeVisitor {
        }
 
        public void check (CodeNode node) {
+               node.accept (context.resolver);
                if (!node.check (context)) {
                        return;
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]