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

Support heredoc opened inside the evaluation #2905

Open
hurricup opened this issue Sep 14, 2024 · 1 comment
Open

Support heredoc opened inside the evaluation #2905

hurricup opened this issue Sep 14, 2024 · 1 comment

Comments

@hurricup
Copy link
Collaborator

E.g.

use v5.10;

my $text = 'test';
$text =~ s/test/<<EOM/e;
outer test
EOM

say $text

This require mandatory sublexing of lazy elements, so not sure if this is good performance-wise

@hurricup hurricup changed the title Support heredoc opened inside the interpolation Support heredoc opened inside the evaluation Sep 14, 2024
@hurricup
Copy link
Collaborator Author

This sample works without parsing errors, but actually it is parsed incorrectly.

use v5.10;

say <<EOM;
outer ${\<<EM} text
INNER TEXT
EM
EOM

say $text

hurricup added a commit that referenced this issue Sep 14, 2024
Previously, we could find the heredoc terminator behind the end of the sublexed token and capture heredoc body longer than we should have.

Fixes #2846

See also: #2905
hurricup added a commit that referenced this issue Sep 14, 2024
Previously, we could find the heredoc terminator behind the end of the sublexed token and capture heredoc body longer than we should have.

Fixes #2846

See also: #2905
hybloid pushed a commit to hybloid/Perl5-IDEA that referenced this issue Sep 14, 2024
Previously, we could find the heredoc terminator behind the end of the sublexed token and capture heredoc body longer than we should have.

Fixes Camelcade#2846

See also: Camelcade#2905
hybloid pushed a commit to hybloid/Perl5-IDEA that referenced this issue Sep 14, 2024
Previously, we could find the heredoc terminator behind the end of the sublexed token and capture heredoc body longer than we should have.

Fixes Camelcade#2846

See also: Camelcade#2905
hybloid pushed a commit to hybloid/Perl5-IDEA that referenced this issue Sep 14, 2024
Previously, we could find the heredoc terminator behind the end of the sublexed token and capture heredoc body longer than we should have.

Fixes Camelcade#2846

See also: Camelcade#2905
hybloid pushed a commit to hybloid/Perl5-IDEA that referenced this issue Sep 14, 2024
Previously, we could find the heredoc terminator behind the end of the sublexed token and capture heredoc body longer than we should have.

Fixes Camelcade#2846

See also: Camelcade#2905
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant