DeltaStreams small update

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: DeltaStreams small update

Michael Lucas-Smith-3

>
> That looks good.
> How does the body:[ ... ] part parse? Is there a way of quickly
> 'skipping' from start '[' to the end ']' without having to parse the
> source in the midlle with a full Smalltalk parser? It can't just skip
> matching '[ ]' pairs, in case there are ']' embedded in strings etc. ,
> right?
You just let it compile as per normal. It has errors - but when you go
to call the block, you reflect back to the parse tree and extract the
source code.

It's a rather simple trick of self-reflecting code. It's kind of a shame
that blocks don't already ahve access to their own source code like
methods do - but whatcha gunna do :)

Michael

12