protected override QilNode VisitFilter(QilLoop ndFilter) {
// Handle any special-case patterns that are rooted at Filter
if (HandleFilterPatterns(ndFilter))
return ndFilter;
StartBinding(ndFilter.Variable);
// Result of filter is the sequence bound to the iterator
this.iterCurr.SetIterator(this.iterNested);
// If filter is false, skip the current item
StartNestedIterator(ndFilter.Body);
this.iterCurr.SetBranching(BranchingContext.OnFalse, this.iterCurr.ParentIterator.GetLabelNext());
Visit(ndFilter.Body);
EndNestedIterator(ndFilter.Body);
EndBinding(ndFilter.Variable);
return ndFilter;
}