<div dir="ltr"><div>Great! I was actually working on that but your approach seems better than mine. I got a little bit stuck solving another issue with it, that happens when changing the name to one already used in another block. For example, one should be able to rename the temp variable 'old' to 'new' in the method:</div><div><br></div><div>method</div><div> [ | old | ^old ].</div><div> [ | new | ^new ].<br></div><div><br></div><div>, but the current implementation doesn't support it. Attached is a ChangeSet with a test demonstrating this.</div><div><br></div><div>I was stuck because it meant we should be able to determine if the block B declaring the new variable A neither has any inner blocks defining the same variable nor any block that contains B defines A. If both these things are true (and all the other checks pass), the variable can be renamed. This, in turn, meant we should go through all the parse tree looking for the branch that corresponds to B, and just check for A in the nodes on that branch. It can be done probably with a ParseNodeVisitor; it just was too late when I was programming this and it seemed that it was going to take me a longer while to implement it, so I just left it there to continue later. I'll probably do it tomorrow if I have some time.</div><div><br></div><div>Cheers,</div><div>Eric<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mar., 17 dic. 2019 a las 19:30, Hernan Wilkinson via Cuis-dev (<<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div> I just uploaded to the repo a fix for that bug.</div><div> Now if two different blocks define a var with the same name, the rename works as expected.</div><div><br></div><div>Cheers!</div><div>Hernan.<br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></span></strong></span></div><div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></span></strong></span><font size="2" face="tahoma, sans-serif">-4893-2057</font></div><div><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></span></strong></span></div><div><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div></div></div></div></div></div></div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div>