toSource method

String toSource()

Implementation

String toSource() {
  var lines = _lines;
  if (identical(lines[lines.length - 1].parts.length, 0)) {
    lines = lines.sublist(0, lines.length - 1);
  }
  return lines
      .map((line) => line.parts.isNotEmpty
          ? _createIndent(line.indent) + line.parts.join('')
          : '')
      .toList()
      .join('\n');
}