Bug Report/ Bug Fix

John-Reed Maffeo (rlpa80) rlpa80 at email.sps.mot.com
Sat Feb 6 05:39:36 UTC 1999

I ran across a bug while filing in a program called Gnats.st
that I found on the UIUC Smalltalk Archive. There was an imbedded
exclamation point in the comment which appears at the head of
the file.

I don't know if this is the best way to fix the problem but it 
seems to work correctly.

Comments appreciated - I am but a lowly worm.

Best Regards,

John-Reed Maffeo
Mesa, AZ
Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="522A6368"; name="Parser-notifyat.st"
Content-Transfer-Encoding: 7bit
Content-Description: BBEdit Lite 3.0 Document
Content-Disposition: inline; filename="Parser-notifyat.st"

'From Squeak 2.3 of January 14, 1999 on 5 February 1999 at 10:27:04 pm'!

!Parser methodsFor: 'error handling' stamp: 'jrm 2/5/1999 21:19 Added test for encoder isNil.'!
notify: string at: location
	requestor isNil
		ifTrue: [(encoder == self or: [encoder isNil]) ifTrue: [^ self fail  "failure setting up syntax error"].
					errorInClass: encoder  classEncoding 
						(source contents
							copyReplaceFrom: location
							to: location - 1
							with: string , ' ->')
					doitFlag: doitFlag]
		ifFalse: [requestor
					notify: string , ' ->'
					at: location
					in: source].
	^self fail
! !

More information about the Squeak-dev mailing list