Skip to content

Commit

Permalink
Revert "Backport heredoc quote language fix to legacy grammer"
Browse files Browse the repository at this point in the history
This reverts commit 0cdf433.

This was responsible for #5321
not the libuv update.
  • Loading branch information
lizmat committed Jul 25, 2023
1 parent 56bfa92 commit babce6b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Perl6/Grammar.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ role STD {
@keybits.push($_);
}
for @extra_tweaks {
@keybits.push($_[0] eq 'to'
?? 'HEREDOC' # all heredocs share the same lang
!! $_[0] ~ '=' ~ $_[1] # cannot use nqp::join as [1] is Bool
);
if $_[0] eq 'to' {
return 'NOCACHE';
}
@keybits.push($_[0] ~ '=' ~ $_[1]);
}
nqp::join("\0", @keybits)
}
Expand Down Expand Up @@ -111,10 +111,9 @@ role STD {
my $key := lang_key();
my %quote_lang_cache := $*W.quote_lang_cache;
nqp::lock($quote-lang-lock);
my $quote_lang := nqp::ifnull(
nqp::atkey(%quote_lang_cache,$key),
nqp::bindkey(%quote_lang_cache,$key,con_lang())
);
my $quote_lang := nqp::existskey(%quote_lang_cache, $key) && $key ne 'NOCACHE'
?? %quote_lang_cache{$key}
!! (%quote_lang_cache{$key} := con_lang());
nqp::unlock($quote-lang-lock);
$quote_lang.set_package(self.package);
$quote_lang;
Expand Down

0 comments on commit babce6b

Please sign in to comment.