Changeset 255452 in webkit
- Timestamp:
- Jan 30, 2020 1:27:11 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r255440 r255452 1 2020-01-30 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 Incomplete braced quantifiers should be banned in Unicode patterns only 4 https://bugs.webkit.org/show_bug.cgi?id=206776 5 6 Reviewed by Darin Adler. 7 8 Although the change does not affect Unicode property escapes, a few 9 test/built-ins/RegExp/property-escapes/non-existent-property-value*.js files 10 are now passing because they had \\p or \\P instead of CharacterClassEscape. 11 12 * test262/expectations.yaml: Mark 18 test cases as passing. 13 1 14 2020-01-30 Keith Miller <keith_miller@apple.com> 2 15 … … 86 99 2020-01-26 Alexey Shvayka <shvaikalesh@gmail.com> 87 100 88 Invalid ranges in character classes should be banned in unicode patterns101 Invalid ranges in character classes should be banned in Unicode patterns only 89 102 https://bugs.webkit.org/show_bug.cgi?id=206768 90 103 -
trunk/JSTests/test262/expectations.yaml
r255134 r255452 12 12 default: 'Test262Error: Expected SameValue(«», «a») to be true' 13 13 strict mode: 'Test262Error: Expected SameValue(«», «a») to be true' 14 test/annexB/built-ins/RegExp/prototype/compile/pattern-string-invalid-u.js:15 default: 'Test262Error: invalid pattern: { Expected a SyntaxError to be thrown but no exception was thrown at all'16 strict mode: 'Test262Error: invalid pattern: { Expected a SyntaxError to be thrown but no exception was thrown at all'17 14 test/annexB/language/eval-code/direct/func-block-decl-eval-func-skip-early-err-block.js: 18 15 default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' … … 1520 1517 default: 'Test262Error: `\p{XID_Start}` should match U+001CFA (`ᳺ`)' 1521 1518 strict mode: 'Test262Error: `\p{XID_Start}` should match U+001CFA (`ᳺ`)' 1522 test/built-ins/RegExp/property-escapes/non-existent-property-value-General_Category-negated.js:1523 default: 'Test262: This statement should not be evaluated.'1524 strict mode: 'Test262: This statement should not be evaluated.'1525 test/built-ins/RegExp/property-escapes/non-existent-property-value-Script-negated.js:1526 default: 'Test262: This statement should not be evaluated.'1527 strict mode: 'Test262: This statement should not be evaluated.'1528 test/built-ins/RegExp/property-escapes/non-existent-property-value-Script.js:1529 default: 'Test262: This statement should not be evaluated.'1530 strict mode: 'Test262: This statement should not be evaluated.'1531 test/built-ins/RegExp/property-escapes/non-existent-property-value-Script_Extensions-negated.js:1532 default: 'Test262: This statement should not be evaluated.'1533 strict mode: 'Test262: This statement should not be evaluated.'1534 test/built-ins/RegExp/property-escapes/non-existent-property-value-Script_Extensions.js:1535 default: 'Test262: This statement should not be evaluated.'1536 strict mode: 'Test262: This statement should not be evaluated.'1537 test/built-ins/RegExp/property-escapes/non-existent-property-value-general-category.js:1538 default: 'Test262: This statement should not be evaluated.'1539 strict mode: 'Test262: This statement should not be evaluated.'1540 1519 test/built-ins/RegExp/proto-from-ctor-realm.js: 1541 1520 default: 'Test262Error: Expected SameValue(«/(?:)/», «/(?:)/») to be true' … … 1607 1586 default: 'Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all' 1608 1587 strict mode: 'Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all' 1609 test/built-ins/RegExp/unicode_restricted_incomple_quantifier.js:1610 default: 'Test262Error: RegExp("a{", "u"): Expected a SyntaxError to be thrown but no exception was thrown at all'1611 strict mode: 'Test262Error: RegExp("a{", "u"): Expected a SyntaxError to be thrown but no exception was thrown at all'1612 1588 test/built-ins/RegExp/unicode_restricted_octal_escape.js: 1613 1589 default: 'Test262Error: RegExp("[\1]", "u"): Expected a SyntaxError to be thrown but no exception was thrown at all' … … 3403 3379 default: 'Test262: This statement should not be evaluated.' 3404 3380 strict mode: 'Test262: This statement should not be evaluated.' 3405 test/language/literals/regexp/u-invalid-extended-pattern-char.js:3406 default: 'Test262: This statement should not be evaluated.'3407 strict mode: 'Test262: This statement should not be evaluated.'3408 3381 test/language/literals/regexp/u-invalid-legacy-octal-escape.js: 3409 3382 default: 'Test262: This statement should not be evaluated.' -
trunk/LayoutTests/ChangeLog
r255448 r255452 1 2020-01-30 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 Incomplete braced quantifiers should be banned in Unicode patterns only 4 https://bugs.webkit.org/show_bug.cgi?id=206776 5 6 Reviewed by Darin Adler. 7 8 An error message test is added for this change and for webkit.org/b/206768. 9 Other tests are adjusted for capitalized "Unicode" in error messages. 10 11 * js/regexp-named-capture-groups-expected.txt: 12 * js/regexp-unicode-expected.txt: 13 * js/regress-158080-expected.txt: 14 * js/script-tests/regexp-named-capture-groups.js: 15 * js/script-tests/regexp-unicode.js: 16 1 17 2020-01-30 Doug Kelly <dougk@apple.com> 2 18 -
trunk/LayoutTests/js/regexp-named-capture-groups-expected.txt
r235882 r255452 50 50 PASS "Give me \'k2\'!".match(/Give me \'\k2\'/)[0] is "Give me \'k2\'" 51 51 PASS "Give me a \'kat\'!".match(/Give me a \'\kat\'/)[0] is "Give me a \'kat\'" 52 PASS "Give me a \'k\'!".match(/Give me a \'\k\'/u)[0] threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern.53 PASS "Give me \'k2\'!".match(/Give me \'\k2\'/u)[0] threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern.54 PASS "Give me a \'kat\'!".match(/Give me a \'\kat\'/u)[0] threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern.52 PASS "Give me a \'k\'!".match(/Give me a \'\k\'/u)[0] threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 53 PASS "Give me \'k2\'!".match(/Give me \'\k2\'/u)[0] threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 54 PASS "Give me a \'kat\'!".match(/Give me a \'\kat\'/u)[0] threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 55 55 PASS "10/20/1930".replace(/(?<month>\d{2})\/(?<day>\d{2})\/(?<year>\d{4})/, "$<day>-$<mouth>-$<year>") is "20--1930" 56 56 PASS "10/20/1930".replace(/(?<month>\d{2})\/(?<day>\d{2})\/(?<year>\d{4})/, "$<day>-$<month>-$<year") is "20-10-$<year" … … 67 67 PASS "1122332211".match(/\k<ones>\k<twos>\k<threes>(?<ones>1*)(?<twos>2*)(?<threes>3*)\k<threes>\k<twos>\k<ones>/u) is ["1122332211", "11", "22", "3"] 68 68 PASS "\k<z>XzzX".match(/\k<z>X(z*)X/) is ["k<z>XzzX", "zz"] 69 PASS "\k<z>XzzX".match(/\k<z>X(z*)X/u) threw exception SyntaxError: Invalid regular expression: invalid backreference for unicode pattern.69 PASS "\k<z>XzzX".match(/\k<z>X(z*)X/u) threw exception SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern. 70 70 PASS successfullyParsed is true 71 71 -
trunk/LayoutTests/js/regexp-unicode-expected.txt
r243839 r255452 164 164 PASS "this is ba test".match(/is b\cha test/u)[0].length is 11 165 165 PASS new RegExp("\\/", "u").source is "\\/" 166 PASS r = new RegExp("\\u{110000}", "u") threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.166 PASS r = new RegExp("\\u{110000}", "u") threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 167 167 PASS r = new RegExp("𐐅{2147483648}", "u") threw exception SyntaxError: Invalid regular expression: pattern exceeds string length limits. 168 PASS r = new RegExp("\\-", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern. 169 PASS r = new RegExp("\\a", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern. 170 PASS r = new RegExp("[\\a]", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern. 171 PASS r = new RegExp("[\\b]", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern. 172 PASS r = new RegExp("[\\B]", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern. 173 PASS r = new RegExp("\\x", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern. 174 PASS r = new RegExp("[\\x]", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern. 175 PASS r = new RegExp("\\u", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern. 176 PASS r = new RegExp("[\\u]", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern. 177 PASS r = new RegExp("\\u{", "u") threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape. 178 PASS r = new RegExp("\\u{\udead", "u") threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape. 179 PASS /\1/u threw exception SyntaxError: Invalid regular expression: invalid backreference for unicode pattern. 180 PASS /\2/u threw exception SyntaxError: Invalid regular expression: invalid backreference for unicode pattern. 181 PASS /\3/u threw exception SyntaxError: Invalid regular expression: invalid backreference for unicode pattern. 182 PASS /\4/u threw exception SyntaxError: Invalid regular expression: invalid backreference for unicode pattern. 183 PASS /\5/u threw exception SyntaxError: Invalid regular expression: invalid backreference for unicode pattern. 184 PASS /\6/u threw exception SyntaxError: Invalid regular expression: invalid backreference for unicode pattern. 185 PASS /\7/u threw exception SyntaxError: Invalid regular expression: invalid backreference for unicode pattern. 186 PASS /\8/u threw exception SyntaxError: Invalid regular expression: invalid backreference for unicode pattern. 187 PASS /\9/u threw exception SyntaxError: Invalid regular expression: invalid backreference for unicode pattern. 168 PASS /{/u threw exception SyntaxError: Invalid regular expression: incomplete {} quantifier for Unicode pattern. 169 PASS /[a-\d]/u threw exception SyntaxError: Invalid regular expression: invalid range in character class for Unicode pattern. 170 PASS r = new RegExp("\\-", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 171 PASS r = new RegExp("\\a", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 172 PASS r = new RegExp("[\\a]", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 173 PASS r = new RegExp("[\\b]", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 174 PASS r = new RegExp("[\\B]", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 175 PASS r = new RegExp("\\x", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 176 PASS r = new RegExp("[\\x]", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 177 PASS r = new RegExp("\\u", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 178 PASS r = new RegExp("[\\u]", "u") threw exception SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern. 179 PASS r = new RegExp("\\u{", "u") threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 180 PASS r = new RegExp("\\u{\udead", "u") threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 181 PASS /\1/u threw exception SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern. 182 PASS /\2/u threw exception SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern. 183 PASS /\3/u threw exception SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern. 184 PASS /\4/u threw exception SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern. 185 PASS /\5/u threw exception SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern. 186 PASS /\6/u threw exception SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern. 187 PASS /\7/u threw exception SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern. 188 PASS /\8/u threw exception SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern. 189 PASS /\9/u threw exception SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern. 188 190 PASS /(.)\1/u did not throw exception. 189 191 PASS /(.)(.)\2/u did not throw exception. 190 PASS /(.)(.)\3/u threw exception SyntaxError: Invalid regular expression: invalid backreference for unicode pattern.192 PASS /(.)(.)\3/u threw exception SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern. 191 193 PASS /\1/ did not throw exception. 192 194 PASS /\2/ did not throw exception. -
trunk/LayoutTests/js/regress-158080-expected.txt
r203202 r255452 4 4 5 5 6 PASS let r = /\u{|abc/u threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.7 PASS let r = /\u{/u threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.8 PASS let r = /\u{1/u threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.9 PASS let r = /\u{12/u threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.10 PASS let r = /\u{123/u threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.11 PASS let r = /\u{1234/u threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.12 PASS let r = /\u{abcde/u threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.13 PASS let r = /\u{abcdef/u threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.14 PASS let r = /\u{1111111}/u threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.15 PASS let r = /\u{fedbca98}/u threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.16 PASS let r = /\u{1{123}}/u threw exception SyntaxError: Invalid regular expression: invalid unicode {} escape.6 PASS let r = /\u{|abc/u threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 7 PASS let r = /\u{/u threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 8 PASS let r = /\u{1/u threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 9 PASS let r = /\u{12/u threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 10 PASS let r = /\u{123/u threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 11 PASS let r = /\u{1234/u threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 12 PASS let r = /\u{abcde/u threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 13 PASS let r = /\u{abcdef/u threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 14 PASS let r = /\u{1111111}/u threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 15 PASS let r = /\u{fedbca98}/u threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 16 PASS let r = /\u{1{123}}/u threw exception SyntaxError: Invalid regular expression: invalid Unicode {} escape. 17 17 PASS successfullyParsed is true 18 18 -
trunk/LayoutTests/js/script-tests/regexp-named-capture-groups.js
r235882 r255452 86 86 shouldBe('"Give me a \\\'kat\\\'!".match(/Give me a \\\'\\\kat\\\'/)[0]', '"Give me a \\\'kat\\\'"'); 87 87 // Verify that named back references for non-existing named group matches the k<groupName> throw for unicode patterns. 88 shouldThrow('"Give me a \\\'k\\\'!".match(/Give me a \\\'\\\k\\\'/u)[0]', '"SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern"');89 shouldThrow('"Give me \\\'k2\\\'!".match(/Give me \\\'\\\k2\\\'/u)[0]', '"SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern"');90 shouldThrow('"Give me a \\\'kat\\\'!".match(/Give me a \\\'\\\kat\\\'/u)[0]', '"SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern"');88 shouldThrow('"Give me a \\\'k\\\'!".match(/Give me a \\\'\\\k\\\'/u)[0]', '"SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern"'); 89 shouldThrow('"Give me \\\'k2\\\'!".match(/Give me \\\'\\\k2\\\'/u)[0]', '"SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern"'); 90 shouldThrow('"Give me a \\\'kat\\\'!".match(/Give me a \\\'\\\kat\\\'/u)[0]', '"SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern"'); 91 91 92 92 // Check invalid group name specifiers in a replace string. … … 114 114 // matches for non-unicode patterns and throws for unicode patterns. 115 115 shouldBe('"\\\k<z>XzzX".match(/\\\k<z>X(z*)X/)', '["k<z>XzzX", "zz"]'); 116 shouldThrow('"\\\k<z>XzzX".match(/\\\k<z>X(z*)X/u)', '"SyntaxError: Invalid regular expression: invalid backreference for unicode pattern"');116 shouldThrow('"\\\k<z>XzzX".match(/\\\k<z>X(z*)X/u)', '"SyntaxError: Invalid regular expression: invalid backreference for Unicode pattern"'); -
trunk/LayoutTests/js/script-tests/regexp-unicode.js
r243839 r255452 229 229 // Check that invalid unicode patterns throw exceptions 230 230 shouldBe('new RegExp("\\\\/", "u").source', '"\\\\/"'); 231 shouldThrow('r = new RegExp("\\\\u{110000}", "u")', '"SyntaxError: Invalid regular expression: invalid unicode {} escape"');231 shouldThrow('r = new RegExp("\\\\u{110000}", "u")', '"SyntaxError: Invalid regular expression: invalid Unicode {} escape"'); 232 232 shouldThrow('r = new RegExp("\u{10405}{2147483648}", "u")', '"SyntaxError: Invalid regular expression: pattern exceeds string length limits"'); 233 234 var invalidEscapeException = "SyntaxError: Invalid regular expression: invalid escaped character for unicode pattern"; 233 shouldThrow('/{/u', '"SyntaxError: Invalid regular expression: incomplete {} quantifier for Unicode pattern"'); 234 shouldThrow('/[a-\\d]/u', '"SyntaxError: Invalid regular expression: invalid range in character class for Unicode pattern"'); 235 236 var invalidEscapeException = "SyntaxError: Invalid regular expression: invalid escaped character for Unicode pattern"; 235 237 var newRegExp; 236 238 … … 252 254 shouldThrowInvalidEscape("[\\\\u]"); 253 255 254 shouldThrowInvalidEscape("\\\\u{", '"SyntaxError: Invalid regular expression: invalid unicode {} escape"');255 shouldThrowInvalidEscape("\\\\u{\\udead", '"SyntaxError: Invalid regular expression: invalid unicode {} escape"');256 shouldThrowInvalidEscape("\\\\u{", '"SyntaxError: Invalid regular expression: invalid Unicode {} escape"'); 257 shouldThrowInvalidEscape("\\\\u{\\udead", '"SyntaxError: Invalid regular expression: invalid Unicode {} escape"'); 256 258 257 259 // Check that invalid backreferences in unicode patterns throw exceptions. -
trunk/Source/JavaScriptCore/ChangeLog
r255449 r255452 1 2020-01-30 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 Incomplete braced quantifiers should be banned in Unicode patterns only 4 https://bugs.webkit.org/show_bug.cgi?id=206776 5 6 Reviewed by Darin Adler. 7 8 This change adds SyntaxError for Unicode patterns, aligning JSC with 9 V8 and SpiderMonkey, and also capitalizes "Unicode" in error messages. 10 11 Grammar: https://tc39.es/ecma262/#prod-annexB-Term 12 (/u flag precludes the use of ExtendedAtom and thus InvalidBracedQuantifier) 13 14 * yarr/YarrErrorCode.cpp: 15 (JSC::Yarr::errorMessage): 16 (JSC::Yarr::errorToThrow): 17 * yarr/YarrErrorCode.h: 18 * yarr/YarrParser.h: 19 (JSC::Yarr::Parser::parseTokens): 20 1 21 2020-01-30 Yusuke Suzuki <ysuzuki@apple.com> 2 22 … … 381 401 2020-01-26 Alexey Shvayka <shvaikalesh@gmail.com> 382 402 383 Invalid ranges in character classes should be banned in unicode patterns403 Invalid ranges in character classes should be banned in Unicode patterns only 384 404 https://bugs.webkit.org/show_bug.cgi?id=206768 385 405 … … 388 408 In ES5, grammar of CharacterRange was ambiguous, resulting in invalid ranges 389 409 like /[\d-a]/ being allowed. As of ES2015, invalid ranges are SyntaxError in 390 unicode patterns, yet still allowed in regular ones to avoid breaking the web.410 Unicode patterns, yet still allowed in regular ones to avoid breaking the web. 391 411 (https://tc39.es/ecma262/#sec-patterns-static-semantics-early-errors-annexb) 392 412 393 This change adds SyntaxError for unicode patterns and updates explanatory413 This change adds SyntaxError for Unicode patterns and updates explanatory 394 414 comments. ErrorCode::CharacterClassOutOfOrder is renamed for consistency 395 415 with newly added error code and ErrorCode::ParenthesesTypeInvalid. -
trunk/Source/JavaScriptCore/yarr/YarrErrorCode.cpp
r255134 r255452 41 41 REGEXP_ERROR_PREFIX "nothing to repeat", // QuantifierWithoutAtom 42 42 REGEXP_ERROR_PREFIX "number too large in {} quantifier", // QuantifierTooLarge 43 REGEXP_ERROR_PREFIX "incomplete {} quantifier for Unicode pattern", // QuantifierIncomplete 43 44 REGEXP_ERROR_PREFIX "missing )", // MissingParentheses 44 45 REGEXP_ERROR_PREFIX "unmatched parentheses", // ParenthesesUnmatched … … 48 49 REGEXP_ERROR_PREFIX "missing terminating ] for character class", // CharacterClassUnmatched 49 50 REGEXP_ERROR_PREFIX "range out of order in character class", // CharacterClassRangeOutOfOrder 50 REGEXP_ERROR_PREFIX "invalid range in character class for unicode pattern", // CharacterClassRangeInvalid51 REGEXP_ERROR_PREFIX "invalid range in character class for Unicode pattern", // CharacterClassRangeInvalid 51 52 REGEXP_ERROR_PREFIX "\\ at end of pattern", // EscapeUnterminated 52 REGEXP_ERROR_PREFIX "invalid unicode {} escape", // InvalidUnicodeEscape53 REGEXP_ERROR_PREFIX "invalid backreference for unicode pattern", // InvalidBackreference54 REGEXP_ERROR_PREFIX "invalid escaped character for unicode pattern", // InvalidIdentityEscape53 REGEXP_ERROR_PREFIX "invalid Unicode {} escape", // InvalidUnicodeEscape 54 REGEXP_ERROR_PREFIX "invalid backreference for Unicode pattern", // InvalidBackreference 55 REGEXP_ERROR_PREFIX "invalid escaped character for Unicode pattern", // InvalidIdentityEscape 55 56 REGEXP_ERROR_PREFIX "invalid property expression", // InvalidUnicodePropertyExpression 56 57 REGEXP_ERROR_PREFIX "too many nested disjunctions", // TooManyDisjunctions … … 72 73 case ErrorCode::QuantifierWithoutAtom: 73 74 case ErrorCode::QuantifierTooLarge: 75 case ErrorCode::QuantifierIncomplete: 74 76 case ErrorCode::MissingParentheses: 75 77 case ErrorCode::ParenthesesUnmatched: -
trunk/Source/JavaScriptCore/yarr/YarrErrorCode.h
r255134 r255452 40 40 QuantifierWithoutAtom, 41 41 QuantifierTooLarge, 42 QuantifierIncomplete, 42 43 MissingParentheses, 43 44 ParenthesesUnmatched, -
trunk/Source/JavaScriptCore/yarr/YarrParser.h
r255134 r255452 818 818 } 819 819 820 if (m_isUnicode) { 821 m_errorCode = ErrorCode::QuantifierIncomplete; 822 break; 823 } 824 820 825 restoreState(state); 821 }822 // if we did not find a complete quantifer, fall through to the default case.823 FALLTHROUGH;826 // if we did not find a complete quantifer, fall through to the default case. 827 FALLTHROUGH; 828 } 824 829 825 830 default:
Note: See TracChangeset
for help on using the changeset viewer.