summaryrefslogtreecommitdiff
path: root/tiger-compiler/lib/misc/indent.hh
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/lib/misc/indent.hh')
-rw-r--r--tiger-compiler/lib/misc/indent.hh30
1 files changed, 30 insertions, 0 deletions
diff --git a/tiger-compiler/lib/misc/indent.hh b/tiger-compiler/lib/misc/indent.hh
new file mode 100644
index 0000000..04cd610
--- /dev/null
+++ b/tiger-compiler/lib/misc/indent.hh
@@ -0,0 +1,30 @@
+/**
+ ** \file misc/indent.hh
+ ** \brief Indentation relative functions.
+ **/
+
+#pragma once
+
+#include <iosfwd>
+
+namespace misc
+{
+ /// Increment the indentation.
+ std::ostream& incindent(std::ostream& o);
+
+ /// Decrement the indentation.
+ std::ostream& decindent(std::ostream& o);
+
+ /// Reset the indentation.
+ std::ostream& resetindent(std::ostream& o);
+
+ /// Print an end of line, then set the indentation.
+ std::ostream& iendl(std::ostream& o);
+
+ /// Increment the indentation, print an end of line, and set the indentation.
+ std::ostream& incendl(std::ostream& o);
+
+ /// Decrement the indentation, print an end of line, and set the indentation.
+ std::ostream& decendl(std::ostream& o);
+
+} // namespace misc