indent classes, align by spaces

This commit is contained in:
Garux
2021-03-24 00:25:15 +03:00
parent 5b1b9b5e6c
commit 2222100316
450 changed files with 42485 additions and 42239 deletions

View File

@@ -27,47 +27,47 @@
class SimpleTokenWriter final : public TokenWriter
{
public:
SimpleTokenWriter( TextOutputStream& ostream )
: m_ostream( ostream ), m_separator( '\n' ){
}
~SimpleTokenWriter(){
writeSeparator();
}
void release(){
delete this;
}
void nextLine(){
m_separator = '\n';
}
void writeToken( const char* token ){
ASSERT_MESSAGE( strchr( token, ' ' ) == 0, "token contains whitespace: " );
writeSeparator();
m_ostream << token;
}
void writeString( const char* string ){
writeSeparator();
m_ostream << '"' << string << '"';
}
void writeInteger( int i ){
writeSeparator();
m_ostream << i;
}
void writeUnsigned( std::size_t i ){
writeSeparator();
m_ostream << Unsigned( i );
}
void writeFloat( double f ){
writeSeparator();
m_ostream << Decimal( f );
}
SimpleTokenWriter( TextOutputStream& ostream )
: m_ostream( ostream ), m_separator( '\n' ){
}
~SimpleTokenWriter(){
writeSeparator();
}
void release(){
delete this;
}
void nextLine(){
m_separator = '\n';
}
void writeToken( const char* token ){
ASSERT_MESSAGE( strchr( token, ' ' ) == 0, "token contains whitespace: " );
writeSeparator();
m_ostream << token;
}
void writeString( const char* string ){
writeSeparator();
m_ostream << '"' << string << '"';
}
void writeInteger( int i ){
writeSeparator();
m_ostream << i;
}
void writeUnsigned( std::size_t i ){
writeSeparator();
m_ostream << Unsigned( i );
}
void writeFloat( double f ){
writeSeparator();
m_ostream << Decimal( f );
}
private:
void writeSeparator(){
m_ostream << m_separator;
m_separator = ' ';
}
TextOutputStream& m_ostream;
char m_separator;
void writeSeparator(){
m_ostream << m_separator;
m_separator = ' ';
}
TextOutputStream& m_ostream;
char m_separator;
};
inline TokenWriter& NewSimpleTokenWriter( TextOutputStream& ostream ){