| 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-inl.h" | 9 #include "src/char-predicates-inl.h" |
| 10 | 10 |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 360 |
| 361 private: | 361 private: |
| 362 static const int kSize = 3; | 362 static const int kSize = 3; |
| 363 int comp_[kSize]; | 363 int comp_[kSize]; |
| 364 int index_; | 364 int index_; |
| 365 int named_month_; | 365 int named_month_; |
| 366 // If set, ensures that data is always parsed in year-month-date order. | 366 // If set, ensures that data is always parsed in year-month-date order. |
| 367 bool is_iso_date_; | 367 bool is_iso_date_; |
| 368 }; | 368 }; |
| 369 | 369 |
| 370 // Tries to parse an ES5 Date Time String. Returns the next token | 370 // Tries to parse an ES6 Date Time String. Returns the next token |
| 371 // to continue with in the legacy date string parser. If parsing is | 371 // to continue with in the legacy date string parser. If parsing is |
| 372 // complete, returns DateToken::EndOfInput(). If terminally unsuccessful, | 372 // complete, returns DateToken::EndOfInput(). If terminally unsuccessful, |
| 373 // returns DateToken::Invalid(). Otherwise parsing continues in the | 373 // returns DateToken::Invalid(). Otherwise parsing continues in the |
| 374 // legacy parser. | 374 // legacy parser. |
| 375 template <typename Char> | 375 template <typename Char> |
| 376 static DateParser::DateToken ParseES5DateTime( | 376 static DateParser::DateToken ParseES6DateTime( |
| 377 DateStringTokenizer<Char>* scanner, | 377 DateStringTokenizer<Char>* scanner, |
| 378 DayComposer* day, | 378 DayComposer* day, |
| 379 TimeComposer* time, | 379 TimeComposer* time, |
| 380 TimeZoneComposer* tz); | 380 TimeZoneComposer* tz); |
| 381 }; | 381 }; |
| 382 | 382 |
| 383 | 383 |
| 384 } } // namespace v8::internal | 384 } } // namespace v8::internal |
| 385 | 385 |
| 386 #endif // V8_DATEPARSER_H_ | 386 #endif // V8_DATEPARSER_H_ |
| OLD | NEW |