The Trunk: Compiler-ct.407.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Compiler-ct.407.mcz

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

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

Name: Compiler-ct.407
Author: ct
Time: 30 June 2019, 2:10:51.53343 pm
UUID: 63066cad-d45d-6a42-a0fa-c39e18b44ae6
Ancestors: Compiler-ct.406

Fix SyntaxErrorNotification coverage (see example in http://forum.world.st/The-Inbox-Compiler-ct-404-mcz-tp5100414p5100430.html)

=============== 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 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]
- [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 changed:
  ----- Method: SyntaxErrorNotification>>messageText (in category 'accessing') -----
  messageText
  ^ super messageText
+ ifEmpty: [messageText := code]!
- ifNil: [messageText := code]!

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