Syntax::SourceHighlight::HighlightEvent(3)

NAME
Syntax::SourceHighlight::HighlightEvent - Perl class for libsource-highlight's "srchilite::HighlightEvent"

SYNOPSIS
    use Syntax::SourceHighlight;
    my $hl = Syntax::SourceHighlight->new();
    $hl->setHighlightEventListener(
        sub {
            my $highlight_event = shift;
            print( "Event: ", $highlight_event->{type}, "\n" );
        }
    );
    $hl->highlightString( 'my $test = 42;', 'perl.lang' );

DESCRIPTION
This is the counterpart to the libsource-highlight's "srchilite::HighlightEvent <https://www.gnu.org/software/src-highlite/api/structsrchilite_1_1HighlightEvent.html>" class.

All of its public attributes are exported:

•   token

•   type

There is no Perl constructor for this package. This class does not export any other methods.

SEE ALSO
The main documentation with examples is in the Syntax::SourceHighlight POD.