Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing interpolation in postcircumfix error message #5991

Closed
p6rt opened this issue Jan 7, 2017 · 4 comments
Closed

missing interpolation in postcircumfix error message #5991

p6rt opened this issue Jan 7, 2017 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jan 7, 2017

Migrated from rt.perl.org#130528 (status was 'resolved')

Searchable as RT130528$

@p6rt
Copy link
Author

p6rt commented Jan 7, 2017

From @gfldex

sub postcircumfix​:«> <»($a){}; loop (my $i=0;$i>10;$i++) {};

# OUTPUT«===SORRY!=== Error while compiling <tmp>␤Unable to parse expression in postcircumfix​:sym«> <»; couldn't find final $stopper ␤at <tmp>​:1␤------> rcumfix​:«> <»($a){}; loop (my $i=0;$i>10⏏;$i++) {};␤ expecting any of​:␤ s…»

# `final $stopper` should say `<`

@p6rt
Copy link
Author

p6rt commented Sep 1, 2017

From @skids

On Sat, 07 Jan 2017 11​:33​:55 -0800, gfldex wrote​:

sub postcircumfix​:«> <»($a){}; loop (my $i=0;$i>10;$i++) {};

# OUTPUT«===SORRY!=== Error while compiling <tmp>␤Unable to parse
expression in postcircumfix​:sym«> <»; couldn't find final $stopper ␤at
<tmp>​:1␤------> rcumfix​:«> <»($a){}; loop (my $i=0;$i>10⏏;$i++) {};␤
expecting any of​:␤ s…»

# `final $stopper` should say `<`

From the perspective of the guts behind it, this behavior is correct,
as vars in rx "do not interpolate" and the rx engine resolves them
later when needed. In a situation where you were using these guts and
passed them a terminator in a variable, you'd want the error message
to tell you what variable you passed it in with.

However, since the particular case here is used as an example in S05, and
it is only the way rakudo chose to use those guts internally that causes this
deviation, it was worth bodging around.

Fix committed in rakudo 909688953.
Tests commited in roast 2cef80a32.

Closing.

@p6rt
Copy link
Author

p6rt commented Sep 1, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 1, 2017

@skids - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant