Skip to content

Commit

Permalink
Pass test 78.
Browse files Browse the repository at this point in the history
Implement bos, eos regex anchors.
  • Loading branch information
pmurias committed Apr 3, 2015
1 parent fc5f19a commit 0df1882
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/vm/js/QAST/Compiler.nqp
Expand Up @@ -1193,6 +1193,17 @@ class RegexCompiler {
~ self.case($done);
}


method anchor($node) {
if $node.subtype eq 'eos' {
"if ($!pos < $!target.length) \{{self.fail}\}\n";
} elsif $node.subtype eq 'bos' {
"if ($!pos != 0) \{{self.fail}\}\n";
} else {
$!compiler.NYI("anchor type: {$node.subtype}");
}
}

method pass($node) {
my $name;

Expand Down
2 changes: 1 addition & 1 deletion src/vm/js/bin/run_tests
@@ -1,3 +1,3 @@
#!/bin/bash
# 19 and 30 where moved out as they were parrot specific, 52,54 is missing, we can't pass 49 till we are bootstraped
prove "$@" -e './nqp-js' t/nqp/{01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,20,21,22,23,25,26,27,28,33,35,36,37,38,39,40,41,42,46,47,48,51,53,55,56,57,58,59,63,64,65,68,69,70,71,75,76,79,81,83,88,89,90,91,92,93,94,95}* t/js/getcomp-js.t t/qast/02*
prove "$@" -e './nqp-js' t/nqp/{01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,20,21,22,23,25,26,27,28,33,35,36,37,38,39,40,41,42,46,47,48,51,53,55,56,57,58,59,63,64,65,68,69,70,71,75,76,78,79,81,83,88,89,90,91,92,93,94,95}* t/js/getcomp-js.t t/qast/02*

0 comments on commit 0df1882

Please sign in to comment.