[squeak-dev] The Inbox: Compiler-eem.243.mcz

commits at source.squeak.org commits at source.squeak.org
Wed May 22 21:36:01 UTC 2013


A new version of Compiler was added to project The Inbox:
http://source.squeak.org/inbox/Compiler-eem.243.mcz

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

Name: Compiler-eem.243
Author: eem
Time: 14 November 2012, 11:54:44.286 pm
UUID: e2c4d1ed-4a14-4481-b887-dae54eecf492
Ancestors: Compiler-eem.242

Use a smaller hammer to crack the same tiny nut.

=============== Diff against Compiler-eem.242 ===============

Item was changed:
  ----- Method: Parser>>pragmaLiteral: (in category 'pragmas') -----
  pragmaLiteral: selectorSoFar
  	"Read a pragma literal.  As a nicety we allow a variable name (rather
  	 than a literal string) as the second argument to primitive:error:"
  
  	(hereType == #string or: [ hereType == #literal or: [ hereType == #number or: [ hereType == #character ] ] ])
  		ifTrue: [ ^ self advance ].
  	(here == $# and: [ tokenType == #word ])
  		ifTrue: [ ^ self advance ].
  	(here == #- and: [ tokenType == #number ])
  		ifTrue: [ ^ (self advance; advance) negated ].
  	(here = 'true' or: [ here = 'false' or: [ here = 'nil' ] ])
+ 		ifTrue: [ ^ (Scanner new scanTokens: self advance) first ].
- 		ifTrue: [ ^ Compiler evaluate: self advance ].
  	"This nicety allows one to supply a primitive error
  	 temp as a variable name, rather than a string."
  	((selectorSoFar beginsWith: 'primitive:')
  	 and: [(selectorSoFar endsWith: 'error:')
  	 and: [hereType == #word]]) ifTrue:
  		[^self advance].
  	^self expected: 'Literal constant'!



More information about the Squeak-dev mailing list