[squeak-dev] The Trunk: Kernel-nice.403.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Feb 23 13:39:48 UTC 2010

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

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

Name: Kernel-nice.403
Author: nice
Time: 23 February 2010, 2:39:40.246 pm
UUID: b3db5f5a-bd5e-ce46-965a-f108c7608d2a
Ancestors: Kernel-nice.402

1) Introduce a Number class>>#readSqueakSyntaxFrom:  for Compiler/Scanner. This will later enable introduction of extended for #readFrom:
2) Connect the hook for allowing leading + sign in Integer reading.

=============== Diff against Kernel-nice.402 ===============

Item was added:
+ ----- Method: Number class>>readSqueakSyntaxFrom: (in category 'instance creation') -----
+ readSqueakSyntaxFrom: stringOrStream 
+ 	"Answer a number as described on aStream.  The number may
+ 	be any accepted Smalltalk literal Number format.
+ 	It can include a leading radix specification, as in 16rFADE.
+ 	It can as well be NaN, Infinity or -Infinity for conveniency.
+ 	If stringOrStream does not start with a valid number description, fail."
+ 	^(SqNumberParser on: stringOrStream) nextNumber!

Item was changed:
  ----- Method: NumberParser>>nextIntegerBase:ifFail: (in category 'parsing-public') -----
  nextIntegerBase: aRadix ifFail: aBlock
+ 	"Form an integer with optional sign and following digits from sourceStream."
- 	"Form an integer with following digits"
  	| isNeg value |
+ 	isNeg := sourceStream peekSignIsMinus.
- 	isNeg := sourceStream peekFor: $-.
  	value := self nextUnsignedIntegerOrNilBase: aRadix.
  	value isNil ifTrue: [^aBlock value].
  		ifTrue: [value negated]
  		ifFalse: [value]!

More information about the Squeak-dev mailing list