1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef V8_JSON_PARSER_H_
6 #define V8_JSON_PARSER_H_
8 #include "src/char-predicates.h"
9 #include "src/conversions.h"
10 #include "src/debug/debug.h"
11 #include "src/factory.h"
12 #include "src/messages.h"
13 #include "src/scanner.h"
14 #include "src/token.h"
15 #include "src/transitions.h"
16 #include "src/types.h"
21 enum ParseElementResult { kElementFound, kElementNotFound, kNullHandle };
24 // A simple json parser.
25 template <bool seq_one_byte>
26 class JsonParser BASE_EMBEDDED {
28 MUST_USE_RESULT static MaybeHandle<Object> Parse(Handle<String> source) {
29 return JsonParser(source).ParseJson();
32 static const int kEndOfString = -1;
35 explicit JsonParser(Handle<String> source)
37 source_length_(source->length()),
38 isolate_(source->map()->GetHeap()->isolate()),
39 factory_(isolate_->factory()),
40 object_constructor_(isolate_->native_context()->object_function(),
43 source_ = String::Flatten(source_);
44 pretenure_ = (source_length_ >= kPretenureTreshold) ? TENURED : NOT_TENURED;
46 // Optimized fast case where we only have Latin1 characters.
48 seq_source_ = Handle<SeqOneByteString>::cast(source_);
52 // Parse a string containing a single JSON value.
53 MaybeHandle<Object> ParseJson();
55 inline void Advance() {
57 if (position_ >= source_length_) {
59 } else if (seq_one_byte) {
60 c0_ = seq_source_->SeqOneByteStringGet(position_);
62 c0_ = source_->Get(position_);
66 // The JSON lexical grammar is specified in the ECMAScript 5 standard,
67 // section 15.12.1.1. The only allowed whitespace characters between tokens
68 // are tab, carriage-return, newline and space.
70 inline void AdvanceSkipWhitespace() {
73 } while (c0_ == ' ' || c0_ == '\t' || c0_ == '\n' || c0_ == '\r');
76 inline void SkipWhitespace() {
77 while (c0_ == ' ' || c0_ == '\t' || c0_ == '\n' || c0_ == '\r') {
82 inline uc32 AdvanceGetChar() {
87 // Checks that current charater is c.
88 // If so, then consume c and skip whitespace.
89 inline bool MatchSkipWhiteSpace(uc32 c) {
91 AdvanceSkipWhitespace();
97 // A JSON string (production JSONString) is subset of valid JavaScript string
98 // literals. The string must only be double-quoted (not single-quoted), and
99 // the only allowed backslash-escapes are ", /, \, b, f, n, r, t and
100 // four-digit hex escapes (uXXXX). Any other use of backslashes is invalid.
101 Handle<String> ParseJsonString() {
102 return ScanJsonString<false>();
105 bool ParseJsonString(Handle<String> expected) {
106 int length = expected->length();
107 if (source_->length() - position_ - 1 > length) {
108 DisallowHeapAllocation no_gc;
109 String::FlatContent content = expected->GetFlatContent();
110 if (content.IsOneByte()) {
112 const uint8_t* input_chars = seq_source_->GetChars() + position_ + 1;
113 const uint8_t* expected_chars = content.ToOneByteVector().start();
114 for (int i = 0; i < length; i++) {
115 uint8_t c0 = input_chars[i];
116 if (c0 != expected_chars[i] || c0 == '"' || c0 < 0x20 || c0 == '\\') {
120 if (input_chars[length] == '"') {
121 position_ = position_ + length + 1;
122 AdvanceSkipWhitespace();
130 Handle<String> ParseJsonInternalizedString() {
131 return ScanJsonString<true>();
134 template <bool is_internalized>
135 Handle<String> ScanJsonString();
136 // Creates a new string and copies prefix[start..end] into the beginning
137 // of it. Then scans the rest of the string, adding characters after the
138 // prefix. Called by ScanJsonString when reaching a '\' or non-Latin1 char.
139 template <typename StringType, typename SinkChar>
140 Handle<String> SlowScanJsonString(Handle<String> prefix, int start, int end);
142 // A JSON number (production JSONNumber) is a subset of the valid JavaScript
143 // decimal number literals.
144 // It includes an optional minus sign, must have at least one
145 // digit before and after a decimal point, may not have prefixed zeros (unless
146 // the integer part is zero), and may include an exponent part (e.g., "e-10").
147 // Hexadecimal and octal numbers are not allowed.
148 Handle<Object> ParseJsonNumber();
150 // Parse a single JSON value from input (grammar production JSONValue).
151 // A JSON value is either a (double-quoted) string literal, a number literal,
152 // one of "true", "false", or "null", or an object or array literal.
153 Handle<Object> ParseJsonValue();
155 // Parse a JSON object literal (grammar production JSONObject).
156 // An object literal is a squiggly-braced and comma separated sequence
157 // (possibly empty) of key/value pairs, where the key is a JSON string
158 // literal, the value is a JSON value, and the two are separated by a colon.
159 // A JSON array doesn't allow numbers and identifiers as keys, like a
161 Handle<Object> ParseJsonObject();
163 // Helper for ParseJsonObject. Parses the form "123": obj, which is recorded
164 // as an element, not a property.
165 ParseElementResult ParseElement(Handle<JSObject> json_object);
167 // Parses a JSON array literal (grammar production JSONArray). An array
168 // literal is a square-bracketed and comma separated sequence (possibly empty)
170 // A JSON array doesn't allow leaving out values from the sequence, nor does
171 // it allow a terminal comma, like a JavaScript array does.
172 Handle<Object> ParseJsonArray();
175 // Mark that a parsing error has happened at the current token, and
176 // return a null handle. Primarily for readability.
177 inline Handle<Object> ReportUnexpectedCharacter() {
178 return Handle<Object>::null();
181 inline Isolate* isolate() { return isolate_; }
182 inline Factory* factory() { return factory_; }
183 inline Handle<JSFunction> object_constructor() { return object_constructor_; }
185 static const int kInitialSpecialStringLength = 32;
186 static const int kPretenureTreshold = 100 * 1024;
190 Zone* zone() { return &zone_; }
192 void CommitStateToJsonObject(Handle<JSObject> json_object, Handle<Map> map,
193 ZoneList<Handle<Object> >* properties);
195 Handle<String> source_;
197 Handle<SeqOneByteString> seq_source_;
199 PretenureFlag pretenure_;
203 Handle<JSFunction> object_constructor_;
208 template <bool seq_one_byte>
209 MaybeHandle<Object> JsonParser<seq_one_byte>::ParseJson() {
210 // Advance to the first character (possibly EOS)
211 AdvanceSkipWhitespace();
212 Handle<Object> result = ParseJsonValue();
213 if (result.is_null() || c0_ != kEndOfString) {
214 // Some exception (for example stack overflow) is already pending.
215 if (isolate_->has_pending_exception()) return Handle<Object>::null();
217 // Parse failed. Current character is the unexpected token.
218 Factory* factory = this->factory();
219 MessageTemplate::Template message;
220 Handle<String> argument;
224 message = MessageTemplate::kUnexpectedEOS;
237 message = MessageTemplate::kUnexpectedTokenNumber;
240 message = MessageTemplate::kUnexpectedTokenString;
243 message = MessageTemplate::kUnexpectedToken;
244 argument = factory->LookupSingleCharacterStringFromCode(c0_);
248 Handle<Script> script(factory->NewScript(source_));
249 // We should sent compile error event because we compile JSON object in
250 // separated source file.
251 isolate()->debug()->OnCompileError(script);
252 MessageLocation location(script, position_, position_ + 1);
253 Handle<Object> error = factory->NewSyntaxError(message, argument);
254 return isolate()->template Throw<Object>(error, &location);
260 // Parse any JSON value.
261 template <bool seq_one_byte>
262 Handle<Object> JsonParser<seq_one_byte>::ParseJsonValue() {
263 StackLimitCheck stack_check(isolate_);
264 if (stack_check.HasOverflowed()) {
265 isolate_->StackOverflow();
266 return Handle<Object>::null();
269 if (stack_check.InterruptRequested()) {
270 ExecutionAccess access(isolate_);
271 // Avoid blocking GC in long running parser (v8:3974).
272 isolate_->stack_guard()->HandleGCInterrupt();
275 if (c0_ == '"') return ParseJsonString();
276 if ((c0_ >= '0' && c0_ <= '9') || c0_ == '-') return ParseJsonNumber();
277 if (c0_ == '{') return ParseJsonObject();
278 if (c0_ == '[') return ParseJsonArray();
280 if (AdvanceGetChar() == 'a' && AdvanceGetChar() == 'l' &&
281 AdvanceGetChar() == 's' && AdvanceGetChar() == 'e') {
282 AdvanceSkipWhitespace();
283 return factory()->false_value();
285 return ReportUnexpectedCharacter();
288 if (AdvanceGetChar() == 'r' && AdvanceGetChar() == 'u' &&
289 AdvanceGetChar() == 'e') {
290 AdvanceSkipWhitespace();
291 return factory()->true_value();
293 return ReportUnexpectedCharacter();
296 if (AdvanceGetChar() == 'u' && AdvanceGetChar() == 'l' &&
297 AdvanceGetChar() == 'l') {
298 AdvanceSkipWhitespace();
299 return factory()->null_value();
301 return ReportUnexpectedCharacter();
303 return ReportUnexpectedCharacter();
307 template <bool seq_one_byte>
308 ParseElementResult JsonParser<seq_one_byte>::ParseElement(
309 Handle<JSObject> json_object) {
311 // Maybe an array index, try to parse it.
313 // With a leading zero, the string has to be "0" only to be an index.
318 if (index > 429496729U - ((d + 3) >> 3)) break;
319 index = (index * 10) + d;
321 } while (IsDecimalDigit(c0_));
325 // Successfully parsed index, parse and store element.
326 AdvanceSkipWhitespace();
329 AdvanceSkipWhitespace();
330 Handle<Object> value = ParseJsonValue();
331 if (!value.is_null()) {
332 JSObject::SetOwnElementIgnoreAttributes(json_object, index, value, NONE)
334 return kElementFound;
340 return kElementNotFound;
343 // Parse a JSON object. Position must be right at '{'.
344 template <bool seq_one_byte>
345 Handle<Object> JsonParser<seq_one_byte>::ParseJsonObject() {
346 HandleScope scope(isolate());
347 Handle<JSObject> json_object =
348 factory()->NewJSObject(object_constructor(), pretenure_);
349 Handle<Map> map(json_object->map());
351 ZoneList<Handle<Object> > properties(8, zone());
354 bool transitioning = true;
356 AdvanceSkipWhitespace();
359 if (c0_ != '"') return ReportUnexpectedCharacter();
361 int start_position = position_;
364 if (IsDecimalDigit(c0_)) {
365 ParseElementResult element_result = ParseElement(json_object);
366 if (element_result == kNullHandle) return Handle<Object>::null();
367 if (element_result == kElementFound) continue;
369 // Not an index, fallback to the slow path.
371 position_ = start_position;
377 Handle<Object> value;
379 // Try to follow existing transitions as long as possible. Once we stop
380 // transitioning, no transition can be found anymore.
381 DCHECK(transitioning);
382 // First check whether there is a single expected transition. If so, try
383 // to parse it first.
384 bool follow_expected = false;
387 key = TransitionArray::ExpectedTransitionKey(map);
388 follow_expected = !key.is_null() && ParseJsonString(key);
390 // If the expected transition hits, follow it.
391 if (follow_expected) {
392 target = TransitionArray::ExpectedTransitionTarget(map);
394 // If the expected transition failed, parse an internalized string and
395 // try to find a matching transition.
396 key = ParseJsonInternalizedString();
397 if (key.is_null()) return ReportUnexpectedCharacter();
399 target = TransitionArray::FindTransitionToField(map, key);
400 // If a transition was found, follow it and continue.
401 transitioning = !target.is_null();
403 if (c0_ != ':') return ReportUnexpectedCharacter();
405 AdvanceSkipWhitespace();
406 value = ParseJsonValue();
407 if (value.is_null()) return ReportUnexpectedCharacter();
410 PropertyDetails details =
411 target->instance_descriptors()->GetDetails(descriptor);
412 Representation expected_representation = details.representation();
414 if (value->FitsRepresentation(expected_representation)) {
415 if (expected_representation.IsHeapObject() &&
416 !target->instance_descriptors()
417 ->GetFieldType(descriptor)
418 ->NowContains(value)) {
419 Handle<HeapType> value_type(
420 value->OptimalType(isolate(), expected_representation));
421 Map::GeneralizeFieldType(target, descriptor,
422 expected_representation, value_type);
424 DCHECK(target->instance_descriptors()
425 ->GetFieldType(descriptor)
426 ->NowContains(value));
427 properties.Add(value, zone());
432 transitioning = false;
436 DCHECK(!transitioning);
438 // Commit the intermediate state to the object and stop transitioning.
439 CommitStateToJsonObject(json_object, map, &properties);
441 JSObject::DefinePropertyOrElementIgnoreAttributes(json_object, key, value)
443 } while (transitioning && MatchSkipWhiteSpace(','));
445 // If we transitioned until the very end, transition the map now.
447 CommitStateToJsonObject(json_object, map, &properties);
449 while (MatchSkipWhiteSpace(',')) {
450 HandleScope local_scope(isolate());
451 if (c0_ != '"') return ReportUnexpectedCharacter();
453 int start_position = position_;
456 if (IsDecimalDigit(c0_)) {
457 ParseElementResult element_result = ParseElement(json_object);
458 if (element_result == kNullHandle) return Handle<Object>::null();
459 if (element_result == kElementFound) continue;
461 // Not an index, fallback to the slow path.
463 position_ = start_position;
469 Handle<Object> value;
471 key = ParseJsonInternalizedString();
472 if (key.is_null() || c0_ != ':') return ReportUnexpectedCharacter();
474 AdvanceSkipWhitespace();
475 value = ParseJsonValue();
476 if (value.is_null()) return ReportUnexpectedCharacter();
478 JSObject::DefinePropertyOrElementIgnoreAttributes(json_object, key,
484 return ReportUnexpectedCharacter();
487 AdvanceSkipWhitespace();
488 return scope.CloseAndEscape(json_object);
492 template <bool seq_one_byte>
493 void JsonParser<seq_one_byte>::CommitStateToJsonObject(
494 Handle<JSObject> json_object, Handle<Map> map,
495 ZoneList<Handle<Object> >* properties) {
496 JSObject::AllocateStorageForMap(json_object, map);
497 DCHECK(!json_object->map()->is_dictionary_map());
499 DisallowHeapAllocation no_gc;
501 int length = properties->length();
502 for (int i = 0; i < length; i++) {
503 Handle<Object> value = (*properties)[i];
504 json_object->WriteToField(i, *value);
509 // Parse a JSON array. Position must be right at '['.
510 template <bool seq_one_byte>
511 Handle<Object> JsonParser<seq_one_byte>::ParseJsonArray() {
512 HandleScope scope(isolate());
513 ZoneList<Handle<Object> > elements(4, zone());
516 AdvanceSkipWhitespace();
519 Handle<Object> element = ParseJsonValue();
520 if (element.is_null()) return ReportUnexpectedCharacter();
521 elements.Add(element, zone());
522 } while (MatchSkipWhiteSpace(','));
524 return ReportUnexpectedCharacter();
527 AdvanceSkipWhitespace();
528 // Allocate a fixed array with all the elements.
529 Handle<FixedArray> fast_elements =
530 factory()->NewFixedArray(elements.length(), pretenure_);
531 for (int i = 0, n = elements.length(); i < n; i++) {
532 fast_elements->set(i, *elements[i]);
534 Handle<Object> json_array = factory()->NewJSArrayWithElements(
535 fast_elements, FAST_ELEMENTS, Strength::WEAK, pretenure_);
536 return scope.CloseAndEscape(json_array);
540 template <bool seq_one_byte>
541 Handle<Object> JsonParser<seq_one_byte>::ParseJsonNumber() {
542 bool negative = false;
543 int beg_pos = position_;
550 // Prefix zero is only allowed if it's the only digit before
551 // a decimal point or exponent.
552 if (IsDecimalDigit(c0_)) return ReportUnexpectedCharacter();
556 if (c0_ < '1' || c0_ > '9') return ReportUnexpectedCharacter();
558 i = i * 10 + c0_ - '0';
561 } while (IsDecimalDigit(c0_));
562 if (c0_ != '.' && c0_ != 'e' && c0_ != 'E' && digits < 10) {
564 return Handle<Smi>(Smi::FromInt((negative ? -i : i)), isolate());
569 if (!IsDecimalDigit(c0_)) return ReportUnexpectedCharacter();
572 } while (IsDecimalDigit(c0_));
574 if (AsciiAlphaToLower(c0_) == 'e') {
576 if (c0_ == '-' || c0_ == '+') Advance();
577 if (!IsDecimalDigit(c0_)) return ReportUnexpectedCharacter();
580 } while (IsDecimalDigit(c0_));
582 int length = position_ - beg_pos;
585 Vector<const uint8_t> chars(seq_source_->GetChars() + beg_pos, length);
586 number = StringToDouble(isolate()->unicode_cache(), chars,
587 NO_FLAGS, // Hex, octal or trailing junk.
588 std::numeric_limits<double>::quiet_NaN());
590 Vector<uint8_t> buffer = Vector<uint8_t>::New(length);
591 String::WriteToFlat(*source_, buffer.start(), beg_pos, position_);
592 Vector<const uint8_t> result =
593 Vector<const uint8_t>(buffer.start(), length);
594 number = StringToDouble(isolate()->unicode_cache(),
596 NO_FLAGS, // Hex, octal or trailing junk.
601 return factory()->NewNumber(number, pretenure_);
605 template <typename StringType>
606 inline void SeqStringSet(Handle<StringType> seq_str, int i, uc32 c);
609 inline void SeqStringSet(Handle<SeqTwoByteString> seq_str, int i, uc32 c) {
610 seq_str->SeqTwoByteStringSet(i, c);
614 inline void SeqStringSet(Handle<SeqOneByteString> seq_str, int i, uc32 c) {
615 seq_str->SeqOneByteStringSet(i, c);
618 template <typename StringType>
619 inline Handle<StringType> NewRawString(Factory* factory,
621 PretenureFlag pretenure);
624 inline Handle<SeqTwoByteString> NewRawString(Factory* factory,
626 PretenureFlag pretenure) {
627 return factory->NewRawTwoByteString(length, pretenure).ToHandleChecked();
631 inline Handle<SeqOneByteString> NewRawString(Factory* factory,
633 PretenureFlag pretenure) {
634 return factory->NewRawOneByteString(length, pretenure).ToHandleChecked();
638 // Scans the rest of a JSON string starting from position_ and writes
639 // prefix[start..end] along with the scanned characters into a
640 // sequential string of type StringType.
641 template <bool seq_one_byte>
642 template <typename StringType, typename SinkChar>
643 Handle<String> JsonParser<seq_one_byte>::SlowScanJsonString(
644 Handle<String> prefix, int start, int end) {
645 int count = end - start;
646 int max_length = count + source_length_ - position_;
647 int length = Min(max_length, Max(kInitialSpecialStringLength, 2 * count));
648 Handle<StringType> seq_string =
649 NewRawString<StringType>(factory(), length, pretenure_);
650 // Copy prefix into seq_str.
651 SinkChar* dest = seq_string->GetChars();
652 String::WriteToFlat(*prefix, dest, start, end);
655 // Check for control character (0x00-0x1f) or unterminated string (<0).
656 if (c0_ < 0x20) return Handle<String>::null();
657 if (count >= length) {
658 // We need to create a longer sequential string for the result.
659 return SlowScanJsonString<StringType, SinkChar>(seq_string, 0, count);
662 // If the sink can contain UC16 characters, or source_ contains only
663 // Latin1 characters, there's no need to test whether we can store the
664 // character. Otherwise check whether the UC16 source character can fit
665 // in the Latin1 sink.
666 if (sizeof(SinkChar) == kUC16Size || seq_one_byte ||
667 c0_ <= String::kMaxOneByteCharCode) {
668 SeqStringSet(seq_string, count++, c0_);
671 // StringType is SeqOneByteString and we just read a non-Latin1 char.
672 return SlowScanJsonString<SeqTwoByteString, uc16>(seq_string, 0, count);
675 Advance(); // Advance past the \.
680 SeqStringSet(seq_string, count++, c0_);
683 SeqStringSet(seq_string, count++, '\x08');
686 SeqStringSet(seq_string, count++, '\x0c');
689 SeqStringSet(seq_string, count++, '\x0a');
692 SeqStringSet(seq_string, count++, '\x0d');
695 SeqStringSet(seq_string, count++, '\x09');
699 for (int i = 0; i < 4; i++) {
701 int digit = HexValue(c0_);
703 return Handle<String>::null();
705 value = value * 16 + digit;
707 if (sizeof(SinkChar) == kUC16Size ||
708 value <= String::kMaxOneByteCharCode) {
709 SeqStringSet(seq_string, count++, value);
712 // StringType is SeqOneByteString and we just read a non-Latin1
714 position_ -= 6; // Rewind position_ to \ in \uxxxx.
716 return SlowScanJsonString<SeqTwoByteString, uc16>(seq_string,
722 return Handle<String>::null();
729 // Advance past the last '"'.
730 AdvanceSkipWhitespace();
732 // Shrink seq_string length to count and return.
733 return SeqString::Truncate(seq_string, count);
737 template <bool seq_one_byte>
738 template <bool is_internalized>
739 Handle<String> JsonParser<seq_one_byte>::ScanJsonString() {
743 AdvanceSkipWhitespace();
744 return factory()->empty_string();
747 if (seq_one_byte && is_internalized) {
748 // Fast path for existing internalized strings. If the the string being
749 // parsed is not a known internalized string, contains backslashes or
750 // unexpectedly reaches the end of string, return with an empty handle.
751 uint32_t running_hash = isolate()->heap()->HashSeed();
752 int position = position_;
757 int beg_pos = position_;
758 position_ = position;
759 return SlowScanJsonString<SeqOneByteString, uint8_t>(source_,
763 if (c0 < 0x20) return Handle<String>::null();
764 if (static_cast<uint32_t>(c0) >
765 unibrow::Utf16::kMaxNonSurrogateCharCode) {
767 StringHasher::AddCharacterCore(running_hash,
768 unibrow::Utf16::LeadSurrogate(c0));
770 StringHasher::AddCharacterCore(running_hash,
771 unibrow::Utf16::TrailSurrogate(c0));
773 running_hash = StringHasher::AddCharacterCore(running_hash, c0);
776 if (position >= source_length_) return Handle<String>::null();
777 c0 = seq_source_->SeqOneByteStringGet(position);
779 int length = position - position_;
780 uint32_t hash = (length <= String::kMaxHashCalcLength)
781 ? StringHasher::GetHashCore(running_hash)
782 : static_cast<uint32_t>(length);
783 Vector<const uint8_t> string_vector(
784 seq_source_->GetChars() + position_, length);
785 StringTable* string_table = isolate()->heap()->string_table();
786 uint32_t capacity = string_table->Capacity();
787 uint32_t entry = StringTable::FirstProbe(hash, capacity);
789 Handle<String> result;
791 Object* element = string_table->KeyAt(entry);
792 if (element == isolate()->heap()->undefined_value()) {
794 result = factory()->InternalizeOneByteString(
795 seq_source_, position_, length);
798 if (element != isolate()->heap()->the_hole_value() &&
799 String::cast(element)->IsOneByteEqualTo(string_vector)) {
800 result = Handle<String>(String::cast(element), isolate());
802 uint32_t hash_field =
803 (hash << String::kHashShift) | String::kIsNotArrayIndexMask;
804 DCHECK_EQ(static_cast<int>(result->Hash()),
805 static_cast<int>(hash_field >> String::kHashShift));
809 entry = StringTable::NextProbe(entry, count++, capacity);
811 position_ = position;
812 // Advance past the last '"'.
813 AdvanceSkipWhitespace();
817 int beg_pos = position_;
818 // Fast case for Latin1 only without escape characters.
820 // Check for control character (0x00-0x1f) or unterminated string (<0).
821 if (c0_ < 0x20) return Handle<String>::null();
823 if (seq_one_byte || c0_ <= String::kMaxOneByteCharCode) {
826 return SlowScanJsonString<SeqTwoByteString, uc16>(source_,
831 return SlowScanJsonString<SeqOneByteString, uint8_t>(source_,
835 } while (c0_ != '"');
836 int length = position_ - beg_pos;
837 Handle<String> result =
838 factory()->NewRawOneByteString(length, pretenure_).ToHandleChecked();
839 uint8_t* dest = SeqOneByteString::cast(*result)->GetChars();
840 String::WriteToFlat(*source_, dest, beg_pos, position_);
843 // Advance past the last '"'.
844 AdvanceSkipWhitespace();
848 } // namespace internal
851 #endif // V8_JSON_PARSER_H_