STD_syntax_highlight - Highlights Perl 6 source code using STD.pm
# read from standard input STD_syntax_highlight # print ansi-escaped text for 'TOP' STD_syntax_highlight foo.pl # print separate html, css and javascript files STD_syntax_highlight --full-html=foo.full.html --clean-html foo.pl # print ansi-escaped text for with 'statementlist' as the top-level rule STD_syntax_highlight foo.pl statementlist # write simple html output to foo.pl.html STD_syntax_highlight --simple-html=foo.pl.html foo.pl # write simple snippet html output to foo.pl.html STD_syntax_highlight --snippet-html=foo.pl.html foo.pl # write simple ansi-colored output to STDOUT STD_syntax_highlight --ansi-text=- foo.pl # write output with mIRC color codes to STDOUT STD_syntax_highlight --mirc-text=- foo.pl # write yaml output to STDOUT (can be useful to build filters) STD_syntax_highlight --yaml=- foo.pl =head1 SUBROUTINES
Your standard main method
Writes the output to a file or STDOUT
Returns the generated Perl6 highlighted HTML from highlight_perl6_* subroutine using redspans.
highlight_perl6_*
Generates the Perl6 highlighted HTML string for STD parse tree provided. The resources can be inlined (by default) or externalized (--clean-html).
This is same as highlight_perl6_full when --simple-html is used. No more javascript tree viewer or anything fancy. Only nodes that have a color are printed. Not optimal but works ;-)
highlight_perl6_full
This is same as highlight_perl6_full when --snippet-html is used. No more javascript tree viewer or anything fancy. Only nodes that have a color are printed. Not optimal but works ;-)
This is same as highlight_perl6_full when --ansi-text is used. No more javascript tree viewer or anything fancy. Only nodes that have a color are printed. Not optimal but works ;-)
This is same as highlight_perl6_full when --mirc-text is used. No more javascript tree viewer or anything fancy. Only nodes that have a color are printed. Not optimal but works ;-)
Spits out YAML that can be useful for the future
Walk the path that no one wanted to travel ;)
Converts some characters to their equivalent html entities
Written by Ahmad M. Zawawi (azawawi), Moritz Lenz and Paweł Murias (pmurias)
The project idea was inspired by Moritz Lenz (moritz) See http://www.nntp.perl.org/group/perl.perl6.users/2008/07/msg788.html
The initial STD tree traversal code was written by Paweł Murias (pmurias).
The redspans traversal code was written by Larry Wall (TimToady). redspans stands for "...'red' for "reductions", and 'spans' from the from/to span calculations"
The browser code was written by Ahmad M. Zawawi (azawawi)
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Paweł'. Assuming UTF-8
To install Benchmark::Perl::Formance::Cargo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Benchmark::Perl::Formance::Cargo
CPAN shell
perl -MCPAN -e shell install Benchmark::Perl::Formance::Cargo
For more information on module installation, please visit the detailed CPAN module installation guide.