2015-09-16 15:14 GMT+02:00 Thierry Goubier <thierry.goub...@gmail.com>:

> Argh, sent too early:
>
> self new color: Color red; yourself
>
> est bien une cascade, non?
>

Yes, but in

(self new color: Color red); yourself
the expression in parenthesis looks like "this evalulates first, to
'anObject' ", so we send " ; yourself",
a cascaded messages with only one message to "anObject".





>
>
>
> Thierry
>
>
> 2015-09-16 15:12 GMT+02:00 Thierry Goubier <thierry.goub...@gmail.com>:
>
>>
>>
>> 2015-09-16 15:05 GMT+02:00 Nicolai Hess <nicolaih...@web.de>:
>>
>>> OK, I think Sven is right and a cascade needs at least one message send
>>>
>>> "self ; yourself"
>>>
>>> doesn't work too (both parser don't accept this).
>>>
>>
>> But
>>
>>
>>
>>>
>>> There are currently two methods in Pharo 5.0 with this
>>> syntax:
>>>
>>> DAPackageAnalyzerWindow class>>#onPackagesNamed:
>>> DAPackageCycleDetectionTreeModel class>>#onPackagesNamed:
>>>
>>> @Yuri, can you change that.
>>>
>>>
>>> And I think we should fix RBParser.
>>>
>>>
>>> 2015-09-16 11:30 GMT+02:00 Thierry Goubier <thierry.goub...@gmail.com>:
>>>
>>>> Nicolai,
>>>>
>>>> can you try with the RBParser directly? I believe Opal uses the
>>>> RBParser.
>>>>
>>>> RBParser parseMethod: 'createRedMorph
>>>>     ^ (self new color:Color red); yourself'
>>>>
>>>> Oh, RBParser sees it as:
>>>>
>>>> self new
>>>> color: Color red;
>>>> yourself
>>>>
>>>> :)
>>>>
>>>> Thierry
>>>>
>>>>
>>>> 2015-09-16 10:56 GMT+02:00 Nicolai Hess <nicolaih...@web.de>:
>>>>
>>>>> The following method compiles with Opal:
>>>>>
>>>>> createRedMorph
>>>>>     ^ (self new color:Color red); yourself
>>>>>
>>>>> but gives a syntax error with the old compilers parser
>>>>>
>>>>> createRedMorph
>>>>>     ^ (self new color:Color red)End of block expected -> ; yourself
>>>>>
>>>>>
>>>>> removing the parenthesis of course works for both.
>>>>> Who is right ?
>>>>>
>>>>>
>>>>> (for those who understand the ParseTreeSearcher syntax, how would
>>>>> a search expression look, for finding code like:
>>>>>
>>>>>    "(some expression);yourself"
>>>>>
>>>>>
>>>>> nicolai
>>>>>
>>>>>
>>>>
>>>
>>
>

Reply via email to