2014-05-02 15:55:51 -07:00
|
|
|
|
|
|
|
#ifndef EOLIAN_CXX_STD_TAB_HH
|
|
|
|
#define EOLIAN_CXX_STD_TAB_HH
|
|
|
|
|
|
|
|
#include <ostream>
|
2014-06-30 11:32:52 -07:00
|
|
|
#include <iosfwd>
|
2014-05-02 15:55:51 -07:00
|
|
|
|
|
|
|
namespace efl { namespace eolian { namespace grammar {
|
|
|
|
|
|
|
|
using std::endl;
|
|
|
|
|
|
|
|
const int tabsize = 3;
|
|
|
|
|
|
|
|
struct tab
|
|
|
|
{
|
|
|
|
int _n;
|
|
|
|
tab(int n) : _n(n * tabsize) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
inline std::ostream&
|
|
|
|
operator<<(std::ostream& out, efl::eolian::grammar::tab tab)
|
|
|
|
{
|
|
|
|
for (int i = tab._n; i; --i)
|
|
|
|
out << ' ';
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|
|
|
|
} } }
|
|
|
|
|
|
|
|
#endif // EOLIAN_CXX_STD_TAB_HH
|