5#ifndef V8_DATE_DATEPARSER_H_
6#define V8_DATE_DATEPARSER_H_
40 template <
typename Char>
46 return static_cast<unsigned>(
x -
lo) <=
static_cast<unsigned>(
hi -
lo);
57 template <
typename Char>
92 int ReadWord(uint32_t* prefix,
int prefix_size) {
98 for (
int i = len;
i < prefix_size;
i++) prefix[
i] = 0;
115 bool Is(uint32_t c)
const {
return ch_ == c; }
165 return static_cast<char>(
value_);
220 template <
typename Char>
255 static int Lookup(
const uint32_t* pre,
int len);
273 void Set(
int offset_in_hours) {
274 sign_ = offset_in_hours < 0 ? -1 : 1;
285 bool Write(
double* output);
306 if (!
Add(n))
return false;
311 bool Write(
double* output);
340 bool Write(
double* output);
359 template <
typename Char>
DateStringTokenizer(InputReader< Char > *in)
bool SkipSymbol(char symbol)
InputReader< Char > * in_
bool Write(double *output)
static bool IsMonth(int x)
void SetNamedMonth(int n)
static const int kPrefixLength
static int Lookup(const uint32_t *pre, int len)
static const int kValueOffset
static int GetValue(int i)
static KeywordType GetType(int i)
static const int kEntrySize
static const int kTypeOffset
static bool IsHour12(int x)
bool IsExpecting(int n) const
void SetHourOffset(int n)
static bool IsMillisecond(int x)
static bool IsHour(int x)
bool Write(double *output)
static bool IsSecond(int x)
static bool IsMinute(int x)
void Set(int offset_in_hours)
bool Write(double *output)
bool IsExpecting(int n) const
void SetAbsoluteMinute(int minute)
void SetAbsoluteHour(int hour)
static bool Parse(Isolate *isolate, base::Vector< Char > str, double *output)
static const int kMaxSignificantDigits
static DateParser::DateToken ParseES5DateTime(DateStringTokenizer< Char > *scanner, DayComposer *day, TimeComposer *time, TimeZoneComposer *tz)
static bool Between(int x, int lo, int hi)
static int ReadMilliseconds(DateToken number)
ZoneVector< RpoNumber > & result
BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL int character
bool IsWhiteSpace(base::uc32 c)
constexpr bool IsDecimalDigit(base::uc32 c)
constexpr int AsciiAlphaToLower(base::uc32 c)
#define DCHECK(condition)
bool IsFixedLengthNumber(int length)
static DateToken Unknown()
static DateToken Symbol(char symbol)
static DateToken Number(int value, int length)
bool IsUnknown(int character)
static DateToken Invalid()
bool IsKeywordType(KeywordType tag)
static DateToken EndOfInput()
static DateToken Keyword(KeywordType tag, int value, int length)
DateToken(int tag, int length, int value)
bool IsSymbol(char symbol)
static DateToken WhiteSpace(int length)
KeywordType keyword_type()