[squeak-dev] The Trunk: Compiler-ct.466.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 3 16:59:29 UTC 2022


Christoph Thiede uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-ct.466.mcz

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

Name: Compiler-ct.466
Author: ct
Time: 3 January 2022, 5:59:21.929703 pm
UUID: 22900e61-c1eb-914e-be93-b57e0e7901fd
Ancestors: Compiler-eem.465, Compiler-ct.421

Recategorizations and multilingual improvements.

=============== Diff against Compiler-eem.465 ===============

Item was changed:
  ----- Method: AmbiguousSelector>>openMenuIn: (in category 'handling') -----
  openMenuIn: aBlock 
  	"Ask the user which selector to choose.
  	Answer the choosen selector or nil if cancellation is requested."
  	
  	| labels actions lines caption choice |
  	labels := {
+ 		('selector is {1} and argument is negative' translated format: {name copyFrom: 1 to: name size - 1}).
+ 		('selector is {1} and argument is positive' translated format: {name}).
+ 		'cancel' translated}.
- 		'selector is ' , (name copyFrom: 1 to: name size - 1) , ' argument is negative'.
- 		'selector is ' , name , ' argument is positive'.
- 		'cancel'}.
  	actions := {
  		name copyReplaceFrom: name size to: name size - 1 with: ' '.
  		name copyReplaceFrom: name size + 1 to: name size with: ' '.
  		nil.
  	}.
  	lines := {2}.
+ 	caption := 'Ambiguous selector: {1} please correct, or cancel:' translated format: {name}.
- 	caption := 'Ambiguous selector: ' , name , ' please correct, or cancel:'.
  	choice := aBlock value: labels value: lines value: caption.
  	self resume: (actions at: choice ifAbsent: [nil])!

Item was changed:
+ ----- Method: AmbiguousSelector>>setName:range: (in category 'initialization') -----
- ----- Method: AmbiguousSelector>>setName:range: (in category 'private') -----
  setName: aString range: anInterval 
  	name := aString.
  	interval := anInterval!

Item was changed:
+ ----- Method: OutOfScopeNotification>>defaultAction (in category 'priv handling') -----
- ----- Method: OutOfScopeNotification>>defaultAction (in category 'as yet unclassified') -----
  defaultAction
  
  	^false!

Item was changed:
+ ----- Method: ParserNotification class>>name: (in category 'instance creation') -----
- ----- Method: ParserNotification class>>name: (in category 'as yet unclassified') -----
  name: aString
  	^ (self new setName: aString) signal!

Item was changed:
+ ----- Method: ParserNotification>>setName: (in category 'initialization') -----
- ----- Method: ParserNotification>>setName: (in category 'private') -----
  setName: aString
  	name := aString!

Item was changed:
+ ----- Method: UndeclaredVariable>>openMenuIn: (in category 'handling') -----
- ----- 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 
  		ifTrue: 
+ 			[labels add: 'declare method temp' translated.
- 			[labels add: 'declare method temp'.
  			actions add: [parser declareTemp: name at: #method].
+ 			labels add: 'declare block-local temp' translated.
- 			labels add: 'declare block-local temp'.
  			actions add: [parser declareTemp: name at: #block].
  			parser canDeclareInstanceVariable 
  				ifTrue: 
+ 					[labels add: 'declare instance' translated.
- 					[labels add: 'declare instance'.
  					actions add: [parser declareInstVar: name]]]
  		ifFalse: 
+ 			[labels add: 'define new class' translated.
- 			[labels add: 'define new class'.
  			actions add: [parser defineClass: name].
+ 			labels add: 'declare global' translated.
- 			labels add: 'declare global'.
  			actions add: [parser declareGlobal: name].
  			parser canDeclareClassVariable 
  				ifTrue: 
+ 					[labels add: 'declare class variable' translated.
- 					[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]].
  	lines add: labels size.
+ 	labels add: 'cancel' translated.
+ 	caption := 'Unknown variable: {1}!! please correct, or cancel:' translated format: {name}.
- 	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])!

Item was changed:
+ ----- Method: UndeclaredVariable>>setParser:name:range: (in category 'initialize-release') -----
- ----- Method: UndeclaredVariable>>setParser:name:range: (in category 'as yet unclassified') -----
  setParser: aParser name: aString range: anInterval 
  	parser := aParser.
  	name := aString.
  	interval := anInterval!

Item was changed:
+ ----- Method: UndefinedVariable>>openMenuIn: (in category 'handling') -----
- ----- Method: UndefinedVariable>>openMenuIn: (in category 'as yet unclassified') -----
  openMenuIn: aBlock
  
  	self resume: (Project uiManager
  		confirm: ('{1} appears to be undefined at this point.\Proceed anyway?' withCRs translated asText
  			format: {name asText allBold})
  		orCancel: [false]
  		title: 'Undefined Variable' translated).!

Item was changed:
+ ----- Method: UnknownSelector>>openMenuIn: (in category 'handling') -----
- ----- Method: UnknownSelector>>openMenuIn: (in category 'as yet unclassified') -----
  openMenuIn: aBlock
  	| alternatives labels lines caption choice |
  	alternatives := Symbol possibleSelectorsFor: name.
  	labels := Array streamContents:
  				[:s | s nextPut: name; nextPutAll: alternatives].
  	lines := {1. alternatives size + 1}.
+ 	caption := 'Unknown selector, please\confirm, correct, or cancel' translated withCRs.
- 	caption := 'Unknown selector, please\confirm, correct, or cancel' withCRs.
  	
  	choice := aBlock value: labels value: lines value: caption.
  	
  	choice = 0 ifTrue: [^ self resume: nil].
  	choice = 1 ifTrue: [^ self resume: name asSymbol].
  	self resume: (alternatives at: choice - 1)!



More information about the Squeak-dev mailing list