visitStructObjField method

  1. @override
String visitStructObjField(
  1. StructObjField field
)
override

Implementation

@override
String visitStructObjField(StructObjField field) {
  final output = StringBuffer();
  if (field.key != null) {
    output.write('${field.key}${_lexicon.structValueIndicator} ');
    final valueString = formatAST(field.fieldValue);
    output.write(valueString);
  } else if (field.isSpread) {
    output.write(_lexicon.spreadSyntax);
    final valueString = formatAST(field.fieldValue);
    output.write(valueString);
  } else {
    // for (final comment in field.precedings) {
    //   output.writeln(comment.content);
    // }
  }
  return output.toString();
}