develooper Front page | perl.perl6.compiler | Postings from February 2018

[perl #130261] [LTA] Error message for unclosed curly quote pointsto the last line of the file

From:
Aleks-Daniel Jakimenko-Aleksejev via RT
Date:
February 3, 2018 22:23
Subject:
[perl #130261] [LTA] Error message for unclosed curly quote pointsto the last line of the file
Message ID:
rt-4.0.24-21004-1517696605-1819.130261-80-0@perl.org
Tests in
https://github.com/perl6/roast/commit/ceabda6337364b5f1cec3c1c5bcb89787f9bcedf

On 2018-01-08 15:18:46, alex.jakimenko@gmail.com wrote:
> Note that the error message is still LTA (says “corresponding starter”
> instead
> of mentioning “’”), for further progress see RT#125641.
>
> On 2018-01-08 15:16:47, alex.jakimenko@gmail.com wrote:
> > Ah. This was fixed. Here's the pull request:
> > https://github.com/rakudo/rakudo/pull/1183
> > And here's the right commit:
> >
>
https://github.com/rakudo/rakudo/pull/1183/commits/6542bb8032e7203b8736655075dbd3452856bc93
> >
> > There should be tests for this already, I think.
> >
> > On 2016-12-04 10:22:37, alex.jakimenko@gmail.com wrote:
> > > Code:
> > > say ‘hello';
> > > say 42;
> > > say 50;
> > >
> > > Result:
> > > == =SORRY!=== Error while compiling -e
> > > Unable to parse expression in smart single quotes; couldn't find
> > > final
> > > "’"
> > > at -e:3
> > > ------> say 50;⏏<EOL>
> > > expecting any of:
> > > argument list
> > > smart single quotes
> > > term
> > >
> > > While the error message is right, it would be better if it also
> > > printed some information on where the initial curly quote is. As an
> > > example, see what happens if you try to do the same thing with a
> > > multiline comment (RT #125247):
> > >
> > > Code:
> > > say #`‘hello';
> > > say 42;
> > > say 50;
> > >
> > > Result:
> > > == =SORRY!=== Error while compiling -e
> > > Couldn't find terminator ’ (corresponding ‘ was at line 1)
> > > at -e:3
> > > ------> say 50;⏏<EOL>
> > > expecting any of:
> > > ’




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About