Skip to content

Commit

Permalink
[namespace qualifiers] Austin++ for nqp syntax help.
Browse files Browse the repository at this point in the history
Also add a stub for inscope, taken from partcl.
  • Loading branch information
coke committed Aug 9, 2010
1 parent 7548f1a commit 3d4dff5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/Partcl/commands/namespace.pm
Expand Up @@ -137,7 +137,7 @@ my sub import(*@args) {
}

my sub inscope(*@args) {
'';
eval(@args);
}

my sub origin(*@args) {
Expand All @@ -152,7 +152,13 @@ my sub path(*@args) {
'';
}

my sub qualifiers(*@args) {
my sub qualifiers($string) {
my $match := Regex::Cursor.parse(
$string, :rule(/$<foo>=(.*)\:\:+<-[:]>*$$/), :c(0)
);

return ~$match<foo> if $match;

'';
}

Expand Down
4 changes: 2 additions & 2 deletions t/cmd_namespace.t
Expand Up @@ -44,8 +44,8 @@ eval_is {namespace qualifiers string string} \
{wrong # args: should be "namespace qualifiers string"} \
{namespace qualifiers: too many args}

is [namespace qualifiers ::a::b::c] ::a::b {namespace qualifiers: simple} {TODO NQPRX}
is [namespace qualifiers :::a:::b::c] :::a:::b {namespace qualifiers: extra colons} {TODO NQPRX}
is [namespace qualifiers ::a::b::c] ::a::b {namespace qualifiers: simple}
is [namespace qualifiers :::a:::b::c] :::a:::b {namespace qualifiers: extra colons}


eval_is {namespace tail} \
Expand Down

0 comments on commit 3d4dff5

Please sign in to comment.