[vala/wip/baedert/nullable: 22/25] astprinter: Fix assignment printing
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/baedert/nullable: 22/25] astprinter: Fix assignment printing
- Date: Tue, 8 Nov 2016 21:19:54 +0000 (UTC)
commit 14b9a541ba0c34d2dbdecd0f2bb944c694dfa966
Author: Timm Bäder <mail baedert org>
Date: Tue Nov 8 10:46:42 2016 +0100
astprinter: Fix assignment printing
vala/valaastprinter.vala | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/vala/valaastprinter.vala b/vala/valaastprinter.vala
index 93403ea..a1b4956 100644
--- a/vala/valaastprinter.vala
+++ b/vala/valaastprinter.vala
@@ -261,7 +261,8 @@ public class Vala.AstPrinter : CodeVisitor {
public override void visit_member_access (MemberAccess expr) {
- print ("MemberAccess (%s)".printf (expr.member_name));
+ print ("MemberAccess (%s), Inner: %s".printf (expr.member_name,
+ expr.inner != null ? expr.inner.type_name :
"null"));
level ++;
expr.accept_children (this);
level --;
@@ -341,14 +342,14 @@ public class Vala.AstPrinter : CodeVisitor {
public override void visit_assignment (Assignment a) {
print ("Assignment");
- print ("From");
+ print ("From %s".printf (a.right.type_name));
level ++;
- a.left.accept (this);
+ a.right.accept (this);
level --;
- print ("To %s".printf (a.right.type_name));
+ print ("To %s".printf (a.left.type_name));
level ++;
- a.right.accept (this);
+ a.left.accept (this);
level --;
//print ("Assignment from %s to %s".printf (a.left.type_name, a.right.type_name));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]