allowUnderscoreAssignment is not functional

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

allowUnderscoreAssignment is not functional

Alain Plantec-4
Hi all,
maybe I've missed something but whatever value is set to this preference,
the result is that underscore is always allowed.

Note that it is used by the scanner:
Scanner>>xUnderscore
    Preferences allowUnderscoreAssignment ifFalse:[^self xIllegal].
    self step.
    tokenType := #leftArrow.
    ^token := #':='

The question behind is do we keep this preference ?

Cheers
Alain

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: allowUnderscoreAssignment is not functional

Lukas Renggli
Yes, that we noticed too. This method is never called.

Lukas

2009/12/4 Alain Plantec <[hidden email]>:

> Hi all,
> maybe I've missed something but whatever value is set to this preference,
> the result is that underscore is always allowed.
>
> Note that it is used by the scanner:
> Scanner>>xUnderscore
>    Preferences allowUnderscoreAssignment ifFalse:[^self xIllegal].
>    self step.
>    tokenType := #leftArrow.
>    ^token := #':='
>
> The question behind is do we keep this preference ?
>
> Cheers
> Alain
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: allowUnderscoreAssignment is not functional

Stéphane Ducasse
In reply to this post by Alain Plantec-4
what are the pros and cons?
I would like to avoid to have _ in the code
but this is good to let people load their code.
So I would keep it and make it work.

Stef

On Dec 4, 2009, at 9:40 AM, Alain Plantec wrote:

> Hi all,
> maybe I've missed something but whatever value is set to this preference,
> the result is that underscore is always allowed.
>
> Note that it is used by the scanner:
> Scanner>>xUnderscore
>    Preferences allowUnderscoreAssignment ifFalse:[^self xIllegal].
>    self step.
>    tokenType := #leftArrow.
>    ^token := #':='
>
> The question behind is do we keep this preference ?
>
> Cheers
> Alain
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project