Well⦠Iâm working on make it more robust :) but in general, I disagree with all solutions style âforce some character to appear in one placeâ. I prefer to rely in a good (better) parsing than to force such kind of conventions that are also very easy to break (as soon as people can modify things outside the tools we propose). Esteban
On 10 Nov 2017, at 08:08, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 10 Nov 2017, at 11:59, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:
My proposition was to force methodBody closing to be on first column, and disambiguate potential method conflicts by forcing a more transparent white space.
Maybe we can force the white space only on conflicting lines that would begin with a ]. Most methods are indented (and even formatted) so the conflict should be extremely rare. It could happen though with multiple line literal string
^' [ something went wrong here ] '
If first column trick is not acceptable, then we will indeed come up with more visible escape sequences.
But don't you think that it would be weird to insert extra whitespace and not remove it (under the assumption that it does not matter), because is string constants like in your example, you would actually change code !
And yes, we are discussing a very rare case.
But as you showed, simplifying #methodBody is really important.
2017-11-10 11:49 GMT+01:00 Henrik Sperre Johansen <henrik.s.johansen@veloxit.no>: Can a line with a single ] ever at the "right" indentation level? Forcing autoformat at commit is a bit heavy hand, but maybe inserting a tab (or 2,3,4 spaces?) would be an ok workaround that doesn't require special decoding when loading the code?
Cheers, Henry
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html