Parsing problem in trunk image

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

Parsing problem in trunk image

Chris Muller-3
BlockNode comments appear to be getting cascaded into all child BlockNodes.

To see an example, open the method:

  BlockNode>>#printOn:indent:

Shift + Yellow-click in the code pane, select "pretty print".  Notice
how the comment:

      "If >0 temps and >1 statement, put all statements on separate lines"

is now repeated within each of the ifTrue:ifFalse: blocks?!

It looks like the problem is related to the fact that the parse tree
has the comment in each of those sub-nodes, so it therefore gets
printed three times.

This bug is painful for me, I use pretty print constantly to make the
computer to format my code for me so I type fast and sloppy.  Who
broke this?

Reply | Threaded
Open this post in threaded view
|

Re: Parsing problem in trunk image

garduino
Good question!

I saw this problem some time ago, but I don't have the knowledgment to
help solve it :(

Cheers.
Germán.


2010/3/1 Chris Muller <[hidden email]>:

> BlockNode comments appear to be getting cascaded into all child BlockNodes.
>
> To see an example, open the method:
>
>  BlockNode>>#printOn:indent:
>
> Shift + Yellow-click in the code pane, select "pretty print".  Notice
> how the comment:
>
>      "If >0 temps and >1 statement, put all statements on separate lines"
>
> is now repeated within each of the ifTrue:ifFalse: blocks?!
>
> It looks like the problem is related to the fact that the parse tree
> has the comment in each of those sub-nodes, so it therefore gets
> printed three times.
>
> This bug is painful for me, I use pretty print constantly to make the
> computer to format my code for me so I type fast and sloppy.  Who
> broke this?
>
>