=begin pod :kind("Type") :subkind("class") :category("exception")

=TITLE class X::Syntax::Regex::Adverb

=SUBTITLE Compilation error due to an unrecognized regex adverb

    class X::Syntax::Regex::Adverb does X::Syntax { }

Syntax error thrown when an unrecognized or illegal regex adverb is
encountered.

For example

=for code :skip-test<compile time error>
rx:g/a/

dies with

=begin code :lang<text>
===SORRY!===
Adverb g not allowed on rx
=end code

because C<:g> belongs to a match operation, not a regex itself.

=head1 Methods

=head2 method adverb

    method adverb(--> Str:D)

Returns the illegally used adverb

=head2 method construct

    method construct(--> Str:D)

Returns the name of the construct that adverb was used on (C<m>, C<ms>,
C<rx>, C<s>, C<ss>).

=end pod
