Skip to content

Commit a6b22f6

Browse files
committed
Eradicate pir::chopn__Ssi from source, replace by nqp::substring/nqp::chars
1 parent 2f7b14d commit a6b22f6

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

docs/pir2nqp.todo

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ pir::const::INTERPINFO_TOTAL_MEM_USED
2626
pir::const::INTERPINFO_TOTAL_PMCS
2727

2828
can be done now by lizmat
29-
pir::chopn__Ssi -> nqp::substr
3029
pir::push__vPi -> nqp::push_i
3130
pir::setattribute__vppsp -> nqp::bindattr
3231
pir::getattribute__PPPs -> nqp::getattr

src/QRegex/P5Regex/Actions.nqp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ class QRegex::P5Regex::Actions is HLL::Actions {
376376
my $loc := nqp::index(%*RX<name>, ':sym<');
377377
$loc := nqp::index(%*RX<name>, ':sym«')
378378
if $loc < 0;
379-
my $rxname := pir::chopn__Ssi(nqp::substr(%*RX<name>, $loc + 5), 1);
379+
my $rxname := nqp::substr(%*RX<name>, $loc + 5);
380+
$rxname := nqp::substr($rxname, 0, nqp::chars($rxname) - 1);
380381
$qast := QAST::Regex.new(:name('sym'), :rxtype<subcapture>, :node($/),
381382
QAST::Regex.new(:rxtype<literal>, $rxname, :node($/)));
382383
}

src/QRegex/P6Regex/Actions.nqp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,8 @@ class QRegex::P6Regex::Actions is HLL::Actions {
378378
my $loc := nqp::index(%*RX<name>, ':sym<');
379379
$loc := nqp::index(%*RX<name>, ':sym«')
380380
if $loc < 0;
381-
my $rxname := pir::chopn__Ssi(nqp::substr(%*RX<name>, $loc + 5), 1);
381+
my $rxname := nqp::substr(%*RX<name>, $loc + 5);
382+
$rxname := nqp::substr( $rxname, 0, nqp::chars($rxname) - 1);
382383
$qast := QAST::Regex.new(:name('sym'), :rxtype<subcapture>, :node($/),
383384
QAST::Regex.new(:rxtype<literal>, $rxname, :node($/)));
384385
}

0 commit comments

Comments
 (0)