visitLiteralArrayExpr method

  1. @override
void visitLiteralArrayExpr(
  1. LiteralArrayExpr ast,
  2. EmitterVisitorContext context
)
override

Implementation

@override
void visitLiteralArrayExpr(
    o.LiteralArrayExpr ast, EmitterVisitorContext context) {
  var useNewLine = ast.entries.length > 1;
  context.print('[', useNewLine);
  context.incIndent();
  visitAllExpressions(ast.entries, context, ',',
      newLine: useNewLine, keepOnSameLine: true);
  context.decIndent();
  context.print(']', useNewLine);
}