[squeak-dev] The Trunk: Compiler-ct.408.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 6 06:52:58 UTC 2019


Marcel Taeumel uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-ct.408.mcz

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

Name: Compiler-ct.408
Author: ct
Time: 5 August 2019, 10:13:08.981062 am
UUID: 0db6fa4c-67f3-8b41-bd96-8448b090eb58
Ancestors: Compiler-mt.407

Always quote parser error notifications (also in interactive mode)

Pretty-print #notify:at: and remove useless (?) asText conversion

=============== Diff against Compiler-mt.407 ===============

Item was changed:
  ----- Method: Parser>>notify:at: (in category 'error handling') -----
+ notify: string at: location 
+ 	| messageText |
+ 	messageText := '"' , string , ' ->"'.
- notify: string at: location
  	cue requestor isNil
+ 		ifTrue: [
+ 			| notification |
+ 			(encoder == self or: [encoder isNil])
+ 				ifTrue: [^ self fail "failure setting up syntax error"].
- 		ifTrue: [| notification |
- 			(encoder == self or: [encoder isNil]) ifTrue: [^ self fail  "failure setting up syntax error"].
  			(notification := SyntaxErrorNotification
+ 				inClass: encoder classEncoding
+ 				withCode: (source contents asText
+ 					copyReplaceFrom: location
+ 					to: location - 1
+ 					with: messageText)
+ 				doitFlag: doitFlag
+ 				errorMessage: string
+ 				location: location) signal.
- 					inClass: encoder classEncoding
- 					withCode: 
- 						(source contents asText
- 							copyReplaceFrom: location
- 							to: location - 1
- 							with: (('"', string , ' ->"') asText))
- 					doitFlag: doitFlag
- 					errorMessage: string
- 					location: location) signal.
  			notification tryNewSourceIfAvailable]
  		ifFalse: [cue requestor
+ 			notify: messageText
+ 			at: location
+ 			in: source].
+ 	^ self fail!
- 					notify: string , ' ->'
- 					at: location
- 					in: source].
- 	^self fail!



More information about the Squeak-dev mailing list