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

commits at source.squeak.org commits at source.squeak.org
Tue Feb 23 13:44:47 UTC 2010

Nicolas Cellier uploaded a new version of Compiler to project The Trunk:

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

Name: Compiler-nice.119
Author: nice
Time: 23 February 2010, 2:44:50.52 pm
UUID: 88476d19-0098-e244-9ed8-14b04fe84dac
Ancestors: Compiler-ar.118

1) Connect Number class>>#readSqueakSyntaxFrom:
2) remove a now useless fixTemps

=============== Diff against Compiler-ar.118 ===============

Item was changed:
  ----- Method: Scanner>>xDigit (in category 'multi-character scans') -----
  	"Form a number."
  	tokenType := #number.
  	(aheadChar = 30 asCharacter and: [source atEnd
  			and:  [source skip: -1. source next ~= 30 asCharacter]])
  		ifTrue: [source skip: -1 "Read off the end last time"]
  		ifFalse: [source skip: -2].
+ 	token := [Number readSqueakSyntaxFrom: source] ifError: [:err :rcvr | self offEnd: err].
- 	token := [Number readFrom: source] ifError: [:err :rcvr | self offEnd: err].
  	self step; step!

Item was changed:
  ----- Method: UndeclaredVariable>>openMenuIn: (in category 'as yet unclassified') -----
  openMenuIn: aBlock 
  	| alternatives labels actions lines caption choice |
  	alternatives := parser possibleVariablesFor: name.
  	labels := OrderedCollection new.
  	actions := OrderedCollection new.
  	lines := OrderedCollection new.
  	name first isLowercase 
  			[labels add: 'declare temp'.
  			actions add: [parser declareTempAndPaste: name].
  			labels add: 'declare instance'.
  			actions add: [parser declareInstVar: name]]
  			[labels add: 'define new class'.
  			actions add: [parser defineClass: name].
  			labels add: 'declare global'.
  			actions add: [parser declareGlobal: name].
  			parser canDeclareClassVariable 
  					[labels add: 'declare class variable'.
  					actions add: [parser declareClassVar: name]]].
  	lines add: labels size.
  	alternatives do: 
  		[:each | 
  		labels add: each.
+ 		actions add: [parser substituteVariable: each atInterval: interval]].
- 		actions add: [parser substituteVariable: each atInterval: interval] fixTemps].
  	lines add: labels size.
  	labels add: 'cancel'.
  	caption := 'Unknown variable: ' , name , ' please correct, or cancel:'.
  	choice := aBlock value: labels value: lines value: caption.
  	self resume: (actions at: choice ifAbsent: [nil])!

More information about the Squeak-dev mailing list