]> git.lizzy.rs Git - rust.git/blob - src/etc/indenter
auto merge of #6536 : kud1ing/rust/patch-1, r=brson
[rust.git] / src / etc / indenter
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 my $indent = 0;
6 while (<>) {
7     if (/^rust: ~">>/) {
8         $indent += 1;
9     }
10
11     printf "%03d  %s%s", $indent, ("  " x $indent), $_;
12
13     if (/^rust: ~"<</) {
14         $indent -= 1;
15     }
16 }