SyntaxError [BUG]
Bob Arning
arning at charm.net
Tue May 11 02:58:47 UTC 1999
The method below sent #value to a Character which caused a walkback. Changing it to #asciiValue (2 places) took care of that. I also added a + 1 in one case since types now seems to be an Array rather than a Dictionary as the comment would indicate.
Cheers,
Bob
'From Squeak 2.4b of April 23, 1999 on 10 May 1999 at 10:16:02 pm'!
!SyntaxError methodsFor: 'initialization' stamp: 'RAA 5/10/1999 21:54'!
setClass: aClass code: aString debugger: aDebugger doitFlag: flag
| types printables badChar |
class _ aClass.
debugger _ aDebugger.
selector _ aClass parserClass new parseSelector: aString.
types _ Scanner classPool at: #TypeTable. "dictionary"
printables _ '!!@#$%&*-_=+<>{}?/\,*£¢§¶ªº--"'"'ÚæÚ¯¿«»`~`' asSet.
badChar _ aString detect: [:aChar | (types at: aChar asciiValue + 1) == #xBinary and: [
(printables includes: aChar) not]] ifNone: [nil].
contents _ badChar
ifNil: [aString]
ifNotNil: ['<<<This string contains a character (ascii value ',
badChar asciiValue printString,
') that is not normally used in code>>> ', aString].
category ifNil: [category _ aClass organization categoryOfElement: selector].
category ifNil: [category _ ClassOrganizer default].
doitFlag _ flag! !
More information about the Squeak-dev
mailing list
|