mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00

This largely copies over Spicy's `.clang-format` configuration file. The one place where we deviate is header include order since Zeek depends on headers being included in a certain order.
24 lines
490 B
C++
24 lines
490 B
C++
// See the file "COPYING" in the main distribution directory for copyright.
|
|
|
|
#include "zeek/script_opt/CPP/Compile.h"
|
|
|
|
namespace zeek::detail {
|
|
|
|
using namespace std;
|
|
|
|
void CPPCompile::StartBlock() {
|
|
IndentUp();
|
|
Emit("{");
|
|
}
|
|
|
|
void CPPCompile::EndBlock(bool needs_semi) {
|
|
Emit("}%s", needs_semi ? ";" : "");
|
|
IndentDown();
|
|
}
|
|
|
|
void CPPCompile::Indent() const {
|
|
for ( auto i = 0; i < block_level; ++i )
|
|
fprintf(write_file, "%s", "\t");
|
|
}
|
|
|
|
} // namespace zeek::detail
|