[squeak-dev] The Trunk: Compiler-nice.138.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Apr 2 17:40:25 UTC 2010


Nicolas Cellier uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-nice.138.mcz

==================== Summary ====================

Name: Compiler-nice.138
Author: nice
Time: 2 April 2010, 7:40:24.521 pm
UUID: 15955722-1326-a940-9805-280830c59af6
Ancestors: Compiler-ar.137

Fix http://bugs.squeak.org/view.php?id=7491
Scanner new scanTokens: '1 at -1'.
=> Scanner doesNotUnderstand: #ambiguousSelector:inRange: 

=============== Diff against Compiler-ar.137 ===============

Item was changed:
  ----- Method: Parser>>ambiguousSelector:inRange: (in category 'error correction') -----
  ambiguousSelector: aString inRange: anInterval
  	| correctedSelector userSelection offset intervalWithOffset |
  	
  	self interactive ifFalse: [
  		"In non interactive mode, compile with backward comapatibility: $- is part of literal argument"
  		Transcript cr; store: encoder classEncoding; nextPutAll:#'>>';store: encoder selector; show: ' would send ' , token , '-'.
+ 		^super ambiguousSelector: aString inRange: anInterval].
- 		token := token asSymbol.
- 		^self].
  	
  	"handle the text selection"
  	userSelection := requestor selectionInterval.
  	intervalWithOffset := anInterval first + requestorOffset to: anInterval last + requestorOffset.
  	requestor selectFrom: intervalWithOffset first to: intervalWithOffset last.
  	requestor select.
  
  	"Build the menu with alternatives"
  	correctedSelector := AmbiguousSelector 
  			signalName: aString
  			inRange: intervalWithOffset.
  	correctedSelector ifNil: [^self fail].
  
  	"Execute the selected action"
  	offset := self substituteWord: correctedSelector wordInterval: intervalWithOffset offset: 0.
  	requestor deselect.
  	requestor selectInvisiblyFrom: userSelection first to: userSelection last + offset.
  	token := (correctedSelector readStream upTo: Character space) asSymbol!

Item was added:
+ ----- Method: Scanner>>ambiguousSelector:inRange: (in category 'error handling') -----
+ ambiguousSelector: aString inRange: anInterval
+ 	"Compile with backward compatibility: $- is part of literal argument.."
+ 	
+ 	token := token asSymbol.
+ 	^self!




More information about the Squeak-dev mailing list