[squeak-dev] The Trunk: Compiler-eem.482.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Nov 23 15:41:00 UTC 2022


Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.482.mcz

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

Name: Compiler-eem.482
Author: eem
Time: 23 November 2022, 7:40:58.01402 am
UUID: 1f5e2fa1-d9fe-4cbc-9665-5be34958f925
Ancestors: Compiler-eem.481

But using selectors, not strings, makes the reference to these keywords more findable/less hidden.

=============== Diff against Compiler-eem.481 ===============

Item was changed:
  ----- Method: Parser>>primaryExpression (in category 'expression types') -----
  primaryExpression 
  	hereType == #word 
  		ifTrue: 
  			[parseNode := self variable.
  			(parseNode isUndefTemp
+ 			 and: [(#(ifNil: ifNotNil: isNil notNil) includes: here) not
- 			 and: [(#('ifNil:' 'ifNotNil:' 'isNil' 'notNil') includes: here) not
  			 and: [self interactive]])
  				ifTrue:
  					[self queryUndefined].
  			parseNode nowHasRef.
  			^ true].
  	hereType == #leftBracket
  		ifTrue: 
  			[self advance.
  			self blockExpression.
  			^true].
  	hereType == #leftBrace
  		ifTrue: 
  			[self braceExpression.
  			^true].
  	hereType == #leftParenthesis
  		ifTrue: 
  			[self advance.
  			self expression ifFalse: [^self expected: 'expression'].
  			(self match: #rightParenthesis)
  				ifFalse: [^self expected: 'right parenthesis'].
  			^true].
  	(hereType == #string or: [hereType == #number or: [hereType == #literal or: [hereType == #character]]])
  		ifTrue: 
  			[parseNode := encoder encodeLiteral: self advance.
  			^true].
  	(here == #- and: [tokenType == #number and: [1 + hereEnd = mark]])
  		ifTrue: 
  			[self advance.
  			parseNode := encoder encodeLiteral: self advance negated.
  			^true].
  	^false!



More information about the Squeak-dev mailing list