OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "platform/inspector_protocol/Parser.h" | 5 #include "platform/inspector_protocol/Parser.h" |
6 | 6 |
7 #include "platform/inspector_protocol/String16.h" | 7 #include "platform/inspector_protocol/String16.h" |
8 #include "platform/inspector_protocol/Values.h" | 8 #include "platform/inspector_protocol/Values.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // Block comment must close before end-of-input. | 193 // Block comment must close before end-of-input. |
194 return false; | 194 return false; |
195 } | 195 } |
196 | 196 |
197 return false; | 197 return false; |
198 } | 198 } |
199 | 199 |
200 void skipWhitespaceAndComments(const UChar* start, const UChar* end, const UChar
** whitespaceEnd) | 200 void skipWhitespaceAndComments(const UChar* start, const UChar* end, const UChar
** whitespaceEnd) |
201 { | 201 { |
202 while (start < end) { | 202 while (start < end) { |
203 if (isSpaceOrNewline(*start)) { | 203 if (String16::isSpaceOrNewLine(*start)) { |
204 ++start; | 204 ++start; |
205 } else if (*start == '/') { | 205 } else if (*start == '/') { |
206 const UChar* commentEnd; | 206 const UChar* commentEnd; |
207 if (!skipComment(start, end, &commentEnd)) | 207 if (!skipComment(start, end, &commentEnd)) |
208 break; | 208 break; |
209 start = commentEnd; | 209 start = commentEnd; |
210 } else { | 210 } else { |
211 break; | 211 break; |
212 } | 212 } |
213 } | 213 } |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 | 490 |
491 std::unique_ptr<Value> parseJSON(const String16& json) | 491 std::unique_ptr<Value> parseJSON(const String16& json) |
492 { | 492 { |
493 if (json.isEmpty()) | 493 if (json.isEmpty()) |
494 return nullptr; | 494 return nullptr; |
495 return parseJSONInternal(json.characters16(), json.length()); | 495 return parseJSONInternal(json.characters16(), json.length()); |
496 } | 496 } |
497 | 497 |
498 } // namespace protocol | 498 } // namespace protocol |
499 } // namespace blink | 499 } // namespace blink |
OLD | NEW |