[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[photran-dev] Import AST changes in HEAD
|
Hi all,
There are some important changes to the Photran AST in HEAD.
(Mariano, note items 3 and 4.)
(1) When you call a method that adds or replaces a node in the AST --
for example, if you call add() on an ASTListNode or one of the
setXYZ() methods on an ordinary AST node -- it *automatically* calls
#setParent on the new child node, so the new child node "knows" about
its new parent node. So if I call node1.replaceWith(node2), then
node2 will automatically have its parent set correctly. Before, you
had to call #setParent manually. Note, however, if you have code that
calls #getParent and #setParent, it might not work as expected
anymore!
(2) Now you can modify the AST inside a visitor. Before, you could
not without (possibly) getting a ConcurrentModificationException.
(3) The LoopReplacer class has been modified to take advantage of the
two changes above. It's simpler now, IMHO.
(4) IActionStmt now has a getLabel() method.
If you haven't updated from CVS in a while, note that the code in HEAD
expects Eclipse 3.6M5 and CDT 7.0 (CDT HEAD).
Jeff