@@ 463-465 (lines=3) @@ | ||
460 | if( $ch === "'" || $ch === '"' ) { |
|
461 | // Search to the end of the string literal, skipping over backslash escapes |
|
462 | $search = $ch . '\\'; |
|
463 | do{ |
|
464 | $end += strcspn( $s, $search, $end ) + 2; |
|
465 | } while( $end - 2 < $length && $s[$end - 2] === '\\' ); |
|
466 | $end--; |
|
467 | // We have to distinguish between regexp literals and division operators |
|
468 | // A division operator is only possible in certain states |
|
@@ 473-475 (lines=3) @@ | ||
470 | // Regexp literal, search to the end, skipping over backslash escapes and |
|
471 | // character classes |
|
472 | for( ; ; ) { |
|
473 | do{ |
|
474 | $end += strcspn( $s, '/[\\', $end ) + 2; |
|
475 | } while( $end - 2 < $length && $s[$end - 2] === '\\' ); |
|
476 | $end--; |
|
477 | if( $end - 1 >= $length || $s[$end - 1] === '/' ) { |
|
478 | break; |
|
@@ 480-482 (lines=3) @@ | ||
477 | if( $end - 1 >= $length || $s[$end - 1] === '/' ) { |
|
478 | break; |
|
479 | } |
|
480 | do{ |
|
481 | $end += strcspn( $s, ']\\', $end ) + 2; |
|
482 | } while( $end - 2 < $length && $s[$end - 2] === '\\' ); |
|
483 | $end--; |
|
484 | }; |
|
485 | // Search past the regexp modifiers (gi) |