injectComments method

String injectComments (String data)

Inject comments in the final string generated from ast.

Implementation

String injectComments(String data) {
  List<String> arr = data.split("\n");
  comments.forEach((k, v) {
    arr.insert(k, v);
  });
  data = arr.join("\n");

  return data;
}