Skip to content

Commit cc2b977

Browse files
committed
[js] Implement goal and dba rxtypes.
Pass rx_goal.
1 parent de79fcf commit cc2b977

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/vm/js/QAST/Compiler.nqp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,19 @@ class RegexCompiler {
14041404
}
14051405
}
14061406

1407+
1408+
method goal($node) {
1409+
self.compile_rx(QAST::Regex.new(
1410+
:rxtype<concat>,
1411+
$node[1],
1412+
QAST::Regex.new( :rxtype<altseq>, $node[0], $node[2] )
1413+
));
1414+
}
1415+
1416+
method dba($node) {
1417+
call($!cursor, "!dba", $!pos, quote_string($node.name)) ~ ";\n";
1418+
}
1419+
14071420
method concat($node) {
14081421
my @setup;
14091422
for $node.list {

tools/build/process-qregex-tests

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ my @files := [
4646
'rx_backtrack',
4747
'rx_subrules',
4848
'rx_modifiers',
49+
'rx_goal'
4950
];
5051
my $tests := 0;
5152
for @files -> $fn {

0 commit comments

Comments
 (0)