[squeak-dev] Scanner>>xUnderscore vs xUnderscoreForTokenization

Eliot Miranda eliot.miranda at gmail.com
Fri May 21 17:35:27 UTC 2010


Hi Igor,

    I think you're misunderstanding what xUnderscoreForTokenization is for.
 One important use case is opening a ChangeList on a source file containing
assignment tokens which are different from your preferences.  If one
uses xUnderscore one will not be able to parse the file correctly as it will
raise errors via calling xIllegal.  xUnderscoreForTokenization however will
not cause an error and will simply create a token, be it from '_' or ':=',
allowing one to parse the file and therefore see it contains different
assignment symbols rather than having to infer from the flurry of errors.

So please, do not remove xUnderscoreForTokenization.  Its useful.  I use it
in places where I definitely do not want an error to be raised where
non-preferred assignment symbols could occur.  It is not used when compiling
source.

best
Eliot

On Thu, May 20, 2010 at 11:18 PM, Igor Stasenko <siguctua at gmail.com> wrote:

> Hello,
>
> it looks like xUnderscoreForTokenization is now redundant,
> because xUnderscore does the right thing, depending on preferences you set,
> while xUnderscoreForTokenization don't using a preferences and that's
> why you'll get a warnings
> when browsing a methods which having underscore in selectors.
>
> A proposed fix is to make
> Scanner>>initScannerForTokenization be a no-op.
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100521/506321a9/attachment.htm


More information about the Squeak-dev mailing list