Lines Matching full:current
111 bool SubStringEquals(Iterator* current,
114 ASSERT(**current == *substring);
116 ++*current;
117 if (*current == end || **current != *substring) return false;
119 ++*current;
128 Iterator* current,
130 while (*current != end) {
131 if (!unicode_cache->IsWhiteSpace(**current)) return true;
132 ++*current;
138 // Parsing integers with radix 2, 4, 8, 16, 32. Assumes current != end.
141 Iterator current,
145 ASSERT(current != end);
148 while (*current == '0') {
149 ++current;
150 if (current == end) return SignedZero(negative);
159 if (*current >= '0' && *current <= '9' && *current < '0' + radix) {
160 digit = static_cast<char>(*current) - '0';
161 } else if (radix > 10 && *current >= 'a' && *current < 'a' + radix - 10) {
162 digit = static_cast<char>(*current) - 'a' + 10;
163 } else if (radix > 10 && *current >= 'A' && *current < 'A' + radix - 10) {
164 digit = static_cast<char>(*current) - 'A' + 10;
167 !AdvanceToNonspace(unicode_cache, ¤t, end)) {
192 ++current;
193 if (current == end || !isDigit(*current, radix)) break;
194 zero_tail = zero_tail && *current == '0';
199 AdvanceToNonspace(unicode_cache, ¤t, end)) {
221 ++current;
222 } while (current != end);
242 Iterator current,
248 if (!AdvanceToNonspace(unicode_cache, ¤t, end)) {
255 if (*current == '+') {
257 ++current;
258 if (current == end) {
261 } else if (*current == '-') {
262 ++current;
263 if (current == end) {
272 if (*current == '0') {
273 ++current;
274 if (current == end) return SignedZero(negative);
275 if (*current == 'x' || *current == 'X') {
277 ++current;
278 if (current == end) return JunkStringValue();
284 if (*current == '0') {
286 ++current;
287 if (current == end) return SignedZero(negative);
288 if (*current == 'x' || *current == 'X') {
289 ++current;
290 if (current == end) return JunkStringValue();
300 while (*current == '0') {
302 ++current;
303 if (current == end) return SignedZero(negative);
306 if (!leading_zero && !isDigit(*current, radix)) {
314 unicode_cache, current, end, negative, allow_trailing_junk);
317 unicode_cache, current, end, negative, allow_trailing_junk);
320 unicode_cache, current, end, negative, allow_trailing_junk);
324 unicode_cache, current, end, negative, allow_trailing_junk);
328 unicode_cache, current, end, negative, allow_trailing_junk);
342 while (*current >= '0' && *current <= '9') {
347 buffer[buffer_pos++] = static_cast<char>(*current);
349 ++current;
350 if (current == end) break;
354 AdvanceToNonspace(unicode_cache, ¤t, end)) {
386 if (*current >= '0' && *current < lim_0) {
387 d = *current - '0';
388 } else if (*current >= 'a' && *current < lim_a) {
389 d = *current - 'a' + 10;
390 } else if (*current >= 'A' && *current < lim_A) {
391 d = *current - 'A' + 10;
408 ++current;
409 if (current == end) {
420 AdvanceToNonspace(unicode_cache, ¤t, end)) {
430 // 1. current == end (other ops are not allowed), current != end.
431 // 2. *current - gets the current character in the sequence.
432 // 3. ++current (advances the position).
435 Iterator current,
441 // 1. Each '++current' statement is followed by check for equality to 'end'.
442 // 2. If AdvanceToNonspace returned false then current == end.
443 // 3. If 'current' becomes be equal to 'end' the function returns or goes to
445 // 4. 'current' is not dereferenced after the 'parsing_done' label.
446 // 5. Code before 'parsing_done' may rely on 'current != end'.
447 if (!AdvanceToNonspace(unicode_cache, ¤t, end)) {
473 if (*current == '+') {
475 ++current;
476 if (current == end) return JunkStringValue();
478 } else if (*current == '-') {
479 ++current;
480 if (current == end) return JunkStringValue();
485 if (*current == kInfinityString[0]) {
486 if (!SubStringEquals(¤t, end, kInfinityString)) {
491 AdvanceToNonspace(unicode_cache, ¤t, end)) {
500 if (*current == '0') {
501 ++current;
502 if (current == end) return SignedZero(sign == NEGATIVE);
507 if ((flags & ALLOW_HEX) && (*current == 'x' || *current == 'X')) {
508 ++current;
509 if (current == end || !isDigit(*current, 16) || sign != NONE) {
514 current,
520 } else if ((flags & ALLOW_OCTAL) && (*current == 'o' || *current == 'O')) {
521 ++current;
522 if (current == end || !isDigit(*current, 8) || sign != NONE) {
527 current,
533 } else if ((flags & ALLOW_BINARY) && (*current == 'b' || *current == 'B')) {
534 ++current;
535 if (current == end || !isBinaryDigit(*current) || sign != NONE) {
540 current,
547 while (*current == '0') {
548 ++current;
549 if (current == end) return SignedZero(sign == NEGATIVE);
556 while (*current >= '0' && *current <= '9') {
559 buffer[buffer_pos++] = static_cast<char>(*current);
564 nonzero_digit_dropped = nonzero_digit_dropped || *current != '0';
566 octal = octal && *current < '8';
567 ++current;
568 if (current == end) goto parsing_done;
575 if (*current == '.') {
579 ++current;
580 if (current == end) {
592 while (*current == '0') {
593 ++current;
594 if (current == end) return SignedZero(sign == NEGATIVE);
601 while (*current >= '0' && *current <= '9') {
604 buffer[buffer_pos++] = static_cast<char>(*current);
609 nonzero_digit_dropped = nonzero_digit_dropped || *current != '0';
611 ++current;
612 if (current == end) goto parsing_done;
625 if (*current == 'e' || *current == 'E') {
627 ++current;
628 if (current == end) {
636 if (*current == '+' || *current == '-') {
637 sign = static_cast<char>(*current);
638 ++current;
639 if (current == end) {
648 if (current == end || *current < '0' || *current > '9') {
661 int digit = *current - '0';
668 ++current;
669 } while (current != end && *current >= '0' && *current <= '9');
675 AdvanceToNonspace(unicode_cache, ¤t, end)) {