2012-04-17 10:01:17 -05:00
|
|
|
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
2012-04-05 22:59:07 -05:00
|
|
|
|
2012-04-17 10:01:17 -05:00
|
|
|
my $indent = 0;
|
2012-04-05 22:59:07 -05:00
|
|
|
while (<>) {
|
2012-07-05 19:13:32 -05:00
|
|
|
if (/^rust: ~">>/) {
|
2012-04-05 22:59:07 -05:00
|
|
|
$indent += 1;
|
|
|
|
}
|
|
|
|
|
2012-04-17 10:01:17 -05:00
|
|
|
printf "%03d %s%s", $indent, (" " x $indent), $_;
|
2012-04-21 12:04:58 -05:00
|
|
|
|
2012-07-05 19:13:32 -05:00
|
|
|
if (/^rust: ~"<</) {
|
2012-04-21 12:04:58 -05:00
|
|
|
$indent -= 1;
|
|
|
|
}
|
2012-04-05 22:59:07 -05:00
|
|
|
}
|