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

commits at source.squeak.org commits at source.squeak.org
Fri Nov 27 22:14:47 UTC 2009


Nicolas Cellier uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-nice.99.mcz

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

Name: Compiler-nice.99
Author: nice
Time: 27 November 2009, 11:14:24 am
UUID: ddf7600a-55a4-4d6f-964a-14a5301a415d
Ancestors: Compiler-nice.98

rename scanLitByte -> scanLitByteVec as suggested by Eliot

=============== Diff against Compiler-nice.98 ===============

Item was changed:
  ----- Method: Scanner>>xLitQuote (in category 'multi-character scans') -----
  xLitQuote
  	"Symbols and vectors: #(1 (4 5) 2 3) #ifTrue:ifFalse: #'abc'."
  	| start |
  	start := mark.
  	self step. "litQuote"
  	self scanToken.
  	tokenType = #leftParenthesis
  		ifTrue: [self scanToken; scanLitVec.
  			mark := start + 1.
  			tokenType == #doIt
  				ifTrue: [self offEnd: 'Unmatched parenthesis']]
  		ifFalse: [tokenType = #leftBracket
+ 				ifTrue: [self scanToken; scanLitByteVec.
- 				ifTrue: [self scanToken; scanLitByte.
  					mark := start + 1.
  					tokenType == #doIt
  						ifTrue: [self offEnd: 'Unmatched bracket']]
  				ifFalse: [(#(#word #keyword #colon ) includes: tokenType)
  						ifTrue: [self scanLitWord]
  						ifFalse: [tokenType == #literal
  								ifTrue: [token isSymbol
  										ifTrue: ["##word"
  											token := token
  											"May want to move toward ANSI
  											here "]]
  								ifFalse: [tokenType == #string
  										ifTrue: [token := token asSymbol]]]]].
  	mark := start.
  	tokenType := #literal
  
  	"#(Pen)
  	#Pen
  	#'Pen'
  	##Pen
  	###Pen
  	"!

Item was added:
+ ----- Method: Scanner>>scanLitByteVec (in category 'expression types') -----
+ scanLitByteVec
+ 	| stream |
+ 	stream := (ByteArray new: 16) writeStream.
+ 	[ tokenType = #rightBracket or: [ tokenType = #doIt ] ] whileFalse: [
+ 		tokenType = #word
+ 			ifTrue: [ self scanLitWord ].
+ 		(token isInteger and: [ token between: 0 and: 255 ])
+ 			ifFalse: [ ^ self offEnd: '8-bit integer or right bracket expected' ].
+ 		stream nextPut: token.
+ 		self scanToken ].
+ 	token := stream contents!

Item was removed:
- ----- Method: Scanner>>scanLitByte (in category 'expression types') -----
- scanLitByte
- 	| stream |
- 	stream := (ByteArray new: 16) writeStream.
- 	[ tokenType = #rightBracket or: [ tokenType = #doIt ] ] whileFalse: [
- 		tokenType = #word
- 			ifTrue: [ self scanLitWord ].
- 		(token isInteger and: [ token between: 0 and: 255 ])
- 			ifFalse: [ ^ self offEnd: '8-bit integer or right bracket expected' ].
- 		stream nextPut: token.
- 		self scanToken ].
- 	token := stream contents!




More information about the Squeak-dev mailing list