| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 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 | 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 #ifndef V8_DATEPARSER_H_ | 5 #ifndef V8_DATEPARSER_H_ |
| 6 #define V8_DATEPARSER_H_ | 6 #define V8_DATEPARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/char-predicates.h" | 9 #include "src/char-predicates.h" |
| 10 #include "src/scanner.h" | 10 #include "src/scanner.h" |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 | 345 |
| 346 private: | 346 private: |
| 347 static const int kSize = 3; | 347 static const int kSize = 3; |
| 348 int comp_[kSize]; | 348 int comp_[kSize]; |
| 349 int index_; | 349 int index_; |
| 350 int named_month_; | 350 int named_month_; |
| 351 // If set, ensures that data is always parsed in year-month-date order. | 351 // If set, ensures that data is always parsed in year-month-date order. |
| 352 bool is_iso_date_; | 352 bool is_iso_date_; |
| 353 }; | 353 }; |
| 354 | 354 |
| 355 // Tries to parse an ES6 Date Time String. Returns the next token | 355 // Tries to parse an ES5 Date Time String. Returns the next token |
| 356 // to continue with in the legacy date string parser. If parsing is | 356 // to continue with in the legacy date string parser. If parsing is |
| 357 // complete, returns DateToken::EndOfInput(). If terminally unsuccessful, | 357 // complete, returns DateToken::EndOfInput(). If terminally unsuccessful, |
| 358 // returns DateToken::Invalid(). Otherwise parsing continues in the | 358 // returns DateToken::Invalid(). Otherwise parsing continues in the |
| 359 // legacy parser. | 359 // legacy parser. |
| 360 template <typename Char> | 360 template <typename Char> |
| 361 static DateParser::DateToken ParseES6DateTime( | 361 static DateParser::DateToken ParseES5DateTime( |
| 362 DateStringTokenizer<Char>* scanner, | 362 DateStringTokenizer<Char>* scanner, DayComposer* day, TimeComposer* time, |
| 363 DayComposer* day, | |
| 364 TimeComposer* time, | |
| 365 TimeZoneComposer* tz); | 363 TimeZoneComposer* tz); |
| 366 }; | 364 }; |
| 367 | 365 |
| 368 | 366 |
| 369 } // namespace internal | 367 } // namespace internal |
| 370 } // namespace v8 | 368 } // namespace v8 |
| 371 | 369 |
| 372 #endif // V8_DATEPARSER_H_ | 370 #endif // V8_DATEPARSER_H_ |
| OLD | NEW |