Commit cdf948c3 authored by sandholm@chromium.org's avatar sandholm@chromium.org

Simplify ScanJsonString.

Review URL: http://codereview.chromium.org/6009009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b9bd4952
......@@ -457,7 +457,7 @@ Token::Value JsonScanner::ScanJsonString() {
ASSERT_EQ('"', c0_);
Advance();
LiteralScope literal(this);
while (c0_ != '"' && c0_ > 0) {
while (c0_ != '"') {
// Check for control character (0x00-0x1f) or unterminated string (<0).
if (c0_ < 0x20) return Token::ILLEGAL;
if (c0_ != '\\') {
......@@ -504,9 +504,6 @@ Token::Value JsonScanner::ScanJsonString() {
Advance();
}
}
if (c0_ != '"') {
return Token::ILLEGAL;
}
literal.Complete();
Advance();
return Token::STRING;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment