Fix pretty-printing of consecutive idents.

This commit is contained in:
Paul Stansifer
2012-07-30 17:56:53 -07:00
parent 3819b6b3d1
commit e6af5eeaa2
2 changed files with 12 additions and 6 deletions

View File

@@ -118,7 +118,8 @@ fn mk_printer(out: io::writer, linewidth: uint) -> printer {
mut top: 0u,
mut bottom: 0u,
print_stack: dvec(),
mut pending_indentation: 0})
mut pending_indentation: 0,
mut token_tree_last_was_ident: false})
}
@@ -223,7 +224,8 @@ type printer_ = {
// stack of blocks-in-progress being flushed by print
print_stack: dvec<print_stack_elt>,
// buffered indentation to avoid writing trailing whitespace
mut pending_indentation: int
mut pending_indentation: int,
mut token_tree_last_was_ident: bool
};
enum printer {