[vala/wip/baedert/nullable: 13/25] astprinter: Don't print null initializers
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/baedert/nullable: 13/25] astprinter: Don't print null initializers
- Date: Tue, 8 Nov 2016 21:19:09 +0000 (UTC)
commit 85c3bbdd9b1decea3e3d969dca5740c9b4072766
Author: Timm Bäder <mail baedert org>
Date: Sat Nov 5 22:02:41 2016 +0100
astprinter: Don't print null initializers
vala/valaastprinter.vala | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/vala/valaastprinter.vala b/vala/valaastprinter.vala
index 90cfc32..5bed5bf 100644
--- a/vala/valaastprinter.vala
+++ b/vala/valaastprinter.vala
@@ -113,10 +113,13 @@ public class Vala.AstPrinter : CodeVisitor {
public override void visit_local_variable (LocalVariable local) {
print ("Local Var %s %s".printf (local.variable_type.to_string (), local.name));
- print ("Initializer: %s".printf (local.initializer.type_name));
- level ++;
- local.initializer.accept (this);
- level --;
+
+ if (local.initializer != null) {
+ print ("Initializer: %s".printf (local.initializer.type_name));
+ level ++;
+ local.initializer.accept (this);
+ level --;
+ }
}
public override void visit_initializer_list (InitializerList list) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]