[vala/wip/transform: 142/179] Set parent_node when replacing expressions
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/transform: 142/179] Set parent_node when replacing expressions
- Date: Tue, 27 Mar 2018 11:52:56 +0000 (UTC)
commit 21f1dae679b959d8b7e4c42205288d5804259437
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 a5e8dda..46e5a36 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 e0564a6..6457b84 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]