[Newcompiler] SmaCCError reported at the wrong place

Mathieu Suen mathieusuen at yahoo.fr
Tue Oct 3 17:49:19 UTC 2006


Hi,

I have noticed that SmaCCError wasn't notify at the right place in th Workspace and whenever you do
a doIt or inspectIt...

So I propose a patch. See attached file

Do you want me to report the bug to mantis?

The patch is not really pretty but unless it solve the problem.

	Math
-------------- next part --------------
'From Squeak3.9gamma of ''23 July 2006'' [latest update: #7061] on 3 October 2006 at 7:39:39 pm'!

!Parser2 methodsFor: 'error handling' stamp: 'ms 10/3/2006 19:39'!
notify: string at: location

	| startLocation |
	requestor isNil
		ifTrue: [SyntaxError 
					errorInClass: (self classEncoding ifNil: [FakeClassPool])
					withCode: 
						(source contents
							copyReplaceFrom: location
							to: location - 1
							with: string , ' ->')
					doitFlag: doitFlag]
		ifFalse: [startLocation := requestor text asString findString: source contents.
				requestor
					notify: string , ' ->'
					at: location + startLocation - 1
					in: source].
	^self fail! !


More information about the Newcompiler mailing list