visitWriteKeyExpr method

  1. @override
void visitWriteKeyExpr(
  1. WriteKeyExpr expr,
  2. EmitterVisitorContext context
)
override

Implementation

@override
void visitWriteKeyExpr(o.WriteKeyExpr expr, EmitterVisitorContext context) {
  var lineWasEmpty = context.lineIsEmpty();
  if (!lineWasEmpty) {
    context.print('(');
  }
  expr.receiver.visitExpression(this, context);
  context.print('[');
  expr.index.visitExpression(this, context);
  context.print('] = ');
  expr.value.visitExpression(this, context);
  if (!lineWasEmpty) {
    context.print(')');
  }
}