mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11: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("{");
|
||||||
}
|
}
|
||||||
|
|
||||||
out_cc->println("// Evaluate 'let' and 'withinput' fields");
|
if ( ! fields_->empty() )
|
||||||
foreach (i, FieldList, fields_)
|
|
||||||
{
|
{
|
||||||
Field* f = *i;
|
out_cc->println("// Evaluate 'let' and 'withinput' fields");
|
||||||
if ( f->tof() == LET_FIELD )
|
foreach (i, FieldList, fields_)
|
||||||
{
|
{
|
||||||
LetField* lf = static_cast<LetField*>(f);
|
Field* f = *i;
|
||||||
lf->GenParseCode(out_cc, env);
|
if ( f->tof() == LET_FIELD )
|
||||||
}
|
{
|
||||||
else if ( f->tof() == WITHINPUT_FIELD )
|
LetField* lf = static_cast<LetField*>(f);
|
||||||
{
|
lf->GenParseCode(out_cc, env);
|
||||||
WithInputField* af = static_cast<WithInputField*>(f);
|
}
|
||||||
af->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