removeComments method

String removeComments (String line)

Removes all the comment from the line.

Implementation

String removeComments(String line) {
  return line.replaceAllMapped(RegExp(r'#.*'), (match) {
    return '';
  });
}