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

commits at source.squeak.org commits at source.squeak.org
Thu Nov 21 15:23:57 UTC 2019


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

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

Name: Compiler-ct.405
Author: ct
Time: 29 June 2019, 11:38:21.90343 pm
UUID: 500db9b5-d4f6-c24e-8e91-fea4521def76
Ancestors: Compiler-ct.404

Add resumption logic to SyntaxErrorNotification

=============== Diff against Compiler-eem.403 ===============

Item was changed:
  ----- Method: Parser>>parseCue:noPattern:ifFail: (in category 'public access') -----
  parseCue: aCue noPattern: noPattern ifFail: aBlock 
  	"Answer a MethodNode for the argument, sourceStream, that is the root of
  	 a parse tree. Parsing is done with respect to the CompilationCue to 
  	 resolve variables. Errors in parsing are reported to the cue's requestor; 
  	 otherwise aBlock is evaluated. The argument noPattern is a Boolean that is
  	 true if the the sourceStream does not contain a method header (i.e., for DoIts)."
  
  	| methNode repeatNeeded myStream s p subSelection |
  	myStream := aCue sourceStream.
  	[repeatNeeded := false.
  	 p := myStream position.
  	 s := myStream upToEnd.
  	 myStream position: p.
  	
+ 	 doitFlag := noPattern.
  	 self encoder init: aCue notifying: self.
  	 self init: myStream cue: aCue failBlock: [^ aBlock value].
  	
  	 subSelection := self interactive and: [cue requestor selectionInterval = (p + 1 to: p + s size)].
  
- 	 doitFlag := noPattern.
  	 failBlock:= aBlock.
  	 [methNode := self method: noPattern context: cue context] 
  		on: ReparseAfterSourceEditing 
  		do:	[ :ex |
  			repeatNeeded := true.
  			properties := nil. "Avoid accumulating pragmas and primitives Number"
  			myStream := ex newSource 
  				ifNil: [subSelection
  							ifTrue:
  								[ReadStream
  									on: cue requestor text string
  									from: cue requestor selectionInterval first
  									to: cue requestor selectionInterval last]
  							ifFalse:
  								[ReadStream on: cue requestor text string]]
  				ifNotNil: [:src | myStream := src readStream]].
  	 repeatNeeded] whileTrue:
  		[encoder := self encoder class new].
  	methNode sourceText: s.
  	^methNode
  !

Item was added:
+ ----- Method: SyntaxErrorNotification>>isResumable (in category 'accessing') -----
+ isResumable
+ 
+ 	^ true!

Item was added:
+ ----- Method: SyntaxErrorNotification>>resume: (in category 'accessing') -----
+ resume: source
+ 
+ 	self reparse: source notifying: nil ifFail: nil.
+ 	^ super resumeUnchecked: self defaultResumeValue!



More information about the Squeak-dev mailing list