[vala/wip/transform: 38/106] Resolve symbols during transformation
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/transform: 38/106] Resolve symbols during transformation
- Date: Mon, 4 Feb 2019 09:23:10 +0000 (UTC)
commit cbda08d1a496fa7c81d44bd4a212ce33cb75bc0c
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]