mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
binpac: Don't output comment for &let/&withinput if no such fields exist
This commit is contained in:
parent
ba7a7c2201
commit
4d0a29a725
1 changed files with 14 additions and 11 deletions
|
@ -703,19 +703,22 @@ void Type::GenParseCode3(Output* out_cc, Env* env, const DataPtr& data, int flag
|
|||
out_cc->println("{");
|
||||
}
|
||||
|
||||
out_cc->println("// Evaluate 'let' and 'withinput' fields");
|
||||
foreach (i, FieldList, fields_)
|
||||
if ( ! fields_->empty() )
|
||||
{
|
||||
Field* f = *i;
|
||||
if ( f->tof() == LET_FIELD )
|
||||
out_cc->println("// Evaluate 'let' and 'withinput' fields");
|
||||
foreach (i, FieldList, fields_)
|
||||
{
|
||||
LetField* lf = static_cast<LetField*>(f);
|
||||
lf->GenParseCode(out_cc, env);
|
||||
}
|
||||
else if ( f->tof() == WITHINPUT_FIELD )
|
||||
{
|
||||
WithInputField* af = static_cast<WithInputField*>(f);
|
||||
af->GenParseCode(out_cc, env);
|
||||
Field* f = *i;
|
||||
if ( f->tof() == LET_FIELD )
|
||||
{
|
||||
LetField* lf = static_cast<LetField*>(f);
|
||||
lf->GenParseCode(out_cc, env);
|
||||
}
|
||||
else if ( f->tof() == WITHINPUT_FIELD )
|
||||
{
|
||||
WithInputField* af = static_cast<WithInputField*>(f);
|
||||
af->GenParseCode(out_cc, env);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue