mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
binpac: Format output closer to what clang-format would output
This commit is contained in:
parent
964817f9bf
commit
dacfe747b9
19 changed files with 132 additions and 170 deletions
|
@ -209,11 +209,10 @@ void Expr::GenCaseEval(Output* out_cc, Env* env) {
|
|||
foreach (i, CaseExprList, cases_)
|
||||
(*i)->value()->ForceIDEval(out_cc, env);
|
||||
|
||||
out_cc->println("switch ( %s )", operand_[0]->EvalExpr(out_cc, env));
|
||||
out_cc->println("switch ( %s ) {", operand_[0]->EvalExpr(out_cc, env));
|
||||
Type* switch_type = operand_[0]->DataType(env);
|
||||
|
||||
out_cc->inc_indent();
|
||||
out_cc->println("{");
|
||||
|
||||
CaseExpr* default_case = nullptr;
|
||||
foreach (i, CaseExprList, cases_) {
|
||||
|
@ -246,8 +245,8 @@ void Expr::GenCaseEval(Output* out_cc, Env* env) {
|
|||
out_cc->println("break;");
|
||||
out_cc->dec_indent();
|
||||
|
||||
out_cc->println("}");
|
||||
out_cc->dec_indent();
|
||||
out_cc->println("}");
|
||||
|
||||
env->SetEvaluated(val_var);
|
||||
str_ = env->RValue(val_var);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue