The Trunk: Compiler-ct.537.mcz

[email protected]
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Christoph Thiede uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-ct.537.mcz

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

Name: Compiler-ct.537
Author: ct
Time: 28 August 2026, 10:56:42.607275 pm
UUID: 835a2b7e-ca7a-4ede-bbbf-d8e2618c569e
Ancestors: Compiler-mt.536

Adds another required encoder stub for Parser>>parseMessage:.

=============== Diff against Compiler-mt.536 ===============

Item was changed:
  ----- Method: Parser>>parseMessage: (in category 'public access') -----
  parseMessage: aString
  	"Do a better job of finding a selector in a string by using the parser
  	 in a cut-down mode which fakes node construction. This can be used
  	 by String>>#findSelector.
  
  	Answer a symbol or nil which should be the oputermost message send in aString
  	depending on whether the parser could make sense of the fragment or not."
  	| constructor position |
  	self
  		init: (ReadStream on: aString asString)
  		cue: (CompilationCue source: aString)
  		failBlock: [^nil].
  	constructor := DecompilerConstructor new.
  	[position := source position.
  	 [self messagePart: 3 repeat: false]
  			on: MessageNotUnderstood
  			do: [:ex|
  				ex resume:
  					(ex message selector
  						caseOf: {
  							[#encodeVariable:] -> [VariableNode new name: ex message argument].
  							[#encodeVariable:sourceRange:ifUnknown:] -> [VariableNode new name: ex message argument].
  							[#encodeLiteral:] -> [constructor codeAnyLiteral: ex message argument].
  							[#encodeSelector:] -> [constructor codeAnySelector: ex message argument].
  							[#cantStoreInto:] -> [false].
  							[#isFutureNode] -> [false].
  							[#supportsFullBlocks] -> [false].
  							[#bindBlockArg:within:] -> [nil].
+ 							[#bindBlockTemp:within:] -> [nil].
  							[#noteSourceRange:forNode:] -> [nil].
  							[#sourceRangeFor:] -> [nil].
  							[#scope:] -> [nil] }
  						otherwise: [ex pass])].
  		(hereChar == DoItCharacter and: [hereType == #doIt])
  		 or: [hereType == #period
  		 or: [source position = position]]] whileFalse.
  	^(parseNode notNil and: [parseNode isMessageNode]) ifTrue:
  		[parseNode selector key]
  
  	"Parser new parseMessage: (Parser sourceCodeAt: #parseMessage:) asString"
  	"Parser new parseMessage: ((Parser sourceCodeAt: #parseMessage:) asString allButFirst: 380)"!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.