The Trunk: Compiler-nice.123.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Compiler-nice.123.mcz

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

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

Name: Compiler-nice.123
Author: nice
Time: 25 February 2010, 2:12:07.522 am
UUID: 618554a7-dfec-f441-9383-e4da0a507ad0
Ancestors: Compiler-nice.122

Warn about ambiguous selector like @- in the Transcript when compiling in non interactive mode.

=============== Diff against Compiler-nice.122 ===============

Item was changed:
  ----- Method: Parser>>ambiguousSelector:inRange: (in category 'error correction') -----
  ambiguousSelector: aString inRange: anInterval
  | correctedSelector userSelection |
 
  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 , '-'.
  token := token asSymbol.
  ^self].
 
  "handle the text selection"
  userSelection := requestor selectionInterval.
  requestor selectFrom: anInterval first to: anInterval last.
  requestor select.
 
  "Build the menu with alternatives"
  correctedSelector := AmbiguousSelector
  signalName: aString
  inRange: anInterval.
  correctedSelector ifNil: [^self fail].
 
  "Execute the selected action"
  self substituteWord: correctedSelector wordInterval: anInterval offset: 0.
  requestor deselect.
  requestor selectInvisiblyFrom: userSelection first to: userSelection last + 1.
  token := (correctedSelector readStream upTo: Character space) asSymbol!