emit method

  1. @override
StringSink emit(
  1. LiteralList element, [
  2. StringSink? output
])
override

Emits element as valid Dart code into output.

Implementation

@override
StringSink emit(
  LiteralList element, [
  StringSink? output,
]) {
  output ??= StringBuffer();

  output.write('[');

  var index = 0;

  for (final v in element.value) {
    emitDynamic(v, output);

    index++;

    if (index < element.value.length) {
      output.write(', ');
    }
  }

  output.write(']');

  return output;
}