[squeak-dev] Syntax error in MC package (_ problem?)
Ross Boylan
ross at biostat.ucsf.edu
Sun Sep 20 03:00:56 UTC 2009
I tried to load SoundsLike-RJT.2 from
MCHttpRepository
location: 'http://www.squeaksource.com/SoundsLike'
user: ''
password: ''
and got a syntax error in the imported code. There doesn't appear to be
any way to proceed.
The error show in the method pane like this:
testProcessCxNothing more expected ->_1
dmsc inputKey: 'abcdefg'.
self should: [ dmsc inputKey = 'ABCDEFG' ].
I think the problem is that the method is called
testProcessCx_1
and the underscore is getting interpreted as assignment.
This raises a couple of issues. I'm in a squeak3.10 image.
First, can I do something so that _ will be accepted as a regular
character, at least for the import and perhaps beyond? I ran into this
earlier; I wanted to use _ as a way of indicating a method was private
(e.g., _foo is for consumption of the class only), and that didn't work.
Second, what is the preferred way to indicate assignment, _ or := ?
In the past, I remember _ was automatically converted to := if you typed
it, but this is not happening any more.
Third, given something in squeaksource that needs a fix up, how does one
do that? This is not a question about how to edit the code once I have
a hold of it; it is a question about everything that surrounds that. I
noticed when I tried to browse the package that things looked odd; I
suspect this also resulted from the parse failure. It looks as if I do
have the mcz file in my package-cache, but I'm not sure how to make a
new one. I also am not sure if uploading the fixed version to
squeaksource is advisable, or even possible.
Thanks.
Ross Boylan
More information about the Squeak-dev
mailing list
|