[squeak-dev] The Inbox: Compiler-ct.404.mcz
Christoph Thiede
christoph.thiede at outlook.de
Tue Jun 18 07:06:49 UTC 2019
PS: I also wondered why SyntaxErrorNotification does not override #isResumable ...
________________________________
From: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> on behalf of Christoph Thiede <christoph.thiede at outlook.de>
Sent: Tuesday, June 18, 2019 9:02:58 AM
To: squeak-dev at lists.squeakfoundation.org
Subject: Re: [squeak-dev] The Inbox: Compiler-ct.404.mcz
Hi Marcel,
I recently wrote a similar extension method for own purposes:
resumeWithSource: aString
self
reparse: aString notifying: nil ifFail: nil;
resumeUnchecked: self defaultResumeValue
But it does have a different semantic than #retryUsing, which usually takes
a block?
This will work for
[Compiler evaluate: '6 times 7']
on: SyntaxErrorNotification
do: [:ex | ex resumeWithSource: '6*7'].
but not for
[Compiler evaluate: '''''''']
on: SyntaxErrorNotification
do: [:ex | ex resumeWithSource: ''''''''''].
Changing #parseCue:noPattern:ifFail: so that the initializing calls are also
handled when raising ReparseSourceAfterEditing would solve the problem:
...
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)].
failBlock:= aBlock.
methNode := self method: noPattern context: cue context]
on: ReparseAfterSourceEditing
do: [ :ex | ...
However, would this be a good approach?
Best,
Christoph
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190618/fa24aa6f/attachment-0001.html>
More information about the Squeak-dev
mailing list
|