[squeak-dev] The Trunk: System-dtl.1206.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Dec 22 04:34:13 UTC 2020


David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.1206.mcz

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

Name: System-dtl.1206
Author: dtl
Time: 21 December 2020, 11:34:09.218726 pm
UUID: f308632b-9f71-4f8d-8092-0b2a5a5ddf43
Ancestors: System-codefrau.1205

DoItFirst>>parse: fix a shadowed variable and provide better method comment

=============== Diff against System-codefrau.1205 ===============

Item was changed:
  ----- Method: DoItFirst>>parse: (in category 'evaluating') -----
  parse: argumentList
+ 	"Iterate over the argument list, creating actions blocks. Register each action
+ 	block in the actions dictionary, and collect a list of the actions blocks to be
+ 	evaluated now. If any action blocks will require files or directory initialization,
+ 	send the appropriate startUp messages. Answer the list of action blocks to
+ 	be evaluated."
- 	"Iterate over the argument list, adding action blocks to the actions dictionary.
- 	If any action blocks require files or directory initialization send the appropriate
- 	startUp message to do it now. Answer a list of option selectors that should be
- 	evaluated."
  
+ 	| args listOfBlocks needsFiles needsDirectory |
- 	| args actions needsFiles needsDirectory |
  	needsFiles := needsDirectory := false.
  	args := argumentList readStream.
+ 	listOfBlocks := OrderedCollection new.
- 	actions := OrderedCollection new.
  	[ args atEnd ] whileFalse: [ | key |
  		(key := self keyFor: args next) caseOf: {
+ 			[ #help ] -> [ self addFirst: [ self help ] to: listOfBlocks at: key. needsFiles := true] .
- 			[ #help ] -> [ self addFirst: [ self help ] to: actions at: key. needsFiles := true] .
  			[ #debug ] -> [ self addWithoutEvaluation: [ self debug ] at: key] .
+ 			[ #doit ] -> [ | list | list := self nextTokensFrom: args. self add:[ self doIt: list ] to: listOfBlocks at: key. needsFiles := true] .
+ 			[ #evaluate ] -> [ | arg | arg := args next.  self add:[ self evaluateOption: arg ] to: listOfBlocks at: key. needsFiles := true] .
+ 			[ #file ] -> [ | arg | arg := args next.  self add:[ self evaluateFileContents: arg ] to: listOfBlocks at: key. needsFiles := true] .
+ 			[ #filein ] -> [ | list | list := self nextTokensFrom: args. self add:[ self fileIn: list ] to: listOfBlocks at: key. needsFiles := needsDirectory := true] .
+ 			[ #cwd ] -> [ | arg | arg := args next.  self addFirst:[ self cwd: arg ] to: listOfBlocks at: key. needsFiles := needsDirectory := true] .
- 			[ #doit ] -> [ | list | list := self nextTokensFrom: args. self add:[ self doIt: list ] to: actions at: key. needsFiles := true] .
- 			[ #evaluate ] -> [ | arg | arg := args next.  self add:[ self evaluateOption: arg ] to: actions at: key. needsFiles := true] .
- 			[ #file ] -> [ | arg | arg := args next.  self add:[ self evaluateFileContents: arg ] to: actions at: key. needsFiles := true] .
- 			[ #filein ] -> [ | list | list := self nextTokensFrom: args. self add:[ self fileIn: list ] to: actions at: key. needsFiles := needsDirectory := true] .
- 			[ #cwd ] -> [ | arg | arg := args next.  self addFirst:[ self cwd: arg ] to: actions at: key. needsFiles := needsDirectory := true] .
  		} otherwise: [] ].
  	needsFiles ifTrue: [ FileStream startUp: true. "initialize stdout and stderr" ].
  	needsDirectory ifTrue: [ FileDirectory startUp "set default directory" ].
+ 	^ listOfBlocks.
- 	^ actions.
  !



More information about the Squeak-dev mailing list