simplify method

  1. @override
Filter simplify()
override

Simplifies the AST tree. For example, nested AND nodes are transformed into a single AND node.

Implementation

@override
Filter simplify() {
  final oldFilter = filter;
  final newFilter = oldFilter.simplify();
  if (identical(newFilter, oldFilter)) {
    return this;
  }
  return NotFilter(newFilter);
}