> On Mon, Jan 10, 2011 at 11:42 AM, Nicolas Cellier
> <
nicolas.cellier.aka.nice@gmail.com> wrote:
>>
>> Will it work ?
>>
>> because Compiler class>>new
>> � � � �^ super new parser: self parserClass new
>>
>> sets the parser ivar with Compiler parserClass new.
>> Maybe you'll need to remove this definition of new too.
>
> I think it works. �Behavior>>parser class gets compilerClass parserClass:
> Behavior>>parserClass
> "Answer a parser class to use for parsing method headers."
> ^self compilerClass parserClass
> So one is supposed to implement a Compiler subclass that defines a
> class-side parserClass method. �e.g.
> MySpecialClass>>compilerClass
> �� �^MySpecialCompiler
> MySpecialCompiler class>>parserClass
> �� �^MySpecialParser
> So then
> Compiler>>parserClass
> ^parser ifNil: [(class ifNil: [self class]) parserClass] ifNotNil: [parser
> class]
> will also find MySpecialParser.
> Yes, its heavyweight because the Compiler subclass isn't providing anything
> other than the reference to the parser. But that's the way the system is
> written so far.
> what do you think?
> best
> Eliot