[Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-16 Thread Nicolai Hess
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

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-16 Thread Sven Van Caekenberghe
Interesting. I think that for a cascade you need more than one message send. > On 16 Sep 2015, at 10:56, Nicolai Hess wrote: > > The following method compiles with Opal: > > createRedMorph > ^ (self new color:Color red); yourself > > but gives a syntax error with the old compilers parser

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-16 Thread Thierry Goubier
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 : > The follow

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-16 Thread Nicolai Hess
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). There are currently two methods in Pharo 5.0 with this syntax: DAPackageAnalyzerWindow class>>#onPackagesNamed: DAPackageCycleDetectionTreeModel class>>#on

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-16 Thread Nicolai Hess
Arrg, sorry Yuri, this (too) isn't from QualityAssistance, but DependencyAnalyzer 2015-09-16 15:05 GMT+02:00 Nicolai Hess : > 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). > > There are currently

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-16 Thread Thierry Goubier
2015-09-16 15:05 GMT+02:00 Nicolai Hess : > 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

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-16 Thread Thierry Goubier
Argh, sent too early: self new color: Color red; yourself est bien une cascade, non? Thierry 2015-09-16 15:12 GMT+02:00 Thierry Goubier : > > > 2015-09-16 15:05 GMT+02:00 Nicolai Hess : > >> OK, I think Sven is right and a cascade needs at least one message send >> >> "self ; yourself" >> >>

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-16 Thread Christophe Demarey
The PackageAnalyzer is now maintained by me (especially because it is so usefull for the bootstrap). I just fixed that. Indeed, the code was wrong. Christophe Le 16 sept. 2015 à 15:05, Nicolai Hess a écrit : > OK, I think Sven is right and a cascade needs at least one message send > > "self ;

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-16 Thread Ben Coman
On Wed, Sep 16, 2015 at 4:56 PM, Nicolai Hess wrote: > 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 -> ;

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-16 Thread John Brant
On 9/16/2015 10:34 AM, Ben Coman wrote: On Wed, Sep 16, 2015 at 4:56 PM, Nicolai Hess wrote: 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

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-17 Thread Nicolai Hess
2015-09-17 1:18 GMT+02:00 John Brant : > On 9/16/2015 10:34 AM, Ben Coman wrote: > >> On Wed, Sep 16, 2015 at 4:56 PM, Nicolai Hess wrote: >> >>> The following method compiles with Opal: >>> >>> createRedMorph >>> ^ (self new color:Color red); yourself >>> >>> but gives a syntax error with t

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-17 Thread Nicolai Hess
2015-09-16 15:14 GMT+02:00 Thierry Goubier : > 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 " ; yoursel

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-17 Thread Thierry Goubier
2015-09-17 9:10 GMT+02:00 Nicolai Hess : > > > 2015-09-16 15:14 GMT+02:00 Thierry Goubier : > >> 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

Re: [Pharo-dev] SyntaxError: parentheses; cascades and yourself (Opal vs. old compilers parser)

2015-09-17 Thread Sven Van Caekenberghe
> On 17 Sep 2015, at 09:32, Thierry Goubier wrote: > > > > 2015-09-17 9:10 GMT+02:00 Nicolai Hess : > > > 2015-09-16 15:14 GMT+02:00 Thierry Goubier : > Argh, sent too early: > > self new color: Color red; yourself > > est bien une cascade, non? > > Yes, but in > > (self new color: Colo