Changeset 31454 in webkit for trunk/JavaScriptCore/pcre/pcre_compile.cpp
- Timestamp:
- Mar 31, 2008, 1:01:09 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/pcre/pcre_compile.cpp
r31388 r31454 637 637 /* Handle single-character metacharacters. In multiline mode, ^ disables 638 638 the setting of any following char as a first character. */ 639 639 640 640 case '^': 641 641 if (options & MatchAcrossMultipleLinesOption) { 642 642 if (firstbyte == REQ_UNSET) 643 643 firstbyte = REQ_NONE; 644 } 644 *code++ = OP_BOL; 645 } else 646 *code++ = OP_CIRC; 645 647 previous = NULL; 646 *code++ = OP_CIRC;647 648 break; 648 649 649 650 case '$': 650 651 previous = NULL; 651 *code++ = OP_DOLL; 652 if (options & MatchAcrossMultipleLinesOption) 653 *code++ = OP_EOL; 654 else 655 *code++ = OP_DOLL; 652 656 break; 653 657 654 658 /* There can never be a first char if '.' is first, whatever happens about 655 659 repeats. The value of reqbyte doesn't change either. */ 656 660 657 661 case '.': 658 662 if (firstbyte == REQ_UNSET) … … 1905 1909 1906 1910 /* Explicit ^ */ 1907 return op == OP_CIRC ;1911 return op == OP_CIRC || op == OP_BOL; 1908 1912 } 1909 1913
Note:
See TracChangeset
for help on using the changeset viewer.