mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
descriptions of "for" statements now include their "value variable" if present
This commit is contained in:
parent
9356330bce
commit
23c08a05de
2 changed files with 241 additions and 231 deletions
10
src/Stmt.cc
10
src/Stmt.cc
|
@ -1289,6 +1289,11 @@ void ForStmt::StmtDescribe(ODesc* d) const {
|
|||
if ( loop_vars->length() )
|
||||
d->Add("]");
|
||||
|
||||
if ( value_var ) {
|
||||
d->AddSP(",");
|
||||
value_var->Describe(d);
|
||||
}
|
||||
|
||||
if ( d->IsReadable() )
|
||||
d->Add(" in ");
|
||||
|
||||
|
@ -1314,6 +1319,11 @@ TraversalCode ForStmt::Traverse(TraversalCallback* cb) const {
|
|||
HANDLE_TC_STMT_PRE(tc);
|
||||
}
|
||||
|
||||
if ( value_var ) {
|
||||
tc = value_var->Traverse(cb);
|
||||
HANDLE_TC_STMT_PRE(tc);
|
||||
}
|
||||
|
||||
tc = LoopExpr()->Traverse(cb);
|
||||
HANDLE_TC_STMT_PRE(tc);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue