diff --git a/es2panda/lexer/keywordsUtil.cpp b/es2panda/lexer/keywordsUtil.cpp index f939f10c57a3653b2afab759baf7e3b88d2e91b6..eb8230ee4d1631ae1d77f14fa3d7b81646d83148 100644 --- a/es2panda/lexer/keywordsUtil.cpp +++ b/es2panda/lexer/keywordsUtil.cpp @@ -177,8 +177,8 @@ bool KeywordsUtil::IsIdentifierStart(char32_t cp) if (cp < LEX_ASCII_MAX_BITS) { return (ASCII_FLAGS[cp] & AsciiFlags::ID_START) != 0; } - - auto uchar = static_cast(cp); + // Unicode {xxxxx} may consist of 4 bytes information and cannot be forcibly converted to 2 bytes + auto uchar = static_cast(cp); return u_hasBinaryProperty(uchar, UCHAR_ID_START); } @@ -188,8 +188,11 @@ bool KeywordsUtil::IsIdentifierPart(char32_t cp) return (ASCII_FLAGS[cp] & AsciiFlags::ID_CONTINUE) != 0; } - // u_isIDPart or Other_ID_Continue characters or ZWJ/ZWNJ. - auto uchar = static_cast(cp); + /** + * u_isIDPart or Other_ID_Continue characters or ZWJ/ZWNJ. + * Unicode {xxxxx} may consist of 4 bytes information and cannot be forcibly converted to 2 bytes + */ + auto uchar = static_cast(cp); return (u_hasBinaryProperty(uchar, UCHAR_ID_CONTINUE) || cp == LEX_CHAR_ZWNJ || cp == LEX_CHAR_ZWJ); } diff --git a/es2panda/lexer/lexer.cpp b/es2panda/lexer/lexer.cpp index 9a587def598321aaecde54d2bb9b87b4baf1a97f..dd34c9c4fc9a4edbbf1711e05bb5570b8931fb99 100644 --- a/es2panda/lexer/lexer.cpp +++ b/es2panda/lexer/lexer.cpp @@ -479,16 +479,6 @@ LexerTemplateString Lexer::ScanTemplateString() Iterator().Forward(1); char32_t nextCp = Iterator().Peek(); - if (IsOctalDigit(nextCp)) { - Iterator().Forward(1); - - if (Iterator().Peek() != LEX_CHAR_BACK_TICK) { - ThrowError("Octal escape sequences are not allowed in template strings"); - } - - Iterator().Backward(1); - } - if (nextCp == LEX_CHAR_BACK_TICK || nextCp == LEX_CHAR_BACKSLASH || nextCp == LEX_CHAR_DOLLAR_SIGN) { templateStr.str.Append(cp); templateStr.str.Append(nextCp); @@ -596,6 +586,7 @@ void Lexer::ScanStringUnicodePart(util::UString *str) case LEX_CHAR_0: { Iterator().Forward(1); bool isDecimal = IsDecimalDigit(Iterator().Peek()); + bool isOctal = IsOctalDigit(Iterator().Peek()); Iterator().Backward(1); if (!isDecimal) { @@ -603,6 +594,10 @@ void Lexer::ScanStringUnicodePart(util::UString *str) break; } + if (isOctal) { + ThrowError("Octal escape sequences are not allowed in strict mode"); + } + [[fallthrough]]; } default: { @@ -1101,9 +1096,12 @@ RegExpFlags Lexer::ScanRegExpFlags() flag = RegExpFlags::STICKY; break; } - default: { + case LEX_CHAR_SP: { return resultFlags; } + default: { + ThrowError("Invalid RegExp flag"); + } } if (flag == RegExpFlags::EMPTY || (resultFlags & flag) != 0) { diff --git a/es2panda/lexer/regexp/regexp.cpp b/es2panda/lexer/regexp/regexp.cpp index ea4356ce4d3197899d12b86c0fa13d20f48cd5b9..f2885fc5aabefe37512edac3873f06f5254da106 100644 --- a/es2panda/lexer/regexp/regexp.cpp +++ b/es2panda/lexer/regexp/regexp.cpp @@ -456,16 +456,20 @@ void RegExpParser::ParseAtomEscape() switch (cp) { case LEX_CHAR_LOWERCASE_X: { - ParseHexEscape(); + if (Unicode()) { + ParseHexEscape(); + } break; } case LEX_CHAR_LOWERCASE_U: { - ParseUnicodeEscape(); + if (Unicode()) { + ParseUnicodeEscape(); + } break; } case LEX_CHAR_LOWERCASE_K: { ParseNamedBackreference(); - return; + break; } /* ControlEscape */ case LEX_CHAR_LOWERCASE_F: @@ -480,12 +484,12 @@ void RegExpParser::ParseAtomEscape() case LEX_CHAR_UPPERCASE_S: case LEX_CHAR_LOWERCASE_W: case LEX_CHAR_UPPERCASE_W: { - return; + break; } case LEX_CHAR_LOWERCASE_P: case LEX_CHAR_UPPERCASE_P: { ParseUnicodePropertyEscape(); - return; + break; } case LEX_CHAR_LOWERCASE_C: { cp = Peek(); @@ -495,7 +499,7 @@ void RegExpParser::ParseAtomEscape() } Next(); - return; + break; } default: { /* IdentityEscape */ @@ -583,6 +587,7 @@ uint32_t RegExpParser::ParseLegacyOctalEscape() uint32_t RegExpParser::ParseHexEscape() { + // two hexadecimal digits after x in the regular expression char32_t digit = Next(); if (!IsHexDigit(digit)) { ThrowError("Invalid hex escape"); @@ -814,13 +819,13 @@ bool RegExpParser::ParsePatternCharacter() static bool IsIdStart(uint32_t cp) { - auto uchar = static_cast(cp); + auto uchar = static_cast(cp); return u_isIDStart(uchar) != 0 || cp == LEX_CHAR_DOLLAR_SIGN || cp == LEX_CHAR_UNDERSCORE; } static bool IsIdCont(uint32_t cp) { - auto uchar = static_cast(cp); + auto uchar = static_cast(cp); return u_isIDPart(uchar) != 0 || cp == LEX_CHAR_DOLLAR_SIGN || cp == LEX_CHAR_ZWNJ || cp == LEX_CHAR_ZWJ; } diff --git a/es2panda/lexer/token/letters.h b/es2panda/lexer/token/letters.h index cb8c574b5cef47dffe595c5e4db71ecef3476b5d..fe2f1168cc2952969dbcf8bc93abb498dbb325b4 100644 --- a/es2panda/lexer/token/letters.h +++ b/es2panda/lexer/token/letters.h @@ -80,7 +80,7 @@ namespace panda::es2panda::lexer { #define LEX_CHAR_UPPERCASE_W 0X57 /* W */ #define LEX_CHAR_UPPERCASE_X 0x58 /* X */ #define LEX_CHAR_UPPERCASE_Y 0x59 /* Y */ -#define LEX_CHAR_UPPERCASE_Z 0x5A /* X */ +#define LEX_CHAR_UPPERCASE_Z 0x5A /* Z */ #define LEX_CHAR_BS 0x08 /* backspace */ #define LEX_CHAR_TAB 0x09 /* character tabulation */ diff --git a/es2panda/test/parser/js/test-incomplete-hex-unicode-escape-expected.txt b/es2panda/test/parser/js/test-incomplete-hex-unicode-escape-expected.txt new file mode 100644 index 0000000000000000000000000000000000000000..3ff447428efb61389fe9bb410611c281f55da953 --- /dev/null +++ b/es2panda/test/parser/js/test-incomplete-hex-unicode-escape-expected.txt @@ -0,0 +1,191 @@ +{ + "type": "Program", + "statements": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "callee": { + "type": "MemberExpression", + "object": { + "type": "RegExpLiteral", + "source": "\xa", + "flags": "", + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + "property": { + "type": "Identifier", + "name": "test", + "decorators": [], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "computed": false, + "optional": false, + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "arguments": [ + { + "type": "StringLiteral", + "value": "xa", + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 16 + } + } + } + ], + "optional": false, + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "loc": { + "start": { + "line": 16, + "column": 1 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "callee": { + "type": "MemberExpression", + "object": { + "type": "RegExpLiteral", + "source": "\x", + "flags": "", + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + "property": { + "type": "Identifier", + "name": "test", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "computed": false, + "optional": false, + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "arguments": [ + { + "type": "StringLiteral", + "value": "x", + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 14 + } + } + } + ], + "optional": false, + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 16 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 18, + "column": 1 + } + } +} diff --git a/es2panda/test/parser/js/test-incomplete-hex-unicode-escape.js b/es2panda/test/parser/js/test-incomplete-hex-unicode-escape.js new file mode 100644 index 0000000000000000000000000000000000000000..b1d3a38905c712a5fecbbab1e6f6ad547fdadaae --- /dev/null +++ b/es2panda/test/parser/js/test-incomplete-hex-unicode-escape.js @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/\xa/.test("xa"); +/\x/.test("x"); diff --git a/es2panda/test/parser/js/test-invalid-regexp-flags-expected.txt b/es2panda/test/parser/js/test-invalid-regexp-flags-expected.txt new file mode 100644 index 0000000000000000000000000000000000000000..3d874a22bbc6381890f77cb9280522a9a89bfda9 --- /dev/null +++ b/es2panda/test/parser/js/test-invalid-regexp-flags-expected.txt @@ -0,0 +1 @@ +SyntaxError: Invalid RegExp flag [test-invalid-regexp-flags.js:15:612] diff --git a/es2panda/test/parser/js/test-invalid-regexp-flags.js b/es2panda/test/parser/js/test-invalid-regexp-flags.js new file mode 100644 index 0000000000000000000000000000000000000000..b2a534228051f8750f9f9b30f0c1c4f496a7424c --- /dev/null +++ b/es2panda/test/parser/js/test-invalid-regexp-flags.js @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/adad/p; diff --git a/es2panda/test/parser/js/test-invalid-unicode-escape-expected.txt b/es2panda/test/parser/js/test-invalid-unicode-escape-expected.txt new file mode 100644 index 0000000000000000000000000000000000000000..1796c96866fe9aaa303761509fe06940b72ac023 --- /dev/null +++ b/es2panda/test/parser/js/test-invalid-unicode-escape-expected.txt @@ -0,0 +1 @@ +SyntaxError: Invalid hex escape [test-invalid-unicode-escape.js:16:10] diff --git a/es2panda/test/parser/js/test-invalid-unicode-escape.js b/es2panda/test/parser/js/test-invalid-unicode-escape.js new file mode 100644 index 0000000000000000000000000000000000000000..be33039c3b5da6bd5ed669ea1cd6e1c7578ba0ce --- /dev/null +++ b/es2panda/test/parser/js/test-invalid-unicode-escape.js @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var c = /\x1/u; diff --git a/es2panda/test/parser/js/test-octal-escape-in-template-string-expected.txt b/es2panda/test/parser/js/test-octal-escape-in-template-string-expected.txt new file mode 100644 index 0000000000000000000000000000000000000000..f916e97225c3da2f9f1533bab904725132684300 Binary files /dev/null and b/es2panda/test/parser/js/test-octal-escape-in-template-string-expected.txt differ diff --git a/es2panda/test/parser/js/test-octal-escape-in-template-string.js b/es2panda/test/parser/js/test-octal-escape-in-template-string.js new file mode 100644 index 0000000000000000000000000000000000000000..d4a6f1af25b84fb4c8a66d73e9a356a8d89276f0 --- /dev/null +++ b/es2panda/test/parser/js/test-octal-escape-in-template-string.js @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var x = `\x22\0\x23`; diff --git a/es2panda/test/parser/js/test-regexp-p-expected.txt b/es2panda/test/parser/js/test-regexp-p-expected.txt index 31af86465ca9f37f87c9659110f843fa4337db07..e85eb22e2cfcb9cd5c8076ad3f9a32fabee6511a 100644 --- a/es2panda/test/parser/js/test-regexp-p-expected.txt +++ b/es2panda/test/parser/js/test-regexp-p-expected.txt @@ -9,6 +9,7 @@ "left": { "type": "Identifier", "name": "RegularExpressionLiteral", + "decorators": [], "loc": { "start": { "line": 16, diff --git a/es2panda/test/parser/js/test-special-character-processing-in-template-string-expected.txt b/es2panda/test/parser/js/test-special-character-processing-in-template-string-expected.txt index 978a429353ec5341616f999caeaef673f05e3bb2..2dc6eef593976915704541214ed44ef9c7256c41 100644 --- a/es2panda/test/parser/js/test-special-character-processing-in-template-string-expected.txt +++ b/es2panda/test/parser/js/test-special-character-processing-in-template-string-expected.txt @@ -6,6 +6,7 @@ "label": { "type": "Identifier", "name": "iflnlf", + "decorators": [], "loc": { "start": { "line": 16, @@ -25,6 +26,7 @@ "left": { "type": "Identifier", "name": "string", + "decorators": [], "loc": { "start": { "line": 16, @@ -94,6 +96,7 @@ if( "property": { "type": "Identifier", "name": "trim", + "decorators": [], "loc": { "start": { "line": 25, diff --git a/es2panda/test/test_tsc_ignore_list.txt b/es2panda/test/test_tsc_ignore_list.txt index 4caff8115a6f89a26f1f451908d2b7cb2cbd7f37..ddb6fc5288daf0976eabf4cbe08aa11f46109d5e 100644 --- a/es2panda/test/test_tsc_ignore_list.txt +++ b/es2panda/test/test_tsc_ignore_list.txt @@ -76,18 +76,6 @@ es2panda/test/TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStr es2panda/test/TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagNamedDeclareES6.ts es2panda/test/TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts es2panda/test/TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTagsES6.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes01.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes01_ES6.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions07_ES5.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions07_ES6.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions12_ES5.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions12_ES6.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions14_ES5.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions14_ES6.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions17_ES5.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions17_ES6.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions19_ES5.ts -es2panda/test/TypeScript/tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions19_ES6.ts es2panda/test/TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts es2panda/test/TypeScript/tests/cases/conformance/expressions/elementAccess/letIdentifierInElementAccess01.ts es2panda/test/TypeScript/tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator_es2020.ts diff --git a/test262/es2021_tests.txt b/test262/es2021_tests.txt index f4e31babb9809aa3221801c566bcd06772cfc2bc..6d31f6af09985c9c4d1a68dede3797fcc6ddb1fb 100644 --- a/test262/es2021_tests.txt +++ b/test262/es2021_tests.txt @@ -733,4 +733,103 @@ language/expressions/optional-chaining/short-circuiting.js language/expressions/optional-chaining/static-semantics-simple-assignment.js language/expressions/optional-chaining/super-property-optional-call.js language/expressions/optional-chaining/update-expression-postfix.js -language/expressions/optional-chaining/update-expression-prefix.js +language/expressions/optional-chaining/update-expression-prefix.js, +annexB/language/comments/single-line-html-close-unicode-separators.js +annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js +annexB/built-ins/RegExp/named-groups/non-unicode-malformed-lookbehind.js +annexB/built-ins/RegExp/named-groups/non-unicode-malformed.js +language/literals/bigint/numeric-separators/numeric-separator-literal-unicode-err.js +language/literals/string/unicode-escape-nls-err-single.js +language/literals/string/unicode-escape-no-hex-err-single.js +language/literals/string/unicode-escape-nls-err-double.js +language/literals/string/unicode-escape-no-hex-err-double.js +language/literals/regexp/u-unicode-esc-bounds.js +language/literals/regexp/u-unicode-esc-non-hex.js +language/literals/regexp/u-unicode-esc.js +language/literals/regexp/early-err-flags-unicode-escape.js +language/literals/regexp/unicode-escape-nls-err.js +language/literals/numeric/numeric-separators/numeric-separator-literal-unicode-err.js +language/literals/numeric/binary-invalid-unicode.js +language/literals/numeric/octal-invalid-unicode.js +language/expressions/template-literal/invalid-unicode-escape-sequence-6.js +language/expressions/template-literal/invalid-unicode-escape-sequence-8.js +language/expressions/template-literal/invalid-unicode-escape-sequence-7.js +language/expressions/template-literal/invalid-unicode-escape-sequence-5.js +language/expressions/template-literal/invalid-unicode-escape-sequence-3.js +language/expressions/template-literal/invalid-unicode-escape-sequence-2.js +language/expressions/template-literal/unicode-escape-no-hex-err.js +language/expressions/template-literal/unicode-escape-nls-err.js +language/expressions/template-literal/invalid-unicode-escape-sequence-1.js +language/expressions/template-literal/invalid-unicode-escape-sequence-4.js +language/expressions/object/accessor-name-literal-string-unicode-escape.js +language/expressions/class/accessor-name-static/literal-string-unicode-escape.js +language/expressions/class/accessor-name-inst/literal-string-unicode-escape.js +language/statements/class/accessor-name-static/literal-string-unicode-escape.js +language/statements/class/accessor-name-inst/literal-string-unicode-escape.js +language/identifiers/part-unicode-9.0.0-escaped.js +language/identifiers/part-unicode-6.1.0.js +language/identifiers/part-unicode-13.0.0.js +language/identifiers/part-unicode-13.0.0-escaped.js +language/identifiers/part-unicode-11.0.0.js +language/identifiers/part-unicode-10.0.0.js +language/identifiers/start-unicode-9.0.0-escaped.js +language/identifiers/part-unicode-5.2.0-escaped.js +language/identifiers/part-unicode-5.2.0.js +language/identifiers/part-unicode-8.0.0.js +language/identifiers/start-unicode-6.1.0.js +language/identifiers/part-unicode-11.0.0-escaped.js +language/identifiers/start-unicode-6.0.0-escaped.js +language/identifiers/start-unicode-6.0.0.js +language/identifiers/part-unicode-12.0.0-escaped.js +language/identifiers/part-unicode-8.0.0-escaped.js +language/identifiers/start-unicode-10.0.0-escaped.js +language/identifiers/part-unicode-7.0.0-escaped.js +language/identifiers/start-unicode-7.0.0-escaped.js +language/identifiers/part-unicode-6.0.0.js +language/identifiers/start-unicode-5.2.0-escaped.js +language/identifiers/start-unicode-11.0.0-escaped.js +language/identifiers/part-unicode-7.0.0.js +language/identifiers/start-unicode-8.0.0-escaped.js +language/identifiers/part-unicode-6.1.0-escaped.js +language/identifiers/start-unicode-8.0.0.js +language/identifiers/start-unicode-7.0.0.js +language/identifiers/start-unicode-13.0.0-escaped.js +language/identifiers/part-unicode-9.0.0.js +language/identifiers/start-unicode-12.0.0-escaped.js +language/identifiers/start-unicode-5.2.0.js +language/identifiers/part-unicode-12.0.0.js +language/identifiers/start-unicode-9.0.0.js +language/identifiers/part-unicode-10.0.0-escaped.js +language/identifiers/start-unicode-13.0.0.js +language/identifiers/start-unicode-11.0.0.js +language/identifiers/part-unicode-6.0.0-escaped.js +language/identifiers/start-unicode-12.0.0.js +language/identifiers/unicode-escape-nls-err.js +language/identifiers/start-unicode-10.0.0.js +language/identifiers/start-unicode-6.1.0-escaped.js +built-ins/RegExp/unicode_restricted_octal_escape.js +built-ins/RegExp/unicode_restricted_quantifier_without_atom.js +built-ins/RegExp/dotall/without-dotall-unicode.js +built-ins/RegExp/dotall/with-dotall-unicode.js +built-ins/RegExp/unicode_restricted_brackets.js +built-ins/RegExp/unicode_character_class_backspace_escape.js +built-ins/RegExp/unicode_restricted_quantifiable_assertion.js +built-ins/RegExp/unicode_restricted_identity_escape_alpha.js +built-ins/RegExp/unicode_restricted_incomplete_quantifier.js +built-ins/RegExp/unicode_restricted_character_class_escape.js +built-ins/RegExp/unicode_restricted_identity_escape.js +built-ins/RegExp/unicode_restricted_identity_escape_c.js +built-ins/RegExp/prototype/Symbol.match/get-unicode-error.js +built-ins/RegExp/prototype/Symbol.match/builtin-infer-unicode.js +built-ins/RegExp/prototype/flags/coercion-unicode.js +built-ins/RegExp/prototype/Symbol.replace/coerce-unicode.js +built-ins/RegExp/prototype/Symbol.replace/get-unicode-error.js +built-ins/RegExp/prototype/unicode +built-ins/RegExp/unicode_identity_escape.js +built-ins/RegExp/match-indices/indices-array-unicode-match.js +built-ins/RegExp/match-indices/indices-array-non-unicode-match.js +built-ins/RegExp/match-indices/indices-array-unicode-property-names.js +built-ins/RegExp/unicode_restricted_identity_escape_u.js +built-ins/RegExp/unicode_restricted_identity_escape_x.js +built-ins/JSON/stringify/value-string-escape-unicode.js +built-ins/Function/prototype/toString/unicode.js \ No newline at end of file diff --git a/test262/es2abc_skip_tests.json b/test262/es2abc_skip_tests.json index 7e59e7684948b75fb85a88777d6d0d50984ab4ab..5cac69b1b3ae2f67aba4ef814f24bac7b4bf9e98 100644 --- a/test262/es2abc_skip_tests.json +++ b/test262/es2abc_skip_tests.json @@ -83,5 +83,30 @@ "language/expressions/dynamic-import/reuse-namespace-object-from-import.js", "language/expressions/dynamic-import/usage-from-eval.js" ] + }, + { + "reason" : "Unsupported single-line-html-close Comment", + "files": [ + "annexB/language/comments/single-line-html-close-unicode-separators.js" + ] + }, + { + "reason" : "Unsupported RegExp", + "files": [ + "annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js", + "annexB/built-ins/RegExp/named-groups/non-unicode-malformed-lookbehind.js", + "annexB/built-ins/RegExp/named-groups/non-unicode-malformed.js", + "built-ins/RegExp/prototype/flags/coercion-unicode.js", + "built-ins/RegExp/match-indices/indices-array-unicode-property-names.js", + "built-ins/RegExp/match-indices/indices-array-non-unicode-match.js", + "built-ins/RegExp/match-indices/indices-array-unicode-match.js", + "built-ins/JSON/stringify/value-string-escape-unicode.js" + ] + }, + { + "reason" : "Unsupported SourceCode", + "files": [ + "built-ins/Function/prototype/toString/unicode.js" + ] } ] diff --git a/test262/ts2abc_skip_tests.json b/test262/ts2abc_skip_tests.json index 7aa047b60c8638fb0543ea3e7847ce8e853bb0d5..d2c5d1f30d60ae52787bce081ea72d7b370f3625 100644 --- a/test262/ts2abc_skip_tests.json +++ b/test262/ts2abc_skip_tests.json @@ -183,5 +183,24 @@ "files": [ "language/reserved-words/unreserved-words.js" ] + }, + { + "reason" : "Unsupport regExp and unicode syntax", + "files": [ + "annexB/language/comments/single-line-html-close-unicode-separators.js", + "annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js", + "annexB/built-ins/RegExp/named-groups/non-unicode-malformed-lookbehind.js", + "annexB/built-ins/RegExp/named-groups/non-unicode-malformed.js", + "language/identifiers/part-unicode-13.0.0-escaped.js", + "language/identifiers/part-unicode-13.0.0.js", + "language/identifiers/start-unicode-13.0.0.js", + "language/identifiers/start-unicode-13.0.0-escaped.js", + "built-ins/RegExp/prototype/flags/coercion-unicode.js", + "built-ins/RegExp/match-indices/indices-array-unicode-property-names.js", + "built-ins/RegExp/match-indices/indices-array-non-unicode-match.js", + "built-ins/RegExp/match-indices/indices-array-unicode-match.js", + "built-ins/JSON/stringify/value-string-escape-unicode.js", + "built-ins/Function/prototype/toString/unicode.js" + ] } ]