[vala/wip/transform: 62/95] Set parent_node when replacing expressions
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/transform: 62/95] Set parent_node when replacing expressions
- Date: Mon, 20 Mar 2017 14:33:42 +0000 (UTC)
commit 6663265fc7e9576e6325dc0ecfd621301a1718c6
Author: Luca Bruno <lucabru src gnome org>
Date: Mon Oct 29 21:04:18 2012 +0100
Set parent_node when replacing expressions
vala/valaarraycreationexpression.vala | 1 +
vala/valaforstatement.vala | 2 ++
vala/valainitializerlist.vala | 1 +
vala/valatuple.vala | 1 +
4 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/vala/valaarraycreationexpression.vala b/vala/valaarraycreationexpression.vala
index 066e5b9..dc1a405 100644
--- a/vala/valaarraycreationexpression.vala
+++ b/vala/valaarraycreationexpression.vala
@@ -149,6 +149,7 @@ public class Vala.ArrayCreationExpression : Expression {
for (int i = 0; i < sizes.size; i++) {
if (sizes[i] == old_node) {
sizes[i] = new_node;
+ new_node.parent_node = this;
return;
}
}
diff --git a/vala/valaforstatement.vala b/vala/valaforstatement.vala
index 5a141ea..2754666 100644
--- a/vala/valaforstatement.vala
+++ b/vala/valaforstatement.vala
@@ -143,11 +143,13 @@ public class Vala.ForStatement : BaseStatement {
for (int i=0; i < initializer.size; i++) {
if (initializer[i] == old_node) {
initializer[i] = new_node;
+ new_node.parent_node = this;
}
}
for (int i=0; i < iterator.size; i++) {
if (iterator[i] == old_node) {
iterator[i] = new_node;
+ new_node.parent_node = this;
}
}
}
diff --git a/vala/valainitializerlist.vala b/vala/valainitializerlist.vala
index f5ae294..1aac848 100644
--- a/vala/valainitializerlist.vala
+++ b/vala/valainitializerlist.vala
@@ -124,6 +124,7 @@ public class Vala.InitializerList : Expression {
for (int i = 0; i < initializers.size; i++) {
if (initializers[i] == old_node) {
initializers[i] = new_node;
+ new_node.parent_node = this;
}
}
}
diff --git a/vala/valatuple.vala b/vala/valatuple.vala
index d35795a..f813138 100644
--- a/vala/valatuple.vala
+++ b/vala/valatuple.vala
@@ -60,6 +60,7 @@ public class Vala.Tuple : Expression {
for (int i = 0; i < expression_list.size; i++) {
if (expression_list[i] == old_node) {
expression_list[i] = new_node;
+ new_node.parent_node = this;
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]