[Cuis-dev] [ChangeSet] source ranges for cascade parse nodes
Nahuel Garbezza
n.garbezza at gmail.com
Tue Apr 14 17:04:22 PDT 2020
Hi!
Attached are two changesets to add support for source range tracking of
cascade nodes. This is particularly useful for refactorings like the
extract method or the extract temporary variable.
Example: if you have this expression:
3 factorial; yourself
now we are not reporting source range for the cascade, just for each
individual message. From now on, we'll be able to get:
* "raw" source range: 3 [factorial; yourself] (original source range
definition, used for debugging)
* "complete" source range: [3 factorial; yourself] (definition added for
refactoring purposes)
The reason I made two changesets is because I wanted to extract a method in
the Parser but I cannot do it in the same changeset, because it could break
the image.
* The first changeset includes the new feature itself
* The second changeset is just cleanup to make the parser #cascade method
more readable.
This change allows us to automatically support a new extract method case,
which is extracting expressions enclosing cascade message sends (yay!).
Also attached a test for it.
Thanks,
Nahuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200414/470e3aaf/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4114-CuisCore-NahuelGarbezza-2020Apr14-20h09m-RNG.001.cs.st
Type: application/octet-stream
Size: 3642 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200414/470e3aaf/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4115-CuisCore-NahuelGarbezza-2020Apr14-20h53m-RNG.001.cs.st
Type: application/octet-stream
Size: 823 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200414/470e3aaf/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-BaseImageTests-RNG.002.cs.st
Type: application/octet-stream
Size: 570 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200414/470e3aaf/attachment-0002.obj>
More information about the Cuis-dev
mailing list