[squeak-dev] The Trunk: ShoutCore-ar.8.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Feb 20 01:06:37 UTC 2010

Andreas Raab uploaded a new version of ShoutCore to project The Trunk:

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

Name: ShoutCore-ar.8
Author: ar
Time: 19 February 2010, 5:06:21.526 pm
UUID: 4db9b039-f2d2-ba40-98b0-d23668f8239c
Ancestors: ShoutCore-nice.7

Allow shout to dynamically switch parsers when necessary (for example during debugging). Provide a hook that behaviors can implement to use an alternative shout parser class.

=============== Diff against ShoutCore-nice.7 ===============

Item was changed:
  ----- Method: SHTextStylerST80>>rangesIn:setWorkspace: (in category 'private') -----
  rangesIn: aText setWorkspace: aBoolean
  	"Answer a collection of SHRanges by parsing aText.
  	When formatting it is not necessary to set the workspace, and this can make the parse take less time, so aBoolean specifies whether the parser should be given the workspace"
+ 	| shoutParserClass |
+ 	"Switch parsers if we have to"
+ 	shoutParserClass := (classOrMetaClass ifNil:[Object]) shoutParserClass.
+ 	parser class = shoutParserClass ifFalse:[parser := shoutParserClass new].
- 	parser ifNil: [parser := SHParserST80 new].
  		rangesIn: aText asString 
  		classOrMetaClass: classOrMetaClass 
  		workspace: (aBoolean ifTrue:[workspace])  
  		environment: environment

Item was added:
+ ----- Method: Behavior>>shoutParserClass (in category '*ShoutCore-Parsing') -----
+ shoutParserClass
+ 	"Answer the parser class"
+ 	^SHParserST80!

More information about the Squeak-dev mailing list