[squeak-dev] Re: question on Parser>>pattern:inContext: and
eliot.miranda at gmail.com
Thu Jun 26 01:08:08 UTC 2008
I should say that this is in a 3.8 Croquet (actually Qwaq) image.
On Wed, Jun 25, 2008 at 5:54 PM, Eliot Miranda <eliot.miranda at gmail.com>
> Hi All,
> I noticed when merging the base and Tweak compilers that Andreas wrote
> different versions of Parser>>method:context:encoder: and
> Parser>>pattern:inContext: for the Tweak compiler (in CParser) that "do the
> right thing". His versions in CParser bind the arguments in
> pattern:inContext: as each arg name is encountered. The versions in Parser
> bind the arguments in Parser>>method:context:encoder: all in one go *after*
> pattern:inContext: has parsed all arguments. This means that if there is an
> error (e.g. use the same arg name twice) the Parser methods insert the error
> at the wrong point since prevMark is now always pointing to the last
> argument not necessarily to the argument that is repeated.
> yes, you guessed it I just repeated an argument name and was confused as
> hell for a while since the damn compiler pointed to the error at the wrong
> So I clearly want to replace the methods in Parser with Andreas' mo' betta
> ones in CParser. The annoying question is why did anyone change the
> original Parser methods to do the wrong thing in the first place? Until I
> know that I have a nagging doubt that I'm missing something.
> I've gone through the update history up to version 3.6 and don't see the
> new behaviour in Parser in any update there-in. Anyone know why this
> changed or can point me to where to look next?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev