Skip to content

Commit

Permalink
Standard all the metawords.
Browse files Browse the repository at this point in the history
(combined, except for meta-information, which should have a dash)

Make a few others more restrictive
  • Loading branch information
coke committed Aug 9, 2023
1 parent 4853e02 commit 47a907a
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions xt/word-variants.rakutest
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,30 @@ my %variants = %(
filesystem => rx:i/ << file [\s+|\-] system /,
lookahead => rx:i/ << look \- ahead /,
lookbehind => rx:i/ << look [\s+|\-] behind /,
meta => rx:i/ << <!after [ method || \$ || \- || \" ] \s*> meta [\s+|\-] << <!before ok >> > /,
metadata => rx:i/ << meta [\s+|\+] data /,
# Allow the one url with meta-object
metaobject => rx:i/ << meta [\s+|\-] object <!before '-protocol' >/,
# The one meta we want a dash on
"meta-info" => rx:i/ << meta [\s*] info /,
# "method" is tricky with headings.
metamethod => rx:i/ <<<!after [method|| \$ || \- || \"] \s*> << meta [\s+|\-] method /,
NYI => rx:i/ << niy /,
parameterization => rx:i/ << parametrization >> /,
precompil => rx:i/ << pre \- compil /,
precompil => rx:i/ << pre [\s+|\-] compil /,
runtime => rx:i/ << run [\s+|\-] time /,
semicolon => rx:i/ << semi [\s+|\-] colon /,
shorthand => rx:i/ << short [\s+|\-] hand /,
sigiled => rx:i/ << sigilled /,
smartmatch => rx:i/ << smart [\s+|\-] match /,
subdirectories => rx:i/ << sub \- directories /,
subdirectory => rx:i/ << sub \- directory /,
subdirectories => rx:i/ << sub [\s+|\-] directories /,
subdirectory => rx:i/ << sub [\s+|\-] directory /,
substring => rx:i/ << sub \- string /,
zero-width => rx:i/ << zero \s+ width<!before ' joiner'><!before ' no-break space'> /,
);

for <character class data model operator package program role synta type> -> $meta {
%variants{"meta$meta"} = rx:i/ << meta [\s+|\-] $meta/;
}

my %result;

for @files.race -> $file {
Expand Down

0 comments on commit 47a907a

Please sign in to comment.