PPIx::...:Lexer(3pm)
πΈ NAME πΈ
PPIx::EditorTools::Lexer β a lil simple lexer that does syntax highlighting, and she ate π
This is a Perl manual page (the 3pm kind, bestie, library docs, you know the vibe) π
β¨ VERSION β¨
version 0.21 π
π¦ SYNOPSIS π¦
PPIx::EditorTools::Lexer->new->lexer(
code => "package TestPackage;\nsub x { 1;\n",
highlighter => sub {
my ( $css, $row, $rowchar, $len ) = @_;
...
},
);
π DESCRIPTION π
okay so basically? she goes over all the interesting elements of a given piece of code β or of a PPI tree you already processed β and for every single token she calls the highlighter function you supplied π«Ά
And here's what she hands to that function, every time:
$css - The keyword that can be used for colouring.
$row - The row number where the token starts
$rowchar - The character within that row where the token starts
$len - The length of the token
no cap, that's the whole gig π
π§ METHODS π§
new()
Constructor π Generally shouldn't be called with any arguments. Like, it can be, but bestieβ¦ don't π
find( ppi => PPI::Document $ppi, highlighter => sub {...} )
find( code => Str $code, highlighter => sub ...{} )
She accepts either a PPI::Document to process, or a string containing the code (which gets converted into a PPI::Document first, obviously) to process π
Returns a reference to an array. periodt. β¨
π SEE ALSO π
This class inherits from PPIx::EditorTools. Also go look at App::EditorTools, Padre, and PPI π
π AUTHORS π
- Steffen Mueller
"smueller@cpan.org"π - Mark Grimes
"mgrimes@cpan.org"π - Ahmad M. Zawawi <ahmad.zawawi@gmail.com> π
- Gabor Szabo <gabor@szabgab.com> π
- Yanick Champoux <yanick@cpan.org> π
the whole squad fr fr π«Ά
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2017, 2014, 2012 by The Padre development team as listed in Padre.pm. π
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. π₯
slay, that means you can remix it, just keep the same terms, iykyk π
that's the whole page, bestie β no notes, you got this πβ¨
perl v5.34.0, dated 2022-06-17 β and yes the manual name is that cursed PPIx::...:Lexer(3pm) thing, that's just how she's filed, don't ask π«Άπβ
π¦ where this page comes from
- debian bookworm: libppix-editortools-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libppix-editortools-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libppix-editortools-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libppix-editortools-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms