+2008-05-02 Jürg Billeter <j@bitron.ch>
+
+ * vala/valainitializerlist.vala: implement replace_expression
+
2008-05-02 Jürg Billeter <j@bitron.ch>
* vala/valacatchclause.vala:
/* valainitializerlist.vala
*
- * Copyright (C) 2006-2007 Jürg Billeter, Raffaele Sandrini
+ * Copyright (C) 2006-2008 Jürg Billeter, Raffaele Sandrini
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*/
public void append (Expression expr) {
initializers.add (expr);
+ expr.parent_node = this;
}
/**
}
return true;
}
+
+ public override void replace_expression (Expression old_node, Expression new_node) {
+ for (int i = 0; i < initializers.size; i++) {
+ if (initializers[i] == old_node) {
+ initializers[i] = new_node;
+ }
+ }
+ }
}