[squeak-dev] ||

Eliot Miranda eliot.miranda at gmail.com
Mon Feb 2 20:47:45 UTC 2015


Hi All,

    code as in the double bars forming the end of block arguments and the
beginning of block temporaries in

convertInstances
| new old |
old := Binding allInstances.
new := old collect: [:ea | ClassBinding key: ea key value: ea value].
old elementsForwardIdentityTo: new.
 old := ReadOnlyVariableBinding allInstances.
new := old collect: [:ea | ClassBinding key: ea key value: ea value].
old elementsForwardIdentityTo: new.
 Environment allInstancesDo:
[:env |
#('contents' 'bindings' 'public' 'undeclared') do:
=> [:var || dict |
old := Array new writeStream.
new := Array new writeStream.
dict := env instVarNamed: var.
dict associations do:
[:binding |
binding class == Association ifTrue:
[old nextPut: binding.
new nextPut: binding key => binding value]].
old contents elementsForwardIdentityTo: new contents]]

is legal but highlighted as a syntax error by shout.

What do you prefer, editing the source to | | or fixing Shout to accept the
syntax?  The right answer should be fixing shout but the fix will be ugly
because || is a binary selector and so this will need to be special cased.
-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150202/026dd7cd/attachment.htm


More information about the Squeak-dev mailing list