Benchmark-Perl-Formance-Cargo
view release on metacpan or search on metacpan
share/P6STD/STD.pm6 view on Meta::CPAN
when 'POSTMATCH' { $repl = 'an explicit pattern after )>' }
when 'ENCODING' { $repl = '$?ENCODING' }
when 'UNICODE' { $repl = '$?UNICODE' } # XXX ???
when 'TAINT' { $repl = '$*TAINT' }
when 'OPEN' { $repl = 'filehandle introspection' }
when 'N' { $repl = '$-1' } # XXX ???
when 'L' { $repl = 'Form module' }
when 'A' { $repl = 'Form module' }
when 'E' { $repl = '$!.extended_os_error' }
when 'C' { $repl = 'COMPILING namespace' }
when 'D' { $repl = '$*DEBUGGING' }
when 'F' { $repl = '$*SYSTEM_FD_MAX' }
when 'H' { $repl = '$?FOO variables' }
when 'I' { $repl = '$*INPLACE' } # XXX ???
when 'O' { $repl = '$?OS or $*OS' }
when 'P' { $repl = 'whatever debugger Perl 6 comes with' }
when 'R' { $repl = 'an explicit result variable' }
when 'S' { $repl = 'the context function' } # XXX ???
when 'T' { $repl = '$*BASETIME' }
when 'V' { $repl = '$*PERL_VERSION' }
when 'W' { $repl = '$*WARNING' }
when 'X' { $repl = '$*EXECUTABLE_NAME' }
when * { $repl = "a global form such as $sigil*$name" }
}
}
when '%' {
given $name {
when 'H' { $repl = '$?FOO variables' }
when * { $repl = "a global form such as $sigil*$name" }
}
}
when * { $repl = "a global form such as $sigil*$name" }
};
return self.obs("$var variable", $repl);
}
token special_variable:sym<::{ }> {
'::' <?before '{'>
}
regex special_variable:sym<${ }> {
<sigil> '{' {} $<text>=[.*?] '}'
{
my $sigil = $<sigil>.Str;
my $text = $<text>.Str;
my $bad = $sigil ~ '{' ~ $text ~ '}';
$text = $text - 1 if $text ~~ /^\d+$/;
if $text !~~ /^(\w|\:)+$/ {
return () if $*QSIGIL;
$¢.obs($bad, $sigil ~ '(' ~ $text ~ ')');
}
elsif $*QSIGIL {
$¢.obs($bad, '{' ~ $sigil ~ $text ~ '}');
}
else {
$¢.obs($bad, $sigil ~ $text);
}
} # always fails, don't need curlycheck here
}
token special_variable:sym<$[> {
<sym> :: <?before \s | ',' | '=' | <terminator> >
<.obs('$[ variable', 'user-defined array indices')>
}
token special_variable:sym<$]> {
<sym> :: <?before \s | ',' | <terminator> >
<.obs('$] variable', '$*PERL_VERSION')>
}
token special_variable:sym<$\\> {
<sym> :: <?before \s | ',' | '=' | <terminator> >
<.obs('$\\ variable', "the filehandle's :ors attribute")>
}
token special_variable:sym<$|> {
<sym> :: <?before \s | ',' | '=' | <terminator> >
<.obs('$| variable', ':autoflush on open')>
}
token special_variable:sym<$:> {
<sym> <?before <[\x20\t\n\],=)}]> >
<.obs('$: variable', 'Form module')>
}
token special_variable:sym<$;> {
<sym> :: <?before \s | ',' | '=' | <terminator> >
<.obs('$; variable', 'real multidimensional hashes')>
}
token special_variable:sym<$'> { #'
<sym> :: <?before \s | ',' | <terminator> >
<.obs('$' ~ "'" ~ 'variable', "explicit pattern after )\x3E")>
}
token special_variable:sym<$"> {
<sym> <!{ $*QSIGIL }>
:: <?before \s | ',' | '=' | <terminator> >
<.obs('$" variable', '.join() method')>
}
token special_variable:sym<$,> {
<sym> :: <?before \s | ',' | <terminator> >
<.obs('$, variable', ".join() method")>
}
token special_variable:sym['$<'] {
<sym> <?before \h* <[ = , ; ? : ! ) \] } ]> <!before \S* '>'> >
<.obs('$< variable', '$*UID')>
}
token special_variable:sym«\$>» {
<sym> :: <?before \s | ',' | <terminator> >
<.obs('$> variable', '$*EUID')>
}
token special_variable:sym<$.> {
<sym> :: <?before \s | ',' | <terminator> >
<.obs('$. variable', "the filehandle's .line method")>
}
token special_variable:sym<$?> {
<sym> :: <?before \s | ',' | <terminator> >
( run in 1.432 second using v1.01-cache-2.11-cpan-14f38c9f855 )