[squeak-dev] The Inbox: Compiler-ct.404.mcz
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Mon Jun 17 21:03:12 UTC 2019
+1
Le lun. 17 juin 2019 à 22:51, <commits at source.squeak.org> a écrit :
> A new version of Compiler was added to project The Inbox:
> http://source.squeak.org/inbox/Compiler-ct.404.mcz
>
> ==================== Summary ====================
>
> Name: Compiler-ct.404
> Author: ct
> Time: 17 June 2019, 10:51:02.869037 pm
> UUID: 19e019f5-3ff6-0143-926d-e29c155cc4be
> Ancestors: Compiler-eem.403
>
> Fix a defect in Parser>>#parseCue:noPattern:ifFail:
>
> Full failure case description:
>
> Run the following statement:
> Compiler evaluate: ''''''''
> In the appearing error window, enter any valid smalltalk expression and
> save it. Before loading this commit, it will give you a NonBooleanError as
> doItFlag was set too late (and so was not passed 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
> !
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190617/3a4b6497/attachment.html>
More information about the Squeak-dev
mailing list
|