visitAggregateFunctionInvocation method

  1. @override
void visitAggregateFunctionInvocation(
  1. AggregateFunctionInvocation e,
  2. void arg
)
override

Implementation

@override
void visitAggregateFunctionInvocation(
    AggregateFunctionInvocation e, void arg) {
  symbol(e.name, spaceBefore: true);

  symbol('(');
  visit(e.parameters, arg);
  visitNullable(e.orderBy, arg);
  symbol(')');

  if (e.filter != null) {
    keyword(TokenType.filter);
    symbol('(', spaceBefore: true);
    keyword(TokenType.where);
    visit(e.filter!, arg);
    symbol(')', spaceAfter: true);
  }
}