I'm slightly confused by this ticket… isn't it resolved now? Nowadays you get
an error message like this:

Unable to parse expression in single quotes; couldn't find final "'"
(corresponding starter was at line 2)

So while it blows up at the end of the file, it still mentions where the quote
started. Sooo… fixed? I'm struggling to understand what these code samples were
supposed to demonstrate.

On 2010-06-07 14:23:47, cognominal wrote:
> I am probably a lousy programmer but I hit again and again that
> unhelpful message.
>
> How to reproduce :
>
> eval "{\n\n\n\n\'}"
>
> Unable to parse blockoid, couldn't find final '}' at line 1
>
> Note that the opening quotes are many lines below the start of the
> blockoid and there may be many statements between them.
> So the line number in the error is unhelpful.
>
> In the simplest case, the quote rules fails because the end of the
> file has been reached. I don't see the need
> to backtrack and to fail the blockoid.
>
> In more complicated cases, the quote rule reduces but it eats way more
> characters than the programmer intended
> inluding '}' chars that should terminate blockoids. The result is
> triggering the same message or some others. I don't know if there is a
> way to detect the true problem instead of emitting spurious messages.
> Probably we should indicate the
> reduced quotes involving many lines as suspicious when failing to
> reduce a blockoid. They are bad style anyway because
> heredocs are the preferred style for many lines quoted stuff. But
> heredocs are not implemented yet.
>
>
>
>
>

Reply via email to