aboutsummaryrefslogtreecommitdiff
path: root/cutl/compiler/cxx-indenter.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-12-05 14:37:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-12-05 14:37:08 +0200
commitbe1d586b7582a6b54b06719a4a1d6958d86c1851 (patch)
treeedcfd751dce1e5cbf5d40707408a2133abc6271c /cutl/compiler/cxx-indenter.hxx
parenta4a6915ffe5fef5da7e4d421d56d1e3a0bbd5f1e (diff)
C++ indenter fixes
Diffstat (limited to 'cutl/compiler/cxx-indenter.hxx')
-rw-r--r--cutl/compiler/cxx-indenter.hxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/cutl/compiler/cxx-indenter.hxx b/cutl/compiler/cxx-indenter.hxx
index 0988438..a436da7 100644
--- a/cutl/compiler/cxx-indenter.hxx
+++ b/cutl/compiler/cxx-indenter.hxx
@@ -108,7 +108,7 @@ namespace cutl
bool suppress_nl_;
construct construct_;
- // Special state stach for the do-while construct. The presence
+ // Special state stack for the do-while construct. The presence
// of an element in the stack indicates that we are in a braced
// do-while construct. The value of the element is the brace
// balance.
@@ -150,13 +150,15 @@ namespace cutl
//
struct indent_block
{
- indent_block (bool newline, bool indented)
- : newline_ (newline), indented_ (indented)
+ indent_block (bool newline, std::size_t indentation)
+ : newline_ (newline), indentation_ (indentation)
{
}
bool newline_;
- bool indented_;
+ std::size_t indentation_; // Size of the indentation_ stack
+ // corresponding to this block, or
+ // 0 if it is not indented.
};
std::stack<indent_block> indent_stack_;