17 lines
238 B
Perl
Executable File
17 lines
238 B
Perl
Executable File
#!/usr/bin/perl
|
|
use strict;
|
|
use warnings;
|
|
|
|
my $indent = 0;
|
|
while (<>) {
|
|
if (/^rust: ~">>/) {
|
|
$indent += 1;
|
|
}
|
|
|
|
printf "%03d %s%s", $indent, (" " x $indent), $_;
|
|
|
|
if (/^rust: ~"<</) {
|
|
$indent -= 1;
|
|
}
|
|
}
|