visitStructObjExpr method

  1. @override
String visitStructObjExpr(
  1. StructObjExpr obj
)
override

Implementation

@override
String visitStructObjExpr(StructObjExpr obj) {
  final output = StringBuffer();
  output.writeln(_lexicon.codeBlockStart);
  ++_curIndentCount;
  for (var i = 0; i < obj.fields.length; ++i) {
    final field = obj.fields[i];
    final fieldString = visitStructObjField(field);
    output.write(fieldString);
    if (i < obj.fields.length - 1) {
      output.write(_lexicon.comma);
    }
    output.writeln();
  }
  --_curIndentCount;
  output.write(curIndent);
  output.write(_lexicon.codeBlockEnd);
  return output.toString();
}