visitWriteVarExpr method
void
visitWriteVarExpr(
- WriteVarExpr expr,
- EmitterVisitorContext context, {
- bool checkForNull = false,
override
Implementation
@override
void visitWriteVarExpr(o.WriteVarExpr expr, EmitterVisitorContext context,
{bool checkForNull = false}) {
var lineWasEmpty = context.lineIsEmpty();
if (!lineWasEmpty) {
context.print('(');
}
if (checkForNull) {
context.print('${expr.name} ??= ');
} else {
context.print('${expr.name} = ');
}
expr.value.visitExpression(this, context);
if (!lineWasEmpty) {
context.print(')');
}
}