BrowserREPL-button-tip-on BrowserREPL-button-tip-off

EditButtonTip 2019-08-04

class X::Syntax::Regex::Adverb

Compilation error due to an unrecognized regex adverb

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

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

For example

rx:g/a/
Code

dies with

===SORRY!===
Adverb g not allowed on rx
Code

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

Methods§

method adverb§

method adverb(--> Str:D)
Code

Returns the illegally used adverb

method construct§

method construct(--> Str:D)
Code

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