Lines Matching refs:scanner
20 DateStringTokenizer<Char> scanner(&in); in Parse()
74 DateToken next_unhandled_token = ParseES5DateTime(&scanner, &day, &time, &tz); in Parse()
81 token = scanner.Next()) { in Parse()
86 if (scanner.SkipSymbol(':')) { in Parse()
87 if (scanner.SkipSymbol(':')) { in Parse()
95 if (scanner.Peek().IsSymbol('.')) scanner.Next(); in Parse()
97 } else if (scanner.SkipSymbol('.') && time.IsExpecting(n)) { in Parse()
99 if (!scanner.Peek().IsNumber()) return false; in Parse()
100 int n = ReadMilliseconds(scanner.Next()); in Parse()
109 DateToken peek = scanner.Peek(); in Parse()
116 scanner.SkipSymbol('-'); in Parse()
127 scanner.SkipSymbol('-'); in Parse()
135 if (scanner.Peek().IsNumber()) return false; in Parse()
144 if (scanner.Peek().IsNumber()) { in Parse()
145 DateToken token = scanner.Next(); in Parse()
151 if (scanner.Peek().IsSymbol(':')) { in Parse()
245 DateStringTokenizer<Char>* scanner, DayComposer* day, TimeComposer* time, in ParseES5DateTime() argument
252 if (scanner->Peek().IsAsciiSign()) { in ParseES5DateTime()
255 DateToken sign_token = scanner->Next(); in ParseES5DateTime()
256 if (!scanner->Peek().IsFixedLengthNumber(6)) return sign_token; in ParseES5DateTime()
258 int year = scanner->Next().number(); in ParseES5DateTime()
261 } else if (scanner->Peek().IsFixedLengthNumber(4)) { in ParseES5DateTime()
262 day->Add(scanner->Next().number()); in ParseES5DateTime()
264 return scanner->Next(); in ParseES5DateTime()
266 if (scanner->SkipSymbol('-')) { in ParseES5DateTime()
267 if (!scanner->Peek().IsFixedLengthNumber(2) || in ParseES5DateTime()
268 !DayComposer::IsMonth(scanner->Peek().number())) return scanner->Next(); in ParseES5DateTime()
269 day->Add(scanner->Next().number()); in ParseES5DateTime()
270 if (scanner->SkipSymbol('-')) { in ParseES5DateTime()
271 if (!scanner->Peek().IsFixedLengthNumber(2) || in ParseES5DateTime()
272 !DayComposer::IsDay(scanner->Peek().number())) return scanner->Next(); in ParseES5DateTime()
273 day->Add(scanner->Next().number()); in ParseES5DateTime()
277 if (!scanner->Peek().IsKeywordType(TIME_SEPARATOR)) { in ParseES5DateTime()
278 if (!scanner->Peek().IsEndOfInput()) return scanner->Next(); in ParseES5DateTime()
281 scanner->Next(); in ParseES5DateTime()
282 if (!scanner->Peek().IsFixedLengthNumber(2) || in ParseES5DateTime()
283 !Between(scanner->Peek().number(), 0, 24)) { in ParseES5DateTime()
287 bool hour_is_24 = (scanner->Peek().number() == 24); in ParseES5DateTime()
288 time->Add(scanner->Next().number()); in ParseES5DateTime()
289 if (!scanner->SkipSymbol(':')) return DateToken::Invalid(); in ParseES5DateTime()
290 if (!scanner->Peek().IsFixedLengthNumber(2) || in ParseES5DateTime()
291 !TimeComposer::IsMinute(scanner->Peek().number()) || in ParseES5DateTime()
292 (hour_is_24 && scanner->Peek().number() > 0)) { in ParseES5DateTime()
295 time->Add(scanner->Next().number()); in ParseES5DateTime()
296 if (scanner->SkipSymbol(':')) { in ParseES5DateTime()
297 if (!scanner->Peek().IsFixedLengthNumber(2) || in ParseES5DateTime()
298 !TimeComposer::IsSecond(scanner->Peek().number()) || in ParseES5DateTime()
299 (hour_is_24 && scanner->Peek().number() > 0)) { in ParseES5DateTime()
302 time->Add(scanner->Next().number()); in ParseES5DateTime()
303 if (scanner->SkipSymbol('.')) { in ParseES5DateTime()
304 if (!scanner->Peek().IsNumber() || in ParseES5DateTime()
305 (hour_is_24 && scanner->Peek().number() > 0)) { in ParseES5DateTime()
309 time->Add(ReadMilliseconds(scanner->Next())); in ParseES5DateTime()
313 if (scanner->Peek().IsKeywordZ()) { in ParseES5DateTime()
314 scanner->Next(); in ParseES5DateTime()
316 } else if (scanner->Peek().IsSymbol('+') || in ParseES5DateTime()
317 scanner->Peek().IsSymbol('-')) { in ParseES5DateTime()
318 tz->SetSign(scanner->Next().symbol() == '+' ? 1 : -1); in ParseES5DateTime()
319 if (scanner->Peek().IsFixedLengthNumber(4)) { in ParseES5DateTime()
321 int hourmin = scanner->Next().number(); in ParseES5DateTime()
331 if (!scanner->Peek().IsFixedLengthNumber(2) || in ParseES5DateTime()
332 !TimeComposer::IsHour(scanner->Peek().number())) { in ParseES5DateTime()
335 tz->SetAbsoluteHour(scanner->Next().number()); in ParseES5DateTime()
336 if (!scanner->SkipSymbol(':')) return DateToken::Invalid(); in ParseES5DateTime()
337 if (!scanner->Peek().IsFixedLengthNumber(2) || in ParseES5DateTime()
338 !TimeComposer::IsMinute(scanner->Peek().number())) { in ParseES5DateTime()
341 tz->SetAbsoluteMinute(scanner->Next().number()); in ParseES5DateTime()
344 if (!scanner->Peek().IsEndOfInput()) return DateToken::Invalid(); in ParseES5DateTime()