| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3853 } else { | 3853 } else { |
| 3854 ReportError(CStrVector(kInvalidQuantifier), CHECK_OK); | 3854 ReportError(CStrVector(kInvalidQuantifier), CHECK_OK); |
| 3855 } | 3855 } |
| 3856 *min_out = min; | 3856 *min_out = min; |
| 3857 *max_out = max; | 3857 *max_out = max; |
| 3858 return NULL; | 3858 return NULL; |
| 3859 } | 3859 } |
| 3860 | 3860 |
| 3861 | 3861 |
| 3862 // Upper and lower case letters differ by one bit. | 3862 // Upper and lower case letters differ by one bit. |
| 3863 STATIC_CHECK('a'^'A' == 0x20); | 3863 STATIC_CHECK(('a' ^ 'A') == 0x20); |
| 3864 | 3864 |
| 3865 uc32 RegExpParser::ParseControlLetterEscape(bool* ok) { | 3865 uc32 RegExpParser::ParseControlLetterEscape(bool* ok) { |
| 3866 if (!has_more()) { | 3866 if (!has_more()) { |
| 3867 ReportError(CStrVector("\\c at end of pattern"), ok); | 3867 ReportError(CStrVector("\\c at end of pattern"), ok); |
| 3868 return '\0'; | 3868 return '\0'; |
| 3869 } | 3869 } |
| 3870 uc32 letter = current() & ~(0x20); // Collapse upper and lower case letters. | 3870 uc32 letter = current() & ~(0x20); // Collapse upper and lower case letters. |
| 3871 if (letter < 'A' || 'Z' < letter) { | 3871 if (letter < 'A' || 'Z' < letter) { |
| 3872 // Non-spec error-correction: "\c" followed by non-control letter is | 3872 // Non-spec error-correction: "\c" followed by non-control letter is |
| 3873 // interpreted as an IdentityEscape of 'c'. | 3873 // interpreted as an IdentityEscape of 'c'. |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4212 start_position, | 4212 start_position, |
| 4213 is_expression); | 4213 is_expression); |
| 4214 return result; | 4214 return result; |
| 4215 } | 4215 } |
| 4216 | 4216 |
| 4217 | 4217 |
| 4218 #undef NEW | 4218 #undef NEW |
| 4219 | 4219 |
| 4220 | 4220 |
| 4221 } } // namespace v8::internal | 4221 } } // namespace v8::internal |
| OLD | NEW |