[squeak-dev] another parser bug

Eliot Miranda eliot.miranda at gmail.com
Mon Jan 16 18:25:17 UTC 2023


Hi Florin,

On Thu, Jan 12, 2023 at 9:21 PM Florin Mateoc <florin.mateoc at gmail.com>
wrote:

> Hi Eliot,
>
> Thank you for the quick fix, but I have one more example of misbehavior
> when parsing comments. The issue is that the last period (or lack thereof)
> makes a difference with regards to associating the comment with the correct
> parse node.
>
> For example, when parsing:
>
> test
> true ifTrue: ["inner comment"] "outer comment"
>
> the parser associates both comments to the inside of the block, whereas if
> we include the period, like so:
>
> test
> true ifTrue: ["inner comment"]. "outer comment"
>
> it correctly leaves the inner comment inside and the outer comment outside
>

Given that period is a statement separator this is arguably correct.  Not
sure I want to try and fix this one.  But you're welcome to propose a fix
and I'll happily review it.

_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230116/26b62275/attachment.html>


More information about the Squeak-dev mailing list