Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[GGE] Further adaptations to Rakudo master

- Worked around the lack of hash slices.

- s/continue/proceed/ inside a 'given' block.

- More gratuitious stringifications due to Regex::Match not being cool.
  • Loading branch information...
commit 3f4bdd40afa49896988c880547f52e3f37355ace 1 parent f958381
@masak authored
Showing with 12 additions and 6 deletions.
  1. +9 −3 lib/GGE/Exp.pm
  2. +3 −3 lib/GGE/Perl6Regex.pm
View
12 lib/GGE/Exp.pm
@@ -309,10 +309,13 @@ class GGE::Exp::Quant is GGE::Exp {
} ]], $replabel, $nextlabel, |%args);
}
when NONE() {
- %args<c C> = $code.unique(), '';
+ # RAKUDO: Hash slices not implemented yet
+ # %args<c C> = $code.unique(), '';
+ %args<c> = $code.unique();
+ %args<C> = '';
if self.hash-access('min') != 0
|| self.hash-access('max') != Inf {
- continue;
+ proceed;
}
$code.emit( q[[
when '%L' { # quant 0..Inf none
@@ -658,7 +661,10 @@ class GGE::Exp::CGroup is GGE::Exp::Group {
# RAKUDO: [perl #74454]
my %args = self.getargs($label, $next, {});
my ($captgen, $captsave, $captback) = self.gencapture($label);
- %args<c C> = self.hash-access('cutmark'), '### ';
+ # RAKUDO: Hash slices not implemented yet
+ # %args<c C> = self.hash-access('cutmark'), '### ';
+ %args<c> = self.hash-access('cutmark');
+ %args<C> = '### ';
%args<X> = self.hash-access('isscope') ?? '' !! '### ';
$code.emit( q[[
when '%L' { # capture
View
6 lib/GGE/Perl6Regex.pm
@@ -181,7 +181,7 @@ class GGE::Perl6Regex {
sub p6escapes($mob, :$pos! is copy) {
my $m = GGE::Match.new($mob);
- my $target = $m.target;
+ my $target = ~$m.target;
my $backchar = $target.substr($pos + 1, 1);
$pos += 2;
my $isbracketed = $target.substr($pos, 1) eq '[';
@@ -427,7 +427,7 @@ class GGE::Perl6Regex {
our sub parse_quoted_literal($mob) {
my $m = GGE::Exp::Literal.new($mob);
- my $target = $m.target;
+ my $target = ~$m.target;
my $lit = '';
my $pos = $mob.to;
until (my $char = $target.substr($pos, 1)) eq q['] {
@@ -584,7 +584,7 @@ class GGE::Perl6Regex {
our sub parse_modifier($mob) {
my $m = GGE::Exp::Modifier.new($mob);
- my $target = $m.target;
+ my $target = ~$m.target;
my $pos = $mob.to;
my $value = 1;
my $end-of-num-pos = $pos;
Please sign in to comment.
Something went wrong with that request. Please try again.