iutils-raku/lib/IUtils/Regexes.rakumod

19 lines
405 B
Raku
Raw Normal View History

2024-12-31 16:28:24 +00:00
unit module IUtils::Regexes;
2024-12-31 02:32:25 +00:00
my token comment-start { \- \- }
my token type {
'test' | 'bench'
}
my token flag { \@ \@ <type> }
my token name { <[\w \-]>+ }
my regex flagged-expression is export {
<&comment-start> \h* <flag> \h* <test-name=&name> \V* \v
[<&comment-start> \V* \v]*
2024-12-31 16:04:33 +00:00
<expression-name=&name> \h+ \: \V* \v
2024-12-31 02:32:25 +00:00
}
2024-12-31 19:11:46 +00:00
my regex module-name is export {
'module' \h* $<name>=(\S+)
}