Created
March 20, 2015 15:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subset File of Str of *.IO.e; | |
enum Color «:BUG(37) :TODO(36) :FIXME(33) :XXX(31)»; | |
sub color(Color $c, Str $msg) { | |
"\033[$cm$msg\033[0m"; | |
} | |
sub process(File $file) { | |
gather for $file.lines.kv -> $i, $l { | |
take " $i: {Color::{$0}, $_)};" when /<|b>(BUG|TODO|FIXME|XXX)<|b>/; | |
} | |
} | |
sub MAIN(File @files) { | |
say "$_:", @tasks.join("\n") if my @tasks = process($_) for @files; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment