logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

PPIx::Regexp::Token::Operator - Represent an operator.

Author

       Thomas R. Wyant, III wyantatcpandotorg

Description

       This class represents an operator. In a character class, it represents the negation ("^") and range ("-")
       operators. Outside a character class, it represents the alternation ("|") operator.

Inheritance

       "PPIx::Regexp::Token::Operator" is a PPIx::Regexp::Token.

       "PPIx::Regexp::Token::Operator" has no descendants.

Methods

       This class provides no public methods beyond those provided by its superclass.

   operation
       This method returns the name of the operation performed by the operator.  This depends not only on the
       operator itself but its context:

       In a bracketed character class
               '-' => 'range',
               '^' => 'inversion',

       In an extended bracketed character class
               '&' => 'intersection',
               '+' => 'union',
               '|' => 'union',
               '-' => 'subtraction',
               '^' => 'symmetric_difference',
               '!' => 'complement',

       Outside any sort of bracketed character class
               '|' => 'alternation',

Name

       PPIx::Regexp::Token::Operator - Represent an operator.

Support

       Support       is       by       the       author.       Please       file       bug       reports      at
       <https://rt.cpan.org/Public/Dist/Display.html?Name=PPIx-Regexp>,
       <https://github.com/trwyant/perl-PPIx-Regexp/issues>, or in electronic mail to the author.

Synopsis

        use PPIx::Regexp::Dumper;
        PPIx::Regexp::Dumper->new( 'qr{foo|bar}smx' )
            ->print();

See Also