[patch] Remove duplicate category output in RBFormatter>>#acceptMethodNode:

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

[patch] Remove duplicate category output in RBFormatter>>#acceptMethodNode:

Lee Duhem
Hi,

This patch fix the following problem:

st> (Array lookupSelector: #print) methodFormattedSourceString
'print [
        "Print a represention of the receiver on the Transcript (stdout the GUI
         is not active)"

        <category: ''printing''>
        <category: ''printing''>
        Transcript show: self printString
    ]'

lee

ChangeLog

2009-10-28  Lee Duhem  <[hidden email]>

        * RBFormatter.st: Remove duplicate categroy output in #acceptMethodNode:.

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

duplicate_category.patch (866 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch] Remove duplicate category output in RBFormatter>>#acceptMethodNode:

Paolo Bonzini-2
On 10/27/2009 06:53 PM, Lee Duhem wrote:

> Hi,
>
> This patch fix the following problem:
>
> st>  (Array lookupSelector: #print) methodFormattedSourceString
> 'print [
> "Print a represention of the receiver on the Transcript (stdout the GUI
> is not active)"
>
> <category: ''printing''>
> <category: ''printing''>
> Transcript show: self printString
>      ]'

This unfortunately breaks gst-convert.

The right fix would be more complicated and it would involve basically
1) creating a new parse node type, 2) extracting
STCompiler>>#compileAttribute: to RBMethodNode and making it create the
new parse node type, 3) rewriting RBMethodNode>>#category and #category:
to use the new parse node type as well.

Gwen is doing work on the RBParser, maybe it's best to wait for him to
finish that.

Thanks anyway!  Can you file a bug report on smalltalk.gnu.org?

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [patch] Remove duplicate category output in RBFormatter>>#acceptMethodNode:

Lee Duhem
On Wed, Oct 28, 2009 at 3:55 AM, Paolo Bonzini <[hidden email]> wrote:

> On 10/27/2009 06:53 PM, Lee Duhem wrote:
>>
>> Hi,
>>
>> This patch fix the following problem:
>>
>> st>  (Array lookupSelector: #print) methodFormattedSourceString
>> 'print [
>>        "Print a represention of the receiver on the Transcript (stdout the
>> GUI
>>         is not active)"
>>
>>        <category: ''printing''>
>>        <category: ''printing''>
>>        Transcript show: self printString
>>     ]'
>
> This unfortunately breaks gst-convert.
>
> The right fix would be more complicated and it would involve basically 1)
> creating a new parse node type, 2) extracting STCompiler>>#compileAttribute:
> to RBMethodNode and making it create the new parse node type, 3) rewriting
> RBMethodNode>>#category and #category: to use the new parse node type as
> well.
>
> Gwen is doing work on the RBParser, maybe it's best to wait for him to
> finish that.
>
> Thanks anyway!  Can you file a bug report on smalltalk.gnu.org?

Sure. See http://smalltalk.gnu.org/project/issue/421

lee


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk