• Home
  • Raw
  • Download

Lines Matching refs:current

86 static inline bool ConsumeSubStringImpl(Iterator* current,  in ConsumeSubStringImpl()  argument
90 DOUBLE_CONVERSION_ASSERT(converter(**current) == *substring); in ConsumeSubStringImpl()
92 ++*current; in ConsumeSubStringImpl()
93 if (*current == end || converter(**current) != *substring) { in ConsumeSubStringImpl()
97 ++*current; in ConsumeSubStringImpl()
104 static bool ConsumeSubString(Iterator* current, in ConsumeSubString() argument
109 return ConsumeSubStringImpl(current, end, substring, ToLower); in ConsumeSubString()
111 return ConsumeSubStringImpl(current, end, substring, Pass); in ConsumeSubString()
160 static inline bool AdvanceToNonspace(Iterator* current, Iterator end) { in AdvanceToNonspace() argument
161 while (*current != end) { in AdvanceToNonspace()
162 if (!isWhitespace(**current)) return true; in AdvanceToNonspace()
163 ++*current; in AdvanceToNonspace()
243 Iterator current = start; in IsHexFloatString() local
246 while (isDigit(*current, 16)) { in IsHexFloatString()
248 if (Advance(&current, separator, 16, end)) return false; in IsHexFloatString()
250 if (*current == '.') { in IsHexFloatString()
251 if (Advance(&current, separator, 16, end)) return false; in IsHexFloatString()
252 while (isDigit(*current, 16)) { in IsHexFloatString()
254 if (Advance(&current, separator, 16, end)) return false; in IsHexFloatString()
258 if (*current != 'p' && *current != 'P') return false; in IsHexFloatString()
259 if (Advance(&current, separator, 16, end)) return false; in IsHexFloatString()
260 if (*current == '+' || *current == '-') { in IsHexFloatString()
261 if (Advance(&current, separator, 16, end)) return false; in IsHexFloatString()
263 if (!isDigit(*current, 10)) return false; in IsHexFloatString()
264 if (Advance(&current, separator, 16, end)) return true; in IsHexFloatString()
265 while (isDigit(*current, 10)) { in IsHexFloatString()
266 if (Advance(&current, separator, 16, end)) return true; in IsHexFloatString()
268 return allow_trailing_junk || !AdvanceToNonspace(&current, end); in IsHexFloatString()
277 static double RadixStringToIeee(Iterator* current, in RadixStringToIeee() argument
286 DOUBLE_CONVERSION_ASSERT(*current != end); in RadixStringToIeee()
288 IsHexFloatString(*current, end, separator, allow_trailing_junk)); in RadixStringToIeee()
304 while (**current == '0') { in RadixStringToIeee()
305 if (Advance(current, separator, radix, end)) { in RadixStringToIeee()
313 if (IsDecimalDigitForRadix(**current, radix)) { in RadixStringToIeee()
314 digit = static_cast<char>(**current) - '0'; in RadixStringToIeee()
316 } else if (IsCharacterDigitForRadix(**current, radix, 'a')) { in RadixStringToIeee()
317 digit = static_cast<char>(**current) - 'a' + 10; in RadixStringToIeee()
319 } else if (IsCharacterDigitForRadix(**current, radix, 'A')) { in RadixStringToIeee()
320 digit = static_cast<char>(**current) - 'A' + 10; in RadixStringToIeee()
322 } else if (parse_as_hex_float && **current == '.') { in RadixStringToIeee()
324 Advance(current, separator, radix, end); in RadixStringToIeee()
325 DOUBLE_CONVERSION_ASSERT(*current != end); in RadixStringToIeee()
327 } else if (parse_as_hex_float && (**current == 'p' || **current == 'P')) { in RadixStringToIeee()
330 if (allow_trailing_junk || !AdvanceToNonspace(current, end)) { in RadixStringToIeee()
355 if (Advance(current, separator, radix, end)) break; in RadixStringToIeee()
356 if (parse_as_hex_float && **current == '.') { in RadixStringToIeee()
359 Advance(current, separator, radix, end); in RadixStringToIeee()
360 DOUBLE_CONVERSION_ASSERT(*current != end); in RadixStringToIeee()
363 if (!isDigit(**current, radix)) break; in RadixStringToIeee()
364 zero_tail = zero_tail && **current == '0'; in RadixStringToIeee()
370 AdvanceToNonspace(current, end)) { in RadixStringToIeee()
392 if (Advance(current, separator, radix, end)) break; in RadixStringToIeee()
401 DOUBLE_CONVERSION_ASSERT(**current == 'p' || **current == 'P'); in RadixStringToIeee()
402 Advance(current, separator, radix, end); in RadixStringToIeee()
403 DOUBLE_CONVERSION_ASSERT(*current != end); in RadixStringToIeee()
405 if (**current == '+') { in RadixStringToIeee()
406 Advance(current, separator, radix, end); in RadixStringToIeee()
407 DOUBLE_CONVERSION_ASSERT(*current != end); in RadixStringToIeee()
408 } else if (**current == '-') { in RadixStringToIeee()
410 Advance(current, separator, radix, end); in RadixStringToIeee()
411 DOUBLE_CONVERSION_ASSERT(*current != end); in RadixStringToIeee()
414 while (IsDecimalDigitForRadix(**current, 10)) { in RadixStringToIeee()
418 written_exponent = 10 * written_exponent + **current - '0'; in RadixStringToIeee()
420 if (Advance(current, separator, radix, end)) break; in RadixStringToIeee()
445 Iterator current = input; in StringToIeee() local
464 if (current == end) return empty_string_value_; in StringToIeee()
467 if (!AdvanceToNonspace(&current, end)) { in StringToIeee()
468 *processed_characters_count = static_cast<int>(current - input); in StringToIeee()
471 if (!allow_leading_spaces && (input != current)) { in StringToIeee()
486 if (*current == '+' || *current == '-') { in StringToIeee()
487 sign = (*current == '-'); in StringToIeee()
488 ++current; in StringToIeee()
489 Iterator next_non_space = current; in StringToIeee()
492 if (!allow_spaces_after_sign && (current != next_non_space)) { in StringToIeee()
495 current = next_non_space; in StringToIeee()
499 if (ConsumeFirstCharacter(*current, infinity_symbol_, allow_case_insensitivity)) { in StringToIeee()
500 if (!ConsumeSubString(&current, end, infinity_symbol_, allow_case_insensitivity)) { in StringToIeee()
504 if (!(allow_trailing_spaces || allow_trailing_junk) && (current != end)) { in StringToIeee()
507 if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) { in StringToIeee()
511 *processed_characters_count = static_cast<int>(current - input); in StringToIeee()
517 if (ConsumeFirstCharacter(*current, nan_symbol_, allow_case_insensitivity)) { in StringToIeee()
518 if (!ConsumeSubString(&current, end, nan_symbol_, allow_case_insensitivity)) { in StringToIeee()
522 if (!(allow_trailing_spaces || allow_trailing_junk) && (current != end)) { in StringToIeee()
525 if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) { in StringToIeee()
529 *processed_characters_count = static_cast<int>(current - input); in StringToIeee()
535 if (*current == '0') { in StringToIeee()
536 if (Advance(&current, separator_, 10, end)) { in StringToIeee()
537 *processed_characters_count = static_cast<int>(current - input); in StringToIeee()
545 (*current == 'x' || *current == 'X')) { in StringToIeee()
546 ++current; in StringToIeee()
548 if (current == end) return junk_string_value_; // "0x" in StringToIeee()
551 IsHexFloatString(current, end, separator_, allow_trailing_junk); in StringToIeee()
553 if (!parse_as_hex_float && !isDigit(*current, 16)) { in StringToIeee()
558 double result = RadixStringToIeee<4>(&current, in StringToIeee()
568 if (allow_trailing_spaces) AdvanceToNonspace(&current, end); in StringToIeee()
569 *processed_characters_count = static_cast<int>(current - input); in StringToIeee()
575 while (*current == '0') { in StringToIeee()
576 if (Advance(&current, separator_, 10, end)) { in StringToIeee()
577 *processed_characters_count = static_cast<int>(current - input); in StringToIeee()
592 while (*current >= '0' && *current <= '9') { in StringToIeee()
595 buffer[buffer_pos++] = static_cast<char>(*current); in StringToIeee()
600 nonzero_digit_dropped = nonzero_digit_dropped || *current != '0'; in StringToIeee()
602 octal = octal && *current < '8'; in StringToIeee()
603 if (Advance(&current, separator_, 10, end)) goto parsing_done; in StringToIeee()
610 if (*current == '.') { in StringToIeee()
614 if (Advance(&current, separator_, 10, end)) { in StringToIeee()
626 while (*current == '0') { in StringToIeee()
627 if (Advance(&current, separator_, 10, end)) { in StringToIeee()
628 *processed_characters_count = static_cast<int>(current - input); in StringToIeee()
637 while (*current >= '0' && *current <= '9') { in StringToIeee()
640 buffer[buffer_pos++] = static_cast<char>(*current); in StringToIeee()
645 nonzero_digit_dropped = nonzero_digit_dropped || *current != '0'; in StringToIeee()
647 if (Advance(&current, separator_, 10, end)) goto parsing_done; in StringToIeee()
660 if (*current == 'e' || *current == 'E') { in StringToIeee()
663 Iterator junk_begin = current; in StringToIeee()
664 ++current; in StringToIeee()
665 if (current == end) { in StringToIeee()
667 current = junk_begin; in StringToIeee()
674 if (*current == '+' || *current == '-') { in StringToIeee()
675 exponen_sign = static_cast<char>(*current); in StringToIeee()
676 ++current; in StringToIeee()
677 if (current == end) { in StringToIeee()
679 current = junk_begin; in StringToIeee()
687 if (current == end || *current < '0' || *current > '9') { in StringToIeee()
689 current = junk_begin; in StringToIeee()
701 int digit = *current - '0'; in StringToIeee()
708 ++current; in StringToIeee()
709 } while (current != end && *current >= '0' && *current <= '9'); in StringToIeee()
714 if (!(allow_trailing_spaces || allow_trailing_junk) && (current != end)) { in StringToIeee()
717 if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) { in StringToIeee()
721 AdvanceToNonspace(&current, end); in StringToIeee()
741 *processed_characters_count = static_cast<int>(current - input); in StringToIeee()
765 *processed_characters_count = static_cast<int>(current - input); in StringToIeee()