[NIT] Pretty pretting #ifFalse:ifTrue:

Bijan Parsia bparsia at email.unc.edu
Mon Nov 19 17:46:33 UTC 2001


On Mon, 19 Nov 2001, ducasse wrote:

[snip]
> > Bummer! This sort of thing is rather serious weakness, IMHO, of the
> > current parse tree based pretty printing and colorizing. The parse trees
> > just aren't rich enough. Having colorizing, especially, being tied to the
> > parse tree just hurts since colorizing *can* preserve other code layout
> > (and I know there's a package floating around for that).
> 
> 
> We started 6 months ago to write a pretty printer based on a visitor.
> So that we could have multiple way of enriching the tree. But this is not
> straightforward... I hope we will came back to this soon. But for example
> just coloring and keeping the author indentation is not simple.
[snip]

This confused me until I realized you meant that just coloring *from a
parse tree* and keeping the author indentation is not simple. Oh yes,
definitely. Coloring based on text matching is easier in some respects.

It seems to me that the parse tree would need to retain source code
coordinates to make these feasible. Hmm. The debugger must do *something*
along these lines, in order to highlight the currently executed code, but
I'm not sure how that works.

Which, for no particular reason, makes me wonder if there's a byte code
"assembler" around anywhere...

Cheers,
Bijan "If it's not connected that's ok" Parsia.





More information about the Squeak-dev mailing list