Early functioning comment detection
This commit is contained in:
parent
ef58bb4810
commit
197dd79b34
3 changed files with 26 additions and 2 deletions
14
lib/IUtils/Comments.rakumod
Normal file
14
lib/IUtils/Comments.rakumod
Normal file
|
@ -0,0 +1,14 @@
|
|||
unit module IUtils::Comments;
|
||||
|
||||
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]*
|
||||
$<expression-name>=<expression-name=&name> \h+ \: \V* \v
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue