readQuotedString method

String readQuotedString()

Implementation

String readQuotedString() {
  _quotedString = true;
  if (next() != '"') {
    throw Exception('Expected double quotes at the start of a string');
  }
  StringBuffer result = StringBuffer();
  while (canRead) {
    String char = next();
    if (char == '"') {
      break;
    }
    result.write(char);
  }
  _quotedString = false;
  return result.toString();
}