The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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 class.

All of its public attributes are exported:

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.