Compilation error due to an unrecognized regex adverb
does X::Syntax
Syntax error thrown when an unrecognized or illegal regex adverb is encountered.
For example
rx:g/a/
dies with
===SORRY!===Adverb g not allowed on rx
because :g
belongs to a match operation, not a regex itself.
method adverb(--> Str)
Returns the illegally used adverb
method construct(--> Str)
Returns the name of the construct that adverb was used on (m
, ms
, rx
, s
, ss
).