finishStringBody method
Implementation
Token finishStringBody(int quote) {
var buf = <int>[];
while (true) {
var ch = _nextChar();
if (ch == quote) {
return _makeStringToken(buf, false);
} else if (ch == 0) {
return _errorToken();
} else if (ch == TokenChar.BACKSLASH) {
var escapeVal = readEscapeSequence();
if (escapeVal == -1) {
return _errorToken('invalid hex escape sequence');
} else {
buf.add(escapeVal);
}
} else {
buf.add(ch);
}
}
}