visitInstantiateExpr method

  1. @override
void visitInstantiateExpr(
  1. InstantiateExpr ast,
  2. EmitterVisitorContext context
)
override

Implementation

@override
void visitInstantiateExpr(
    o.InstantiateExpr ast, EmitterVisitorContext context) {
  context.print('new ');
  ast.classExpr.visitExpression(this, context);
  context.print('(');
  visitAllExpressions(ast.args, context, ',');
  visitAllNamedExpressions(
    ast.namedArgs,
    context,
    ',',
    alwaysAddSeperator: ast.args.isNotEmpty,
  );
  context.print(')');
}