Skip to content

Commit f17f978

Browse files
committed
Final PAST eliminations in P6Regex.
1 parent 061f7f7 commit f17f978

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/QRegex/P6Regex/Actions.nqp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,10 @@ class QRegex::P6Regex::Actions is HLL::Actions {
227227
}
228228
}
229229
else {
230-
$qast := QAST::Regex.new( PAST::Node.new('!BACKREF', $name),
231-
:rxtype<subrule>, :subtype<method>, :node($/));
230+
$qast := QAST::Regex.new( :rxtype<subrule>, :subtype<method>, :node($/),
231+
QAST::Node.new(
232+
QAST::SVal.new( :value('!BACKREF') ),
233+
QAST::SVal.new( :value($name) ) ) );
232234
}
233235
make $qast;
234236
}
@@ -238,8 +240,10 @@ class QRegex::P6Regex::Actions is HLL::Actions {
238240
$<EXPR>.ast,
239241
QAST::Regex.new(
240242
$<GOAL>.ast,
241-
QAST::Regex.new( PAST::Node.new('FAILGOAL', ~$<GOAL>),
242-
:rxtype<subrule>, :subtype<method> ),
243+
QAST::Regex.new( :rxtype<subrule>, :subtype<method>,
244+
QAST::Node.new(
245+
QAST::SVal.new( :value('FAILGOAL') ),
246+
QAST::SVal.new( :value(~$<GOAL>) ) ) ),
243247
:rxtype<altseq>
244248
),
245249
:rxtype<concat>

0 commit comments

Comments
 (0)