diff --git a/tests/baselines/reference/7.8.3-1gs.errors.txt b/tests/baselines/reference/7.8.3-1gs.errors.txt new file mode 100644 index 0000000000000..4dc80fd54deaa --- /dev/null +++ b/tests/baselines/reference/7.8.3-1gs.errors.txt @@ -0,0 +1,21 @@ +7.8.3-1gs.ts(14,9): error TS1121: Octal literals are not allowed. Use the syntax '0o10'. + + +==== 7.8.3-1gs.ts (1 errors) ==== + // Copyright (c) 2012 Ecma International. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es5id: 7.8.3-1gs + description: Strict Mode - octal extension(010) is forbidden in strict mode + negative: + phase: parse + type: SyntaxError + flags: [onlyStrict] + ---*/ + + + var y = 010; + ~~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o10'. + \ No newline at end of file diff --git a/tests/baselines/reference/7.8.3-1gs.js b/tests/baselines/reference/7.8.3-1gs.js new file mode 100644 index 0000000000000..f3edc50c03d78 --- /dev/null +++ b/tests/baselines/reference/7.8.3-1gs.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts] //// + +//// [7.8.3-1gs.ts] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-1gs +description: Strict Mode - octal extension(010) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +var y = 010; + + +//// [7.8.3-1gs.js] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es5id: 7.8.3-1gs +description: Strict Mode - octal extension(010) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ +var y = 8; diff --git a/tests/baselines/reference/7.8.3-1gs.symbols b/tests/baselines/reference/7.8.3-1gs.symbols new file mode 100644 index 0000000000000..1cda6c4a99171 --- /dev/null +++ b/tests/baselines/reference/7.8.3-1gs.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts] //// + +=== 7.8.3-1gs.ts === +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-1gs +description: Strict Mode - octal extension(010) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +var y = 010; +>y : Symbol(y, Decl(7.8.3-1gs.ts, 13, 3)) + diff --git a/tests/baselines/reference/7.8.3-1gs.types b/tests/baselines/reference/7.8.3-1gs.types new file mode 100644 index 0000000000000..862baca664d6c --- /dev/null +++ b/tests/baselines/reference/7.8.3-1gs.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts] //// + +=== 7.8.3-1gs.ts === +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-1gs +description: Strict Mode - octal extension(010) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +var y = 010; +>y : number +>010 : 8 + diff --git a/tests/baselines/reference/7.8.3-2gs.errors.txt b/tests/baselines/reference/7.8.3-2gs.errors.txt new file mode 100644 index 0000000000000..682638a41319a --- /dev/null +++ b/tests/baselines/reference/7.8.3-2gs.errors.txt @@ -0,0 +1,25 @@ +7.8.3-2gs.ts(18,5): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + + +==== 7.8.3-2gs.ts (1 errors) ==== + // Copyright (c) 2012 Ecma International. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es5id: 7.8.3-2gs + description: > + Strict Mode - octal extension is forbidden in strict mode (after a + hex number is assigned to a variable) + negative: + phase: parse + type: SyntaxError + flags: [onlyStrict] + ---*/ + + + var a; + a = 0x1; + a = 01; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + \ No newline at end of file diff --git a/tests/baselines/reference/7.8.3-2gs.js b/tests/baselines/reference/7.8.3-2gs.js new file mode 100644 index 0000000000000..e86bf071e1da2 --- /dev/null +++ b/tests/baselines/reference/7.8.3-2gs.js @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts] //// + +//// [7.8.3-2gs.ts] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-2gs +description: > + Strict Mode - octal extension is forbidden in strict mode (after a + hex number is assigned to a variable) +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +var a; +a = 0x1; +a = 01; + + +//// [7.8.3-2gs.js] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es5id: 7.8.3-2gs +description: > + Strict Mode - octal extension is forbidden in strict mode (after a + hex number is assigned to a variable) +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ +var a; +a = 0x1; +a = 1; diff --git a/tests/baselines/reference/7.8.3-2gs.symbols b/tests/baselines/reference/7.8.3-2gs.symbols new file mode 100644 index 0000000000000..131b1b05ac933 --- /dev/null +++ b/tests/baselines/reference/7.8.3-2gs.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts] //// + +=== 7.8.3-2gs.ts === +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-2gs +description: > + Strict Mode - octal extension is forbidden in strict mode (after a + hex number is assigned to a variable) +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +var a; +>a : Symbol(a, Decl(7.8.3-2gs.ts, 15, 3)) + +a = 0x1; +>a : Symbol(a, Decl(7.8.3-2gs.ts, 15, 3)) + +a = 01; +>a : Symbol(a, Decl(7.8.3-2gs.ts, 15, 3)) + diff --git a/tests/baselines/reference/7.8.3-2gs.types b/tests/baselines/reference/7.8.3-2gs.types new file mode 100644 index 0000000000000..9766fcefb87db --- /dev/null +++ b/tests/baselines/reference/7.8.3-2gs.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts] //// + +=== 7.8.3-2gs.ts === +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-2gs +description: > + Strict Mode - octal extension is forbidden in strict mode (after a + hex number is assigned to a variable) +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +var a; +>a : any + +a = 0x1; +>a = 0x1 : 1 +>a : any +>0x1 : 1 + +a = 01; +>a = 01 : 1 +>a : any +>01 : 1 + diff --git a/tests/baselines/reference/S7.8.3_A6.1_T1.errors.txt b/tests/baselines/reference/S7.8.3_A6.1_T1.errors.txt new file mode 100644 index 0000000000000..b292ee9fd98e2 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.1_T1.errors.txt @@ -0,0 +1,22 @@ +S7.8.3_A6.1_T1.ts(15,3): error TS1125: Hexadecimal digit expected. + + +==== S7.8.3_A6.1_T1.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "HexIntegerLiteral :: 0(x/X) is incorrect" + es5id: 7.8.3_A6.1_T1 + description: Checking if execution of "0x" passes + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + 0x + +!!! error TS1125: Hexadecimal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.3_A6.1_T1.js b/tests/baselines/reference/S7.8.3_A6.1_T1.js new file mode 100644 index 0000000000000..c401c183a769b --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.1_T1.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts] //// + +//// [S7.8.3_A6.1_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T1 +description: Checking if execution of "0x" passes +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0x + + +//// [S7.8.3_A6.1_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T1 +description: Checking if execution of "0x" passes +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +0x; diff --git a/tests/baselines/reference/S7.8.3_A6.1_T1.symbols b/tests/baselines/reference/S7.8.3_A6.1_T1.symbols new file mode 100644 index 0000000000000..984d3bcf02532 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.1_T1.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts] //// + +=== S7.8.3_A6.1_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T1 +description: Checking if execution of "0x" passes +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0x + diff --git a/tests/baselines/reference/S7.8.3_A6.1_T1.types b/tests/baselines/reference/S7.8.3_A6.1_T1.types new file mode 100644 index 0000000000000..990c6dfda3ce7 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.1_T1.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts] //// + +=== S7.8.3_A6.1_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T1 +description: Checking if execution of "0x" passes +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0x +>0x : 0 + diff --git a/tests/baselines/reference/S7.8.3_A6.1_T2.errors.txt b/tests/baselines/reference/S7.8.3_A6.1_T2.errors.txt new file mode 100644 index 0000000000000..90621ffaa6253 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.1_T2.errors.txt @@ -0,0 +1,22 @@ +S7.8.3_A6.1_T2.ts(15,3): error TS1125: Hexadecimal digit expected. + + +==== S7.8.3_A6.1_T2.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "HexIntegerLiteral :: 0(x/X) is incorrect" + es5id: 7.8.3_A6.1_T2 + description: Checking if execution of "0X" passes + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + 0X + +!!! error TS1125: Hexadecimal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.3_A6.1_T2.js b/tests/baselines/reference/S7.8.3_A6.1_T2.js new file mode 100644 index 0000000000000..8e88f1b300dc8 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.1_T2.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T2.ts] //// + +//// [S7.8.3_A6.1_T2.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T2 +description: Checking if execution of "0X" passes +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0X + + +//// [S7.8.3_A6.1_T2.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T2 +description: Checking if execution of "0X" passes +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +0X; diff --git a/tests/baselines/reference/S7.8.3_A6.1_T2.symbols b/tests/baselines/reference/S7.8.3_A6.1_T2.symbols new file mode 100644 index 0000000000000..c7c9cdc0c272e --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.1_T2.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T2.ts] //// + +=== S7.8.3_A6.1_T2.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T2 +description: Checking if execution of "0X" passes +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0X + diff --git a/tests/baselines/reference/S7.8.3_A6.1_T2.types b/tests/baselines/reference/S7.8.3_A6.1_T2.types new file mode 100644 index 0000000000000..755344a12d151 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.1_T2.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T2.ts] //// + +=== S7.8.3_A6.1_T2.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T2 +description: Checking if execution of "0X" passes +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0X +>0X : 0 + diff --git a/tests/baselines/reference/S7.8.3_A6.2_T1.errors.txt b/tests/baselines/reference/S7.8.3_A6.2_T1.errors.txt new file mode 100644 index 0000000000000..9e0fa4f5e0796 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.2_T1.errors.txt @@ -0,0 +1,25 @@ +S7.8.3_A6.2_T1.ts(15,3): error TS1125: Hexadecimal digit expected. +S7.8.3_A6.2_T1.ts(15,3): error TS2304: Cannot find name 'G'. + + +==== S7.8.3_A6.2_T1.ts (2 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: 0xG is incorrect + es5id: 7.8.3_A6.2_T1 + description: Checking if execution of "0xG" fails + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + 0xG + +!!! error TS1125: Hexadecimal digit expected. + ~ +!!! error TS2304: Cannot find name 'G'. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.3_A6.2_T1.js b/tests/baselines/reference/S7.8.3_A6.2_T1.js new file mode 100644 index 0000000000000..2941903133ca7 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.2_T1.js @@ -0,0 +1,34 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T1.ts] //// + +//// [S7.8.3_A6.2_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T1 +description: Checking if execution of "0xG" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0xG + + +//// [S7.8.3_A6.2_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T1 +description: Checking if execution of "0xG" fails +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +0x; +G; diff --git a/tests/baselines/reference/S7.8.3_A6.2_T1.symbols b/tests/baselines/reference/S7.8.3_A6.2_T1.symbols new file mode 100644 index 0000000000000..ecf535d8ff489 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.2_T1.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T1.ts] //// + +=== S7.8.3_A6.2_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T1 +description: Checking if execution of "0xG" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0xG + diff --git a/tests/baselines/reference/S7.8.3_A6.2_T1.types b/tests/baselines/reference/S7.8.3_A6.2_T1.types new file mode 100644 index 0000000000000..23809dc853d05 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.2_T1.types @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T1.ts] //// + +=== S7.8.3_A6.2_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T1 +description: Checking if execution of "0xG" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0xG +>0x : 0 +>G : any + diff --git a/tests/baselines/reference/S7.8.3_A6.2_T2.errors.txt b/tests/baselines/reference/S7.8.3_A6.2_T2.errors.txt new file mode 100644 index 0000000000000..ef8f1a0e8c2d4 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.2_T2.errors.txt @@ -0,0 +1,25 @@ +S7.8.3_A6.2_T2.ts(15,3): error TS1125: Hexadecimal digit expected. +S7.8.3_A6.2_T2.ts(15,3): error TS2304: Cannot find name 'g'. + + +==== S7.8.3_A6.2_T2.ts (2 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: 0xG is incorrect + es5id: 7.8.3_A6.2_T2 + description: Checking if execution of "0xg" fails + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + 0xg + +!!! error TS1125: Hexadecimal digit expected. + ~ +!!! error TS2304: Cannot find name 'g'. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.3_A6.2_T2.js b/tests/baselines/reference/S7.8.3_A6.2_T2.js new file mode 100644 index 0000000000000..020d212405162 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.2_T2.js @@ -0,0 +1,34 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T2.ts] //// + +//// [S7.8.3_A6.2_T2.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T2 +description: Checking if execution of "0xg" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0xg + + +//// [S7.8.3_A6.2_T2.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T2 +description: Checking if execution of "0xg" fails +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +0x; +g; diff --git a/tests/baselines/reference/S7.8.3_A6.2_T2.symbols b/tests/baselines/reference/S7.8.3_A6.2_T2.symbols new file mode 100644 index 0000000000000..72192ff90de5a --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.2_T2.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T2.ts] //// + +=== S7.8.3_A6.2_T2.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T2 +description: Checking if execution of "0xg" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0xg + diff --git a/tests/baselines/reference/S7.8.3_A6.2_T2.types b/tests/baselines/reference/S7.8.3_A6.2_T2.types new file mode 100644 index 0000000000000..25333efa54a61 --- /dev/null +++ b/tests/baselines/reference/S7.8.3_A6.2_T2.types @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T2.ts] //// + +=== S7.8.3_A6.2_T2.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T2 +description: Checking if execution of "0xg" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0xg +>0x : 0 +>g : any + diff --git a/tests/baselines/reference/S7.8.4_A1.1_T1.errors.txt b/tests/baselines/reference/S7.8.4_A1.1_T1.errors.txt new file mode 100644 index 0000000000000..784e7d73e049e --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.1_T1.errors.txt @@ -0,0 +1,27 @@ +S7.8.4_A1.1_T1.ts(17,3): error TS1005: ';' expected. +S7.8.4_A1.1_T1.ts(17,4): error TS1002: Unterminated string literal. + + +==== S7.8.4_A1.1_T1.ts (2 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "StringLiteral :: \"DoubleStringCharacters_opt\"" + es5id: 7.8.4_A1.1_T1 + description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + """ + ~ +!!! error TS1005: ';' expected. + +!!! error TS1002: Unterminated string literal. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A1.1_T1.js b/tests/baselines/reference/S7.8.4_A1.1_T1.js new file mode 100644 index 0000000000000..74aaba3b3f4b1 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.1_T1.js @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T1.ts] //// + +//// [S7.8.4_A1.1_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T1 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +""" + + +//// [S7.8.4_A1.1_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T1 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +""; +"; diff --git a/tests/baselines/reference/S7.8.4_A1.1_T1.symbols b/tests/baselines/reference/S7.8.4_A1.1_T1.symbols new file mode 100644 index 0000000000000..5863e80527247 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.1_T1.symbols @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T1.ts] //// + +=== S7.8.4_A1.1_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T1 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +""" + diff --git a/tests/baselines/reference/S7.8.4_A1.1_T1.types b/tests/baselines/reference/S7.8.4_A1.1_T1.types new file mode 100644 index 0000000000000..15b72257d33d5 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.1_T1.types @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T1.ts] //// + +=== S7.8.4_A1.1_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T1 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +""" +>"" : "" +>" : "" + diff --git a/tests/baselines/reference/S7.8.4_A1.1_T2.errors.txt b/tests/baselines/reference/S7.8.4_A1.1_T2.errors.txt new file mode 100644 index 0000000000000..4ef4e829fbbb2 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.1_T2.errors.txt @@ -0,0 +1,28 @@ +S7.8.4_A1.1_T2.ts(17,2): error TS1002: Unterminated string literal. +S7.8.4_A1.1_T2.ts(18,2): error TS1002: Unterminated string literal. + + +==== S7.8.4_A1.1_T2.ts (2 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "StringLiteral :: \"DoubleStringCharacters_opt\"" + es5id: 7.8.4_A1.1_T2 + description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + " + +!!! error TS1002: Unterminated string literal. + " + +!!! error TS1002: Unterminated string literal. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A1.1_T2.js b/tests/baselines/reference/S7.8.4_A1.1_T2.js new file mode 100644 index 0000000000000..7d3a8a175fb17 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.1_T2.js @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T2.ts] //// + +//// [S7.8.4_A1.1_T2.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T2 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +" +" + + +//// [S7.8.4_A1.1_T2.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T2 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +"; +"; diff --git a/tests/baselines/reference/S7.8.4_A1.1_T2.symbols b/tests/baselines/reference/S7.8.4_A1.1_T2.symbols new file mode 100644 index 0000000000000..60f9bca70c75d --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.1_T2.symbols @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T2.ts] //// + +=== S7.8.4_A1.1_T2.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T2 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +" +" + diff --git a/tests/baselines/reference/S7.8.4_A1.1_T2.types b/tests/baselines/reference/S7.8.4_A1.1_T2.types new file mode 100644 index 0000000000000..9c6959c7ab338 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.1_T2.types @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T2.ts] //// + +=== S7.8.4_A1.1_T2.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T2 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +" +>" : "" + +" +>" : "" + diff --git a/tests/baselines/reference/S7.8.4_A1.2_T1.errors.txt b/tests/baselines/reference/S7.8.4_A1.2_T1.errors.txt new file mode 100644 index 0000000000000..e0313dae5f9ac --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.2_T1.errors.txt @@ -0,0 +1,27 @@ +S7.8.4_A1.2_T1.ts(17,3): error TS1005: ';' expected. +S7.8.4_A1.2_T1.ts(17,4): error TS1002: Unterminated string literal. + + +==== S7.8.4_A1.2_T1.ts (2 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "StringLiteral :: 'SingleStringCharacters_opt'" + es5id: 7.8.4_A1.2_T1 + description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + ''' + ~ +!!! error TS1005: ';' expected. + +!!! error TS1002: Unterminated string literal. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A1.2_T1.js b/tests/baselines/reference/S7.8.4_A1.2_T1.js new file mode 100644 index 0000000000000..5f1e2cf091954 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.2_T1.js @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T1.ts] //// + +//// [S7.8.4_A1.2_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T1 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +''' + + +//// [S7.8.4_A1.2_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T1 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +''; +'; diff --git a/tests/baselines/reference/S7.8.4_A1.2_T1.symbols b/tests/baselines/reference/S7.8.4_A1.2_T1.symbols new file mode 100644 index 0000000000000..f26c4e07c77bd --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.2_T1.symbols @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T1.ts] //// + +=== S7.8.4_A1.2_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T1 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +''' + diff --git a/tests/baselines/reference/S7.8.4_A1.2_T1.types b/tests/baselines/reference/S7.8.4_A1.2_T1.types new file mode 100644 index 0000000000000..5456502a94046 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.2_T1.types @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T1.ts] //// + +=== S7.8.4_A1.2_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T1 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +''' +>'' : "" +>' : "" + diff --git a/tests/baselines/reference/S7.8.4_A1.2_T2.errors.txt b/tests/baselines/reference/S7.8.4_A1.2_T2.errors.txt new file mode 100644 index 0000000000000..03109eb22c268 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.2_T2.errors.txt @@ -0,0 +1,28 @@ +S7.8.4_A1.2_T2.ts(17,2): error TS1002: Unterminated string literal. +S7.8.4_A1.2_T2.ts(18,2): error TS1002: Unterminated string literal. + + +==== S7.8.4_A1.2_T2.ts (2 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "StringLiteral :: 'SingleStringCharacters_opt'" + es5id: 7.8.4_A1.2_T2 + description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + ' + +!!! error TS1002: Unterminated string literal. + ' + +!!! error TS1002: Unterminated string literal. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A1.2_T2.js b/tests/baselines/reference/S7.8.4_A1.2_T2.js new file mode 100644 index 0000000000000..150236624a17d --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.2_T2.js @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T2.ts] //// + +//// [S7.8.4_A1.2_T2.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T2 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +' +' + + +//// [S7.8.4_A1.2_T2.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T2 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +'; +'; diff --git a/tests/baselines/reference/S7.8.4_A1.2_T2.symbols b/tests/baselines/reference/S7.8.4_A1.2_T2.symbols new file mode 100644 index 0000000000000..5ae7def319b0f --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.2_T2.symbols @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T2.ts] //// + +=== S7.8.4_A1.2_T2.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T2 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +' +' + diff --git a/tests/baselines/reference/S7.8.4_A1.2_T2.types b/tests/baselines/reference/S7.8.4_A1.2_T2.types new file mode 100644 index 0000000000000..e268c73f8a405 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A1.2_T2.types @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T2.ts] //// + +=== S7.8.4_A1.2_T2.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T2 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +' +>' : "" + +' +>' : "" + diff --git a/tests/baselines/reference/S7.8.4_A3.1_T1.errors.txt b/tests/baselines/reference/S7.8.4_A3.1_T1.errors.txt new file mode 100644 index 0000000000000..c56a6869dd335 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.1_T1.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A3.1_T1.ts(15,4): error TS1002: Unterminated string literal. + + +==== S7.8.4_A3.1_T1.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "StringLiteral :: \"\\\" or '\\' is not correct" + es5id: 7.8.4_A3.1_T1 + description: Checking if execution of "\" fails + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + "\" + +!!! error TS1002: Unterminated string literal. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A3.1_T1.js b/tests/baselines/reference/S7.8.4_A3.1_T1.js new file mode 100644 index 0000000000000..1ac39c4909010 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.1_T1.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T1.ts] //// + +//// [S7.8.4_A3.1_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T1 +description: Checking if execution of "\" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\" + + +//// [S7.8.4_A3.1_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T1 +description: Checking if execution of "\" fails +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +"\"; diff --git a/tests/baselines/reference/S7.8.4_A3.1_T1.symbols b/tests/baselines/reference/S7.8.4_A3.1_T1.symbols new file mode 100644 index 0000000000000..b1d345b2d72e3 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.1_T1.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T1.ts] //// + +=== S7.8.4_A3.1_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T1 +description: Checking if execution of "\" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\" + diff --git a/tests/baselines/reference/S7.8.4_A3.1_T1.types b/tests/baselines/reference/S7.8.4_A3.1_T1.types new file mode 100644 index 0000000000000..8244f6656672c --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.1_T1.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T1.ts] //// + +=== S7.8.4_A3.1_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T1 +description: Checking if execution of "\" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\" +>"\" : "\"" + diff --git a/tests/baselines/reference/S7.8.4_A3.1_T2.errors.txt b/tests/baselines/reference/S7.8.4_A3.1_T2.errors.txt new file mode 100644 index 0000000000000..b3474f786086f --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.1_T2.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A3.1_T2.ts(15,4): error TS1002: Unterminated string literal. + + +==== S7.8.4_A3.1_T2.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "StringLiteral :: \"\\\" or '\\' is not correct" + es5id: 7.8.4_A3.1_T2 + description: Checking if execution of "'\'" fails + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + '\' + +!!! error TS1002: Unterminated string literal. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A3.1_T2.js b/tests/baselines/reference/S7.8.4_A3.1_T2.js new file mode 100644 index 0000000000000..e44f2d17870b6 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.1_T2.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T2.ts] //// + +//// [S7.8.4_A3.1_T2.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T2 +description: Checking if execution of "'\'" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +'\' + + +//// [S7.8.4_A3.1_T2.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T2 +description: Checking if execution of "'\'" fails +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +'\'; diff --git a/tests/baselines/reference/S7.8.4_A3.1_T2.symbols b/tests/baselines/reference/S7.8.4_A3.1_T2.symbols new file mode 100644 index 0000000000000..805fc1c3512ab --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.1_T2.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T2.ts] //// + +=== S7.8.4_A3.1_T2.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T2 +description: Checking if execution of "'\'" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +'\' + diff --git a/tests/baselines/reference/S7.8.4_A3.1_T2.types b/tests/baselines/reference/S7.8.4_A3.1_T2.types new file mode 100644 index 0000000000000..4d4c2c64b0854 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.1_T2.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T2.ts] //// + +=== S7.8.4_A3.1_T2.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T2 +description: Checking if execution of "'\'" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +'\' +>'\' : "'" + diff --git a/tests/baselines/reference/S7.8.4_A3.2_T1.errors.txt b/tests/baselines/reference/S7.8.4_A3.2_T1.errors.txt new file mode 100644 index 0000000000000..ba821b67610c1 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.2_T1.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A3.2_T1.ts(15,6): error TS1002: Unterminated string literal. + + +==== S7.8.4_A3.2_T1.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" + es5id: 7.8.4_A3.2_T1 + description: Checking if execution of "\\\" fails + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + "\\\" + +!!! error TS1002: Unterminated string literal. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A3.2_T1.js b/tests/baselines/reference/S7.8.4_A3.2_T1.js new file mode 100644 index 0000000000000..9c4b8200a80b1 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.2_T1.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T1.ts] //// + +//// [S7.8.4_A3.2_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T1 +description: Checking if execution of "\\\" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\\\" + + +//// [S7.8.4_A3.2_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T1 +description: Checking if execution of "\\\" fails +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +"\\\"; diff --git a/tests/baselines/reference/S7.8.4_A3.2_T1.symbols b/tests/baselines/reference/S7.8.4_A3.2_T1.symbols new file mode 100644 index 0000000000000..9c447033297f3 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.2_T1.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T1.ts] //// + +=== S7.8.4_A3.2_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T1 +description: Checking if execution of "\\\" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\\\" + diff --git a/tests/baselines/reference/S7.8.4_A3.2_T1.types b/tests/baselines/reference/S7.8.4_A3.2_T1.types new file mode 100644 index 0000000000000..a0ed040d3c498 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.2_T1.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T1.ts] //// + +=== S7.8.4_A3.2_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T1 +description: Checking if execution of "\\\" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\\\" +>"\\\" : "\\\"" + diff --git a/tests/baselines/reference/S7.8.4_A3.2_T2.errors.txt b/tests/baselines/reference/S7.8.4_A3.2_T2.errors.txt new file mode 100644 index 0000000000000..1927cbe4b778e --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.2_T2.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A3.2_T2.ts(15,6): error TS1002: Unterminated string literal. + + +==== S7.8.4_A3.2_T2.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" + es5id: 7.8.4_A3.2_T2 + description: Checking if execution of '\\\' fails + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + '\\\' + +!!! error TS1002: Unterminated string literal. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A3.2_T2.js b/tests/baselines/reference/S7.8.4_A3.2_T2.js new file mode 100644 index 0000000000000..ecbb41c705f26 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.2_T2.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T2.ts] //// + +//// [S7.8.4_A3.2_T2.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T2 +description: Checking if execution of '\\\' fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +'\\\' + + +//// [S7.8.4_A3.2_T2.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T2 +description: Checking if execution of '\\\' fails +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +'\\\'; diff --git a/tests/baselines/reference/S7.8.4_A3.2_T2.symbols b/tests/baselines/reference/S7.8.4_A3.2_T2.symbols new file mode 100644 index 0000000000000..3052cd76a5c59 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.2_T2.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T2.ts] //// + +=== S7.8.4_A3.2_T2.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T2 +description: Checking if execution of '\\\' fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +'\\\' + diff --git a/tests/baselines/reference/S7.8.4_A3.2_T2.types b/tests/baselines/reference/S7.8.4_A3.2_T2.types new file mode 100644 index 0000000000000..d5eacae9de9b9 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A3.2_T2.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T2.ts] //// + +=== S7.8.4_A3.2_T2.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T2 +description: Checking if execution of '\\\' fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +'\\\' +>'\\\' : "\\'" + diff --git a/tests/baselines/reference/S7.8.4_A4.3_T1.errors.txt b/tests/baselines/reference/S7.8.4_A4.3_T1.errors.txt new file mode 100644 index 0000000000000..8ae29e946e26a --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A4.3_T1.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A4.3_T1.ts(15,2): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. + + +==== S7.8.4_A4.3_T1.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: NonEscapeSequence is not EscapeCharacter + es5id: 7.8.4_A4.3_T1 + description: "EscapeCharacter :: DecimalDigits :: 1" + negative: + phase: parse + type: SyntaxError + flags: [onlyStrict] + ---*/ + + + "\1" + ~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A4.3_T1.js b/tests/baselines/reference/S7.8.4_A4.3_T1.js new file mode 100644 index 0000000000000..caabb26390afc --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A4.3_T1.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T1.ts] //// + +//// [S7.8.4_A4.3_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T1 +description: "EscapeCharacter :: DecimalDigits :: 1" +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +"\1" + + +//// [S7.8.4_A4.3_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T1 +description: "EscapeCharacter :: DecimalDigits :: 1" +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ +"\1"; diff --git a/tests/baselines/reference/S7.8.4_A4.3_T1.symbols b/tests/baselines/reference/S7.8.4_A4.3_T1.symbols new file mode 100644 index 0000000000000..702f8989ffd79 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A4.3_T1.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T1.ts] //// + +=== S7.8.4_A4.3_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T1 +description: "EscapeCharacter :: DecimalDigits :: 1" +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +"\1" + diff --git a/tests/baselines/reference/S7.8.4_A4.3_T1.types b/tests/baselines/reference/S7.8.4_A4.3_T1.types new file mode 100644 index 0000000000000..71f24986703d5 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A4.3_T1.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T1.ts] //// + +=== S7.8.4_A4.3_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T1 +description: "EscapeCharacter :: DecimalDigits :: 1" +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +"\1" +>"\1" : "\u0001" + diff --git a/tests/baselines/reference/S7.8.4_A4.3_T2.errors.txt b/tests/baselines/reference/S7.8.4_A4.3_T2.errors.txt new file mode 100644 index 0000000000000..579fff15d68b2 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A4.3_T2.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A4.3_T2.ts(15,2): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x07'. + + +==== S7.8.4_A4.3_T2.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: NonEscapeSequence is not EscapeCharacter + es5id: 7.8.4_A4.3_T2 + description: "EscapeCharacter :: DecimalDigits :: 7" + negative: + phase: parse + type: SyntaxError + flags: [onlyStrict] + ---*/ + + + "\7" + ~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x07'. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A4.3_T2.js b/tests/baselines/reference/S7.8.4_A4.3_T2.js new file mode 100644 index 0000000000000..f99e981264d0c --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A4.3_T2.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T2.ts] //// + +//// [S7.8.4_A4.3_T2.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T2 +description: "EscapeCharacter :: DecimalDigits :: 7" +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +"\7" + + +//// [S7.8.4_A4.3_T2.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T2 +description: "EscapeCharacter :: DecimalDigits :: 7" +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ +"\7"; diff --git a/tests/baselines/reference/S7.8.4_A4.3_T2.symbols b/tests/baselines/reference/S7.8.4_A4.3_T2.symbols new file mode 100644 index 0000000000000..cbf4e16f47c93 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A4.3_T2.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T2.ts] //// + +=== S7.8.4_A4.3_T2.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T2 +description: "EscapeCharacter :: DecimalDigits :: 7" +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +"\7" + diff --git a/tests/baselines/reference/S7.8.4_A4.3_T2.types b/tests/baselines/reference/S7.8.4_A4.3_T2.types new file mode 100644 index 0000000000000..cd3ea86d7ae4f --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A4.3_T2.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T2.ts] //// + +=== S7.8.4_A4.3_T2.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T2 +description: "EscapeCharacter :: DecimalDigits :: 7" +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +"\7" +>"\7" : "\u0007" + diff --git a/tests/baselines/reference/S7.8.4_A7.1_T4.errors.txt b/tests/baselines/reference/S7.8.4_A7.1_T4.errors.txt new file mode 100644 index 0000000000000..22072b5fabe46 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.1_T4.errors.txt @@ -0,0 +1,24 @@ +S7.8.4_A7.1_T4.ts(17,7): error TS1125: Hexadecimal digit expected. + + +==== S7.8.4_A7.1_T4.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: | + EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit + es5id: 7.8.4_A7.1_T4 + description: "UnicodeEscapeSequence :: u000G is incorrect" + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK# + "\u000G" + +!!! error TS1125: Hexadecimal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A7.1_T4.js b/tests/baselines/reference/S7.8.4_A7.1_T4.js new file mode 100644 index 0000000000000..e2fb4baa600dd --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.1_T4.js @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.1_T4.ts] //// + +//// [S7.8.4_A7.1_T4.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 7.8.4_A7.1_T4 +description: "UnicodeEscapeSequence :: u000G is incorrect" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK# +"\u000G" + + +//// [S7.8.4_A7.1_T4.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: | + EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 7.8.4_A7.1_T4 +description: "UnicodeEscapeSequence :: u000G is incorrect" +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK# +"\u000G"; diff --git a/tests/baselines/reference/S7.8.4_A7.1_T4.symbols b/tests/baselines/reference/S7.8.4_A7.1_T4.symbols new file mode 100644 index 0000000000000..7717635f34cd1 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.1_T4.symbols @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.1_T4.ts] //// + +=== S7.8.4_A7.1_T4.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 7.8.4_A7.1_T4 +description: "UnicodeEscapeSequence :: u000G is incorrect" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK# +"\u000G" + diff --git a/tests/baselines/reference/S7.8.4_A7.1_T4.types b/tests/baselines/reference/S7.8.4_A7.1_T4.types new file mode 100644 index 0000000000000..b5cf529a9c407 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.1_T4.types @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.1_T4.ts] //// + +=== S7.8.4_A7.1_T4.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 7.8.4_A7.1_T4 +description: "UnicodeEscapeSequence :: u000G is incorrect" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK# +"\u000G" +>"\u000G" : "\\u000G" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T1.errors.txt b/tests/baselines/reference/S7.8.4_A7.2_T1.errors.txt new file mode 100644 index 0000000000000..9d178547ff940 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T1.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A7.2_T1.ts(15,5): error TS1125: Hexadecimal digit expected. + + +==== S7.8.4_A7.2_T1.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" + es5id: 7.8.4_A7.2_T1 + description: ":: HexDigit :: 1" + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + "\u1" + +!!! error TS1125: Hexadecimal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A7.2_T1.js b/tests/baselines/reference/S7.8.4_A7.2_T1.js new file mode 100644 index 0000000000000..b5ca06471b5fc --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T1.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T1.ts] //// + +//// [S7.8.4_A7.2_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T1 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u1" + + +//// [S7.8.4_A7.2_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T1 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +"\u1"; diff --git a/tests/baselines/reference/S7.8.4_A7.2_T1.symbols b/tests/baselines/reference/S7.8.4_A7.2_T1.symbols new file mode 100644 index 0000000000000..bc9a934c07248 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T1.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T1.ts] //// + +=== S7.8.4_A7.2_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T1 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u1" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T1.types b/tests/baselines/reference/S7.8.4_A7.2_T1.types new file mode 100644 index 0000000000000..104426a343320 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T1.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T1.ts] //// + +=== S7.8.4_A7.2_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T1 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u1" +>"\u1" : "\\u1" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T2.errors.txt b/tests/baselines/reference/S7.8.4_A7.2_T2.errors.txt new file mode 100644 index 0000000000000..cd634fb978a47 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T2.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A7.2_T2.ts(15,5): error TS1125: Hexadecimal digit expected. + + +==== S7.8.4_A7.2_T2.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" + es5id: 7.8.4_A7.2_T2 + description: ":: HexDigit :: A" + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + "\uA" + +!!! error TS1125: Hexadecimal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A7.2_T2.js b/tests/baselines/reference/S7.8.4_A7.2_T2.js new file mode 100644 index 0000000000000..1a535979ec71c --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T2.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T2.ts] //// + +//// [S7.8.4_A7.2_T2.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T2 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uA" + + +//// [S7.8.4_A7.2_T2.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T2 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +"\uA"; diff --git a/tests/baselines/reference/S7.8.4_A7.2_T2.symbols b/tests/baselines/reference/S7.8.4_A7.2_T2.symbols new file mode 100644 index 0000000000000..580ae62cf8c96 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T2.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T2.ts] //// + +=== S7.8.4_A7.2_T2.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T2 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uA" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T2.types b/tests/baselines/reference/S7.8.4_A7.2_T2.types new file mode 100644 index 0000000000000..aa1b6547d037a --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T2.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T2.ts] //// + +=== S7.8.4_A7.2_T2.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T2 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uA" +>"\uA" : "\\uA" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T3.errors.txt b/tests/baselines/reference/S7.8.4_A7.2_T3.errors.txt new file mode 100644 index 0000000000000..b7ce42ffe0881 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T3.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A7.2_T3.ts(15,6): error TS1125: Hexadecimal digit expected. + + +==== S7.8.4_A7.2_T3.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" + es5id: 7.8.4_A7.2_T3 + description: ":: HexDigit :: 1" + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + "\u11" + +!!! error TS1125: Hexadecimal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A7.2_T3.js b/tests/baselines/reference/S7.8.4_A7.2_T3.js new file mode 100644 index 0000000000000..07ad67d3146d9 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T3.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T3.ts] //// + +//// [S7.8.4_A7.2_T3.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T3 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u11" + + +//// [S7.8.4_A7.2_T3.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T3 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +"\u11"; diff --git a/tests/baselines/reference/S7.8.4_A7.2_T3.symbols b/tests/baselines/reference/S7.8.4_A7.2_T3.symbols new file mode 100644 index 0000000000000..43ce0a3b3391e --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T3.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T3.ts] //// + +=== S7.8.4_A7.2_T3.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T3 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u11" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T3.types b/tests/baselines/reference/S7.8.4_A7.2_T3.types new file mode 100644 index 0000000000000..4323dfcdffd34 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T3.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T3.ts] //// + +=== S7.8.4_A7.2_T3.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T3 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u11" +>"\u11" : "\\u11" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T4.errors.txt b/tests/baselines/reference/S7.8.4_A7.2_T4.errors.txt new file mode 100644 index 0000000000000..af6b1a9f71a40 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T4.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A7.2_T4.ts(15,6): error TS1125: Hexadecimal digit expected. + + +==== S7.8.4_A7.2_T4.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" + es5id: 7.8.4_A7.2_T4 + description: ":: HexDigit :: A" + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + "\uAA" + +!!! error TS1125: Hexadecimal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A7.2_T4.js b/tests/baselines/reference/S7.8.4_A7.2_T4.js new file mode 100644 index 0000000000000..17e56673f6bea --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T4.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T4.ts] //// + +//// [S7.8.4_A7.2_T4.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T4 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uAA" + + +//// [S7.8.4_A7.2_T4.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T4 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +"\uAA"; diff --git a/tests/baselines/reference/S7.8.4_A7.2_T4.symbols b/tests/baselines/reference/S7.8.4_A7.2_T4.symbols new file mode 100644 index 0000000000000..eb7b77f4e30c2 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T4.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T4.ts] //// + +=== S7.8.4_A7.2_T4.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T4 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uAA" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T4.types b/tests/baselines/reference/S7.8.4_A7.2_T4.types new file mode 100644 index 0000000000000..09682aadbce67 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T4.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T4.ts] //// + +=== S7.8.4_A7.2_T4.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T4 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uAA" +>"\uAA" : "\\uAA" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T5.errors.txt b/tests/baselines/reference/S7.8.4_A7.2_T5.errors.txt new file mode 100644 index 0000000000000..21cc068d28d1b --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T5.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A7.2_T5.ts(15,7): error TS1125: Hexadecimal digit expected. + + +==== S7.8.4_A7.2_T5.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" + es5id: 7.8.4_A7.2_T5 + description: ":: HexDigit :: 1" + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + "\u111" + +!!! error TS1125: Hexadecimal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A7.2_T5.js b/tests/baselines/reference/S7.8.4_A7.2_T5.js new file mode 100644 index 0000000000000..91023852ca5af --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T5.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T5.ts] //// + +//// [S7.8.4_A7.2_T5.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T5 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u111" + + +//// [S7.8.4_A7.2_T5.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T5 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +"\u111"; diff --git a/tests/baselines/reference/S7.8.4_A7.2_T5.symbols b/tests/baselines/reference/S7.8.4_A7.2_T5.symbols new file mode 100644 index 0000000000000..933ca679de3c4 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T5.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T5.ts] //// + +=== S7.8.4_A7.2_T5.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T5 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u111" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T5.types b/tests/baselines/reference/S7.8.4_A7.2_T5.types new file mode 100644 index 0000000000000..b4d6cc7733361 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T5.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T5.ts] //// + +=== S7.8.4_A7.2_T5.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T5 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u111" +>"\u111" : "\\u111" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T6.errors.txt b/tests/baselines/reference/S7.8.4_A7.2_T6.errors.txt new file mode 100644 index 0000000000000..8823be5401043 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T6.errors.txt @@ -0,0 +1,22 @@ +S7.8.4_A7.2_T6.ts(15,7): error TS1125: Hexadecimal digit expected. + + +==== S7.8.4_A7.2_T6.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" + es5id: 7.8.4_A7.2_T6 + description: ":: HexDigit :: A" + negative: + phase: parse + type: SyntaxError + ---*/ + + + //CHECK#1 + "\uAAA" + +!!! error TS1125: Hexadecimal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.4_A7.2_T6.js b/tests/baselines/reference/S7.8.4_A7.2_T6.js new file mode 100644 index 0000000000000..710fcda0c7554 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T6.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T6.ts] //// + +//// [S7.8.4_A7.2_T6.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T6 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uAAA" + + +//// [S7.8.4_A7.2_T6.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T6 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ +//CHECK#1 +"\uAAA"; diff --git a/tests/baselines/reference/S7.8.4_A7.2_T6.symbols b/tests/baselines/reference/S7.8.4_A7.2_T6.symbols new file mode 100644 index 0000000000000..ca9d2c149442e --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T6.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T6.ts] //// + +=== S7.8.4_A7.2_T6.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T6 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uAAA" + diff --git a/tests/baselines/reference/S7.8.4_A7.2_T6.types b/tests/baselines/reference/S7.8.4_A7.2_T6.types new file mode 100644 index 0000000000000..39465047c93b6 --- /dev/null +++ b/tests/baselines/reference/S7.8.4_A7.2_T6.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T6.ts] //// + +=== S7.8.4_A7.2_T6.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T6 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uAAA" +>"\uAAA" : "\\uAAA" + diff --git a/tests/baselines/reference/S7.8.5_A1.2_T1.errors.txt b/tests/baselines/reference/S7.8.5_A1.2_T1.errors.txt new file mode 100644 index 0000000000000..497fe1fdbcd8e --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T1.errors.txt @@ -0,0 +1,29 @@ +S7.8.5_A1.2_T1.ts(23,1): error TS1010: '*/' expected. + + +==== S7.8.5_A1.2_T1.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionFirstChar + info: | + RegularExpressionChars :: + [empty] + RegularExpressionCharsRegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + description: > + The first character of a regular expression may not be "*" + negative: + phase: parse + type: SyntaxError + ---*/ + + + /*/ + + +!!! error TS1010: '*/' expected. \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A1.2_T1.js b/tests/baselines/reference/S7.8.5_A1.2_T1.js new file mode 100644 index 0000000000000..da5f7842ae0e0 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T1.js @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T1.ts] //// + +//// [S7.8.5_A1.2_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionFirstChar +info: | + RegularExpressionChars :: + [empty] + RegularExpressionCharsRegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "*" +negative: + phase: parse + type: SyntaxError +---*/ + + +/*/ + + +//// [S7.8.5_A1.2_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionFirstChar +info: | + RegularExpressionChars :: + [empty] + RegularExpressionCharsRegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "*" +negative: + phase: parse + type: SyntaxError +---*/ +/*/ + diff --git a/tests/baselines/reference/S7.8.5_A1.2_T1.symbols b/tests/baselines/reference/S7.8.5_A1.2_T1.symbols new file mode 100644 index 0000000000000..2bfa8c5b9d3ee --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T1.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T1.ts] //// + +=== S7.8.5_A1.2_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionFirstChar +info: | + RegularExpressionChars :: + [empty] + RegularExpressionCharsRegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "*" +negative: + phase: parse + type: SyntaxError +---*/ + + +/*/ + diff --git a/tests/baselines/reference/S7.8.5_A1.2_T1.types b/tests/baselines/reference/S7.8.5_A1.2_T1.types new file mode 100644 index 0000000000000..2bfa8c5b9d3ee --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T1.types @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T1.ts] //// + +=== S7.8.5_A1.2_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionFirstChar +info: | + RegularExpressionChars :: + [empty] + RegularExpressionCharsRegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "*" +negative: + phase: parse + type: SyntaxError +---*/ + + +/*/ + diff --git a/tests/baselines/reference/S7.8.5_A1.2_T2.errors.txt b/tests/baselines/reference/S7.8.5_A1.2_T2.errors.txt new file mode 100644 index 0000000000000..dc0303ddb2484 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T2.errors.txt @@ -0,0 +1,32 @@ +S7.8.5_A1.2_T2.ts(25,2): error TS1161: Unterminated regular expression literal. + + +==== S7.8.5_A1.2_T2.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: sec-literals-regular-expression-literals + info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + description: > + The first character of a regular expression may not be "\" + negative: + phase: parse + type: SyntaxError + ---*/ + + + /\/ + +!!! error TS1161: Unterminated regular expression literal. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A1.2_T2.js b/tests/baselines/reference/S7.8.5_A1.2_T2.js new file mode 100644 index 0000000000000..7d3b2cd9d7a8c --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T2.js @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T2.ts] //// + +//// [S7.8.5_A1.2_T2.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "\" +negative: + phase: parse + type: SyntaxError +---*/ + + +/\/ + + +//// [S7.8.5_A1.2_T2.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "\" +negative: + phase: parse + type: SyntaxError +---*/ +/\/; diff --git a/tests/baselines/reference/S7.8.5_A1.2_T2.symbols b/tests/baselines/reference/S7.8.5_A1.2_T2.symbols new file mode 100644 index 0000000000000..289ac964d37d1 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T2.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T2.ts] //// + +=== S7.8.5_A1.2_T2.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "\" +negative: + phase: parse + type: SyntaxError +---*/ + + +/\/ + diff --git a/tests/baselines/reference/S7.8.5_A1.2_T2.types b/tests/baselines/reference/S7.8.5_A1.2_T2.types new file mode 100644 index 0000000000000..dee585d1fa1e2 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T2.types @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T2.ts] //// + +=== S7.8.5_A1.2_T2.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "\" +negative: + phase: parse + type: SyntaxError +---*/ + + +/\/ +>/\/ : RegExp + diff --git a/tests/baselines/reference/S7.8.5_A1.2_T3.errors.txt b/tests/baselines/reference/S7.8.5_A1.2_T3.errors.txt new file mode 100644 index 0000000000000..17e666708893b --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T3.errors.txt @@ -0,0 +1,36 @@ +S7.8.5_A1.2_T3.ts(26,1): error TS1128: Declaration or statement expected. +S7.8.5_A1.2_T3.ts(26,2): error TS2304: Cannot find name 'source'. + + +==== S7.8.5_A1.2_T3.ts (2 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: sec-literals-regular-expression-literals + info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + description: > + The first character of a regular expression may not be "/" + negative: + phase: parse + type: SyntaxError + ---*/ + + + /// + .source; + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~ +!!! error TS2304: Cannot find name 'source'. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A1.2_T3.js b/tests/baselines/reference/S7.8.5_A1.2_T3.js new file mode 100644 index 0000000000000..1f34ef6064366 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T3.js @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T3.ts] //// + +//// [S7.8.5_A1.2_T3.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "/" +negative: + phase: parse + type: SyntaxError +---*/ + + +/// +.source; + + +//// [S7.8.5_A1.2_T3.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +source; diff --git a/tests/baselines/reference/S7.8.5_A1.2_T3.symbols b/tests/baselines/reference/S7.8.5_A1.2_T3.symbols new file mode 100644 index 0000000000000..0c51b327dbaeb --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T3.symbols @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T3.ts] //// + +=== S7.8.5_A1.2_T3.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "/" +negative: + phase: parse + type: SyntaxError +---*/ + + +/// +.source; + diff --git a/tests/baselines/reference/S7.8.5_A1.2_T3.types b/tests/baselines/reference/S7.8.5_A1.2_T3.types new file mode 100644 index 0000000000000..000bb270f2b27 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T3.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T3.ts] //// + +=== S7.8.5_A1.2_T3.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "/" +negative: + phase: parse + type: SyntaxError +---*/ + + +/// +.source; +>source : any + diff --git a/tests/baselines/reference/S7.8.5_A1.2_T4.errors.txt b/tests/baselines/reference/S7.8.5_A1.2_T4.errors.txt new file mode 100644 index 0000000000000..2643ab228e4b5 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T4.errors.txt @@ -0,0 +1,36 @@ +S7.8.5_A1.2_T4.ts(26,1): error TS1128: Declaration or statement expected. +S7.8.5_A1.2_T4.ts(26,2): error TS2304: Cannot find name 'source'. + + +==== S7.8.5_A1.2_T4.ts (2 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: sec-literals-regular-expression-literals + info: | + RegularExpressionLiteral:: + / RegularExpressionBody / RegularExpressionFlags + + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars:: + [empty] + + MemberExpression . IdentifierName + + description: A regular expression may not be empty. + negative: + phase: parse + type: SyntaxError + ---*/ + + + // + .source; + ~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~ +!!! error TS2304: Cannot find name 'source'. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A1.2_T4.js b/tests/baselines/reference/S7.8.5_A1.2_T4.js new file mode 100644 index 0000000000000..31cc5d8373afa --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T4.js @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T4.ts] //// + +//// [S7.8.5_A1.2_T4.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionLiteral:: + / RegularExpressionBody / RegularExpressionFlags + + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars:: + [empty] + + MemberExpression . IdentifierName + +description: A regular expression may not be empty. +negative: + phase: parse + type: SyntaxError +---*/ + + +// +.source; + + +//// [S7.8.5_A1.2_T4.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +source; diff --git a/tests/baselines/reference/S7.8.5_A1.2_T4.symbols b/tests/baselines/reference/S7.8.5_A1.2_T4.symbols new file mode 100644 index 0000000000000..265708e6b84e9 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T4.symbols @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T4.ts] //// + +=== S7.8.5_A1.2_T4.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionLiteral:: + / RegularExpressionBody / RegularExpressionFlags + + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars:: + [empty] + + MemberExpression . IdentifierName + +description: A regular expression may not be empty. +negative: + phase: parse + type: SyntaxError +---*/ + + +// +.source; + diff --git a/tests/baselines/reference/S7.8.5_A1.2_T4.types b/tests/baselines/reference/S7.8.5_A1.2_T4.types new file mode 100644 index 0000000000000..e492b8ef0b3ca --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.2_T4.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T4.ts] //// + +=== S7.8.5_A1.2_T4.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionLiteral:: + / RegularExpressionBody / RegularExpressionFlags + + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars:: + [empty] + + MemberExpression . IdentifierName + +description: A regular expression may not be empty. +negative: + phase: parse + type: SyntaxError +---*/ + + +// +.source; +>source : any + diff --git a/tests/baselines/reference/S7.8.5_A1.3_T1.errors.txt b/tests/baselines/reference/S7.8.5_A1.3_T1.errors.txt new file mode 100644 index 0000000000000..e42b8cbbbeee2 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.3_T1.errors.txt @@ -0,0 +1,42 @@ +S7.8.5_A1.3_T1.ts(28,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +S7.8.5_A1.3_T1.ts(28,2): error TS1161: Unterminated regular expression literal. +S7.8.5_A1.3_T1.ts(29,2): error TS1109: Expression expected. + + +==== S7.8.5_A1.3_T1.ts (3 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionNonTerminator + info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + description: > + The first character of a regular expression may not be a (\u000A) + negative: + phase: parse + type: SyntaxError + ---*/ + + + / + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + / + +!!! error TS1109: Expression expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A1.3_T1.js b/tests/baselines/reference/S7.8.5_A1.3_T1.js new file mode 100644 index 0000000000000..f7723e5a4ad8b --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.3_T1.js @@ -0,0 +1,62 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T1.ts] //// + +//// [S7.8.5_A1.3_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a (\u000A) +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +/ + + +//// [S7.8.5_A1.3_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a (\u000A) +negative: + phase: parse + type: SyntaxError +---*/ +/ + / +; diff --git a/tests/baselines/reference/S7.8.5_A1.3_T1.symbols b/tests/baselines/reference/S7.8.5_A1.3_T1.symbols new file mode 100644 index 0000000000000..a7e1ee7c913e6 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.3_T1.symbols @@ -0,0 +1,34 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T1.ts] //// + +=== S7.8.5_A1.3_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a (\u000A) +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +/ + diff --git a/tests/baselines/reference/S7.8.5_A1.3_T1.types b/tests/baselines/reference/S7.8.5_A1.3_T1.types new file mode 100644 index 0000000000000..ac2dbc62ca52b --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.3_T1.types @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T1.ts] //// + +=== S7.8.5_A1.3_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a (\u000A) +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +>// : number +>/ : RegExp + +/ + +> : any + diff --git a/tests/baselines/reference/S7.8.5_A1.3_T3.errors.txt b/tests/baselines/reference/S7.8.5_A1.3_T3.errors.txt new file mode 100644 index 0000000000000..2cd0909b4f8ef --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.3_T3.errors.txt @@ -0,0 +1,42 @@ +S7.8.5_A1.3_T3.ts(28,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +S7.8.5_A1.3_T3.ts(28,2): error TS1161: Unterminated regular expression literal. +S7.8.5_A1.3_T3.ts(29,2): error TS1109: Expression expected. + + +==== S7.8.5_A1.3_T3.ts (3 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionNonTerminator + info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + description: > + The first character of a regular expression may not be a , (\u000D) + negative: + phase: parse + type: SyntaxError + ---*/ + + + / + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + / + +!!! error TS1109: Expression expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A1.3_T3.js b/tests/baselines/reference/S7.8.5_A1.3_T3.js new file mode 100644 index 0000000000000..a07f6a961d9ad --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.3_T3.js @@ -0,0 +1,62 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T3.ts] //// + +//// [S7.8.5_A1.3_T3.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a , (\u000D) +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +/ + + +//// [S7.8.5_A1.3_T3.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a , (\u000D) +negative: + phase: parse + type: SyntaxError +---*/ +/ + / +; diff --git a/tests/baselines/reference/S7.8.5_A1.3_T3.symbols b/tests/baselines/reference/S7.8.5_A1.3_T3.symbols new file mode 100644 index 0000000000000..7aec2bf7291c5 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.3_T3.symbols @@ -0,0 +1,34 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T3.ts] //// + +=== S7.8.5_A1.3_T3.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a , (\u000D) +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +/ + diff --git a/tests/baselines/reference/S7.8.5_A1.3_T3.types b/tests/baselines/reference/S7.8.5_A1.3_T3.types new file mode 100644 index 0000000000000..7729603905b83 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.3_T3.types @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T3.ts] //// + +=== S7.8.5_A1.3_T3.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a , (\u000D) +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +>// : number +>/ : RegExp + +/ + +> : any + diff --git a/tests/baselines/reference/S7.8.5_A1.5_T1.errors.txt b/tests/baselines/reference/S7.8.5_A1.5_T1.errors.txt new file mode 100644 index 0000000000000..1865f5c9ccc22 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.5_T1.errors.txt @@ -0,0 +1,36 @@ +S7.8.5_A1.5_T1.ts(22,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +S7.8.5_A1.5_T1.ts(22,2): error TS1161: Unterminated regular expression literal. +S7.8.5_A1.5_T1.ts(23,2): error TS1109: Expression expected. + + +==== S7.8.5_A1.5_T1.ts (3 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionBackslashSequence + info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + description: > + A RegularExpressionBackslashSequence may not contain a + + negative: + phase: parse + type: SyntaxError + ---*/ + + + /\ + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + / + +!!! error TS1109: Expression expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A1.5_T1.js b/tests/baselines/reference/S7.8.5_A1.5_T1.js new file mode 100644 index 0000000000000..5905267544711 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.5_T1.js @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T1.ts] //// + +//// [S7.8.5_A1.5_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A RegularExpressionBackslashSequence may not contain a + +negative: + phase: parse + type: SyntaxError +---*/ + + +/\ +/ + + +//// [S7.8.5_A1.5_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A RegularExpressionBackslashSequence may not contain a + +negative: + phase: parse + type: SyntaxError +---*/ +/\ + / +; diff --git a/tests/baselines/reference/S7.8.5_A1.5_T1.symbols b/tests/baselines/reference/S7.8.5_A1.5_T1.symbols new file mode 100644 index 0000000000000..0ef6d000cec57 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.5_T1.symbols @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T1.ts] //// + +=== S7.8.5_A1.5_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A RegularExpressionBackslashSequence may not contain a + +negative: + phase: parse + type: SyntaxError +---*/ + + +/\ +/ + diff --git a/tests/baselines/reference/S7.8.5_A1.5_T1.types b/tests/baselines/reference/S7.8.5_A1.5_T1.types new file mode 100644 index 0000000000000..ac5849acb0ffe --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.5_T1.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T1.ts] //// + +=== S7.8.5_A1.5_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A RegularExpressionBackslashSequence may not contain a + +negative: + phase: parse + type: SyntaxError +---*/ + + +/\ +>/\/ : number +>/\ : RegExp + +/ + +> : any + diff --git a/tests/baselines/reference/S7.8.5_A1.5_T3.errors.txt b/tests/baselines/reference/S7.8.5_A1.5_T3.errors.txt new file mode 100644 index 0000000000000..17c3e500de12c --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.5_T3.errors.txt @@ -0,0 +1,35 @@ +S7.8.5_A1.5_T3.ts(21,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +S7.8.5_A1.5_T3.ts(21,2): error TS1161: Unterminated regular expression literal. +S7.8.5_A1.5_T3.ts(22,2): error TS1109: Expression expected. + + +==== S7.8.5_A1.5_T3.ts (3 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionBackslashSequence + info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + description: > + A RegularExpressionBackslashSequence may not contain a + negative: + phase: parse + type: SyntaxError + ---*/ + + + /\ + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + / + +!!! error TS1109: Expression expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A1.5_T3.js b/tests/baselines/reference/S7.8.5_A1.5_T3.js new file mode 100644 index 0000000000000..afe8ba738b13c --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.5_T3.js @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T3.ts] //// + +//// [S7.8.5_A1.5_T3.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A RegularExpressionBackslashSequence may not contain a +negative: + phase: parse + type: SyntaxError +---*/ + + +/\ +/ + + +//// [S7.8.5_A1.5_T3.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A RegularExpressionBackslashSequence may not contain a +negative: + phase: parse + type: SyntaxError +---*/ +/\ + / +; diff --git a/tests/baselines/reference/S7.8.5_A1.5_T3.symbols b/tests/baselines/reference/S7.8.5_A1.5_T3.symbols new file mode 100644 index 0000000000000..45ec2119d0865 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.5_T3.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T3.ts] //// + +=== S7.8.5_A1.5_T3.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A RegularExpressionBackslashSequence may not contain a +negative: + phase: parse + type: SyntaxError +---*/ + + +/\ +/ + diff --git a/tests/baselines/reference/S7.8.5_A1.5_T3.types b/tests/baselines/reference/S7.8.5_A1.5_T3.types new file mode 100644 index 0000000000000..f5c024fa1f547 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A1.5_T3.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T3.ts] //// + +=== S7.8.5_A1.5_T3.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A RegularExpressionBackslashSequence may not contain a +negative: + phase: parse + type: SyntaxError +---*/ + + +/\ +>/\/ : number +>/\ : RegExp + +/ + +> : any + diff --git a/tests/baselines/reference/S7.8.5_A2.2_T1.errors.txt b/tests/baselines/reference/S7.8.5_A2.2_T1.errors.txt new file mode 100644 index 0000000000000..81377d5f9a423 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.2_T1.errors.txt @@ -0,0 +1,29 @@ +S7.8.5_A2.2_T1.ts(22,2): error TS1161: Unterminated regular expression literal. + + +==== S7.8.5_A2.2_T1.ts (1 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionChar + info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + description: > + A regular express may not contain a "\" as a SourceCharacter + + negative: + phase: parse + type: SyntaxError + ---*/ + + + /a\/ + +!!! error TS1161: Unterminated regular expression literal. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A2.2_T1.js b/tests/baselines/reference/S7.8.5_A2.2_T1.js new file mode 100644 index 0000000000000..fb687bed32464 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.2_T1.js @@ -0,0 +1,47 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T1.ts] //// + +//// [S7.8.5_A2.2_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionChar +info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular express may not contain a "\" as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\/ + + +//// [S7.8.5_A2.2_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionChar +info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular express may not contain a "\" as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ +/a\/; diff --git a/tests/baselines/reference/S7.8.5_A2.2_T1.symbols b/tests/baselines/reference/S7.8.5_A2.2_T1.symbols new file mode 100644 index 0000000000000..885be77962ff5 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.2_T1.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T1.ts] //// + +=== S7.8.5_A2.2_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionChar +info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular express may not contain a "\" as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\/ + diff --git a/tests/baselines/reference/S7.8.5_A2.2_T1.types b/tests/baselines/reference/S7.8.5_A2.2_T1.types new file mode 100644 index 0000000000000..4b2427c3247a3 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.2_T1.types @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T1.ts] //// + +=== S7.8.5_A2.2_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionChar +info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular express may not contain a "\" as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\/ +>/a\/ : RegExp + diff --git a/tests/baselines/reference/S7.8.5_A2.2_T2.errors.txt b/tests/baselines/reference/S7.8.5_A2.2_T2.errors.txt new file mode 100644 index 0000000000000..4894bccbf95f0 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.2_T2.errors.txt @@ -0,0 +1,32 @@ +S7.8.5_A2.2_T2.ts(22,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +S7.8.5_A2.2_T2.ts(22,5): error TS1109: Expression expected. + + +==== S7.8.5_A2.2_T2.ts (2 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionChar + info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + description: > + A regular expression may not contain a "/" as a SourceCharacter + + negative: + phase: parse + type: SyntaxError + ---*/ + + + /a//.source; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + ~ +!!! error TS1109: Expression expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A2.2_T2.js b/tests/baselines/reference/S7.8.5_A2.2_T2.js new file mode 100644 index 0000000000000..7a23f7f67d3d9 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.2_T2.js @@ -0,0 +1,47 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T2.ts] //// + +//// [S7.8.5_A2.2_T2.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionChar +info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular expression may not contain a "/" as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a//.source; + + +//// [S7.8.5_A2.2_T2.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionChar +info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular expression may not contain a "/" as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ +/a/ / .source; diff --git a/tests/baselines/reference/S7.8.5_A2.2_T2.symbols b/tests/baselines/reference/S7.8.5_A2.2_T2.symbols new file mode 100644 index 0000000000000..ee47efb678a3b --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.2_T2.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T2.ts] //// + +=== S7.8.5_A2.2_T2.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionChar +info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular expression may not contain a "/" as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a//.source; + diff --git a/tests/baselines/reference/S7.8.5_A2.2_T2.types b/tests/baselines/reference/S7.8.5_A2.2_T2.types new file mode 100644 index 0000000000000..d3f12b08226bb --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.2_T2.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T2.ts] //// + +=== S7.8.5_A2.2_T2.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionChar +info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular expression may not contain a "/" as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a//.source; +>/a//.source : number +>/a/ : RegExp +>.source : any +> : any +>source : any + diff --git a/tests/baselines/reference/S7.8.5_A2.3_T1.errors.txt b/tests/baselines/reference/S7.8.5_A2.3_T1.errors.txt new file mode 100644 index 0000000000000..5d608d426c27e --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.3_T1.errors.txt @@ -0,0 +1,45 @@ +S7.8.5_A2.3_T1.ts(31,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +S7.8.5_A2.3_T1.ts(31,2): error TS1161: Unterminated regular expression literal. +S7.8.5_A2.3_T1.ts(32,2): error TS1109: Expression expected. + + +==== S7.8.5_A2.3_T1.ts (3 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: sec-literals-regular-expression-literals + info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + + description: > + A regular expression may not contain a as a SourceCharacter + negative: + phase: parse + type: SyntaxError + ---*/ + + + /a + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + / + +!!! error TS1109: Expression expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A2.3_T1.js b/tests/baselines/reference/S7.8.5_A2.3_T1.js new file mode 100644 index 0000000000000..bcca9a1e7ed00 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.3_T1.js @@ -0,0 +1,68 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T1.ts] //// + +//// [S7.8.5_A2.3_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a +/ + + +//// [S7.8.5_A2.3_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ +/a + / +; diff --git a/tests/baselines/reference/S7.8.5_A2.3_T1.symbols b/tests/baselines/reference/S7.8.5_A2.3_T1.symbols new file mode 100644 index 0000000000000..ebb4641d2f9c1 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.3_T1.symbols @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T1.ts] //// + +=== S7.8.5_A2.3_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a +/ + diff --git a/tests/baselines/reference/S7.8.5_A2.3_T1.types b/tests/baselines/reference/S7.8.5_A2.3_T1.types new file mode 100644 index 0000000000000..a37c32309b0e7 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.3_T1.types @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T1.ts] //// + +=== S7.8.5_A2.3_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a +>/a/ : number +>/a : RegExp + +/ + +> : any + diff --git a/tests/baselines/reference/S7.8.5_A2.3_T3.errors.txt b/tests/baselines/reference/S7.8.5_A2.3_T3.errors.txt new file mode 100644 index 0000000000000..a913504bb96dd --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.3_T3.errors.txt @@ -0,0 +1,46 @@ +S7.8.5_A2.3_T3.ts(32,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +S7.8.5_A2.3_T3.ts(32,2): error TS1161: Unterminated regular expression literal. +S7.8.5_A2.3_T3.ts(33,2): error TS1109: Expression expected. + + +==== S7.8.5_A2.3_T3.ts (3 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: sec-literals-regular-expression-literals + info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + + description: > + A regular expression may not contain a as a SourceCharacter + + negative: + phase: parse + type: SyntaxError + ---*/ + + + /a + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + / + +!!! error TS1109: Expression expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A2.3_T3.js b/tests/baselines/reference/S7.8.5_A2.3_T3.js new file mode 100644 index 0000000000000..e211a40f224cf --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.3_T3.js @@ -0,0 +1,70 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T3.ts] //// + +//// [S7.8.5_A2.3_T3.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a +/ + + +//// [S7.8.5_A2.3_T3.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ +/a + / +; diff --git a/tests/baselines/reference/S7.8.5_A2.3_T3.symbols b/tests/baselines/reference/S7.8.5_A2.3_T3.symbols new file mode 100644 index 0000000000000..77f0685414979 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.3_T3.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T3.ts] //// + +=== S7.8.5_A2.3_T3.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a +/ + diff --git a/tests/baselines/reference/S7.8.5_A2.3_T3.types b/tests/baselines/reference/S7.8.5_A2.3_T3.types new file mode 100644 index 0000000000000..be6d681c633c6 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.3_T3.types @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T3.ts] //// + +=== S7.8.5_A2.3_T3.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a +>/a/ : number +>/a : RegExp + +/ + +> : any + diff --git a/tests/baselines/reference/S7.8.5_A2.5_T1.errors.txt b/tests/baselines/reference/S7.8.5_A2.5_T1.errors.txt new file mode 100644 index 0000000000000..acc57dbe8e986 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.5_T1.errors.txt @@ -0,0 +1,44 @@ +S7.8.5_A2.5_T1.ts(27,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +S7.8.5_A2.5_T1.ts(27,2): error TS1161: Unterminated regular expression literal. +S7.8.5_A2.5_T1.ts(27,3): error TS1511: Undetermined character escape. +S7.8.5_A2.5_T1.ts(28,2): error TS1109: Expression expected. + + +==== S7.8.5_A2.5_T1.ts (4 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionBackslashSequence + info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + + description: > + A regular expression may not contain a as a SourceCharacter + negative: + phase: parse + type: SyntaxError + ---*/ + + + /a\ + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + ~ +!!! error TS1511: Undetermined character escape. + / + +!!! error TS1109: Expression expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A2.5_T1.js b/tests/baselines/reference/S7.8.5_A2.5_T1.js new file mode 100644 index 0000000000000..b963924614e59 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.5_T1.js @@ -0,0 +1,60 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T1.ts] //// + +//// [S7.8.5_A2.5_T1.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\ +/ + + +//// [S7.8.5_A2.5_T1.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ +/a\ + / +; diff --git a/tests/baselines/reference/S7.8.5_A2.5_T1.symbols b/tests/baselines/reference/S7.8.5_A2.5_T1.symbols new file mode 100644 index 0000000000000..8d73f277d5807 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.5_T1.symbols @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T1.ts] //// + +=== S7.8.5_A2.5_T1.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\ +/ + diff --git a/tests/baselines/reference/S7.8.5_A2.5_T1.types b/tests/baselines/reference/S7.8.5_A2.5_T1.types new file mode 100644 index 0000000000000..40e9994b74f7c --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.5_T1.types @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T1.ts] //// + +=== S7.8.5_A2.5_T1.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\ +>/a\/ : number +>/a\ : RegExp + +/ + +> : any + diff --git a/tests/baselines/reference/S7.8.5_A2.5_T3.errors.txt b/tests/baselines/reference/S7.8.5_A2.5_T3.errors.txt new file mode 100644 index 0000000000000..d9443f092c6b0 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.5_T3.errors.txt @@ -0,0 +1,44 @@ +S7.8.5_A2.5_T3.ts(27,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +S7.8.5_A2.5_T3.ts(27,2): error TS1161: Unterminated regular expression literal. +S7.8.5_A2.5_T3.ts(27,3): error TS1511: Undetermined character escape. +S7.8.5_A2.5_T3.ts(28,2): error TS1109: Expression expected. + + +==== S7.8.5_A2.5_T3.ts (4 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionBackslashSequence + info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + + description: > + A regular expression may not contain a as a SourceCharacter + negative: + phase: parse + type: SyntaxError + ---*/ + + + /a\ + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + ~ +!!! error TS1511: Undetermined character escape. + / + +!!! error TS1109: Expression expected. + \ No newline at end of file diff --git a/tests/baselines/reference/S7.8.5_A2.5_T3.js b/tests/baselines/reference/S7.8.5_A2.5_T3.js new file mode 100644 index 0000000000000..ae283c03ea11e --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.5_T3.js @@ -0,0 +1,60 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T3.ts] //// + +//// [S7.8.5_A2.5_T3.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\ +/ + + +//// [S7.8.5_A2.5_T3.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ +/a\ + / +; diff --git a/tests/baselines/reference/S7.8.5_A2.5_T3.symbols b/tests/baselines/reference/S7.8.5_A2.5_T3.symbols new file mode 100644 index 0000000000000..a2e9a3b10e1d7 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.5_T3.symbols @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T3.ts] //// + +=== S7.8.5_A2.5_T3.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\ +/ + diff --git a/tests/baselines/reference/S7.8.5_A2.5_T3.types b/tests/baselines/reference/S7.8.5_A2.5_T3.types new file mode 100644 index 0000000000000..f71dfe346e031 --- /dev/null +++ b/tests/baselines/reference/S7.8.5_A2.5_T3.types @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T3.ts] //// + +=== S7.8.5_A2.5_T3.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\ +>/a\/ : number +>/a\ : RegExp + +/ + +> : any + diff --git a/tests/baselines/reference/bigint-binary-invalid-digit.errors.txt b/tests/baselines/reference/bigint-binary-invalid-digit.errors.txt new file mode 100644 index 0000000000000..564d0fe3a60da --- /dev/null +++ b/tests/baselines/reference/bigint-binary-invalid-digit.errors.txt @@ -0,0 +1,32 @@ +bigint-binary-invalid-digit.ts(25,3): error TS1177: Binary digit expected. + + +==== bigint-binary-invalid-digit.ts (1 errors) ==== + // Copyright (C) 2017 Robin Templeton. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Binary BigInt literal containing an invalid digit + esid: prod-NumericLiteral + info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n + negative: + phase: parse + type: SyntaxError + features: [BigInt] + ---*/ + + + 0b2n; + +!!! error TS1177: Binary digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-binary-invalid-digit.js b/tests/baselines/reference/bigint-binary-invalid-digit.js new file mode 100644 index 0000000000000..a579123caeade --- /dev/null +++ b/tests/baselines/reference/bigint-binary-invalid-digit.js @@ -0,0 +1,54 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/bigint-binary-invalid-digit.ts] //// + +//// [bigint-binary-invalid-digit.ts] +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Binary BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0b2n; + + +//// [bigint-binary-invalid-digit.js] +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Binary BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ +0; +2n; diff --git a/tests/baselines/reference/bigint-binary-invalid-digit.symbols b/tests/baselines/reference/bigint-binary-invalid-digit.symbols new file mode 100644 index 0000000000000..d3c0dc01a205c --- /dev/null +++ b/tests/baselines/reference/bigint-binary-invalid-digit.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/bigint-binary-invalid-digit.ts] //// + +=== bigint-binary-invalid-digit.ts === + +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Binary BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0b2n; + diff --git a/tests/baselines/reference/bigint-binary-invalid-digit.types b/tests/baselines/reference/bigint-binary-invalid-digit.types new file mode 100644 index 0000000000000..b0bee55196d42 --- /dev/null +++ b/tests/baselines/reference/bigint-binary-invalid-digit.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/bigint-binary-invalid-digit.ts] //// + +=== bigint-binary-invalid-digit.ts === +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Binary BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0b2n; +>0b : 0 +>2n : 2n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.errors.txt new file mode 100644 index 0000000000000..f3eeb0d30d0c8 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.errors.txt @@ -0,0 +1,50 @@ +bigint-numeric-separator-literal-bil-bd-nsl-bd-err.ts(43,3): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-bil-bd-nsl-bd-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0b_1n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.js new file mode 100644 index 0000000000000..eba7e68778925 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.js @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.ts] //// + +//// [bigint-numeric-separator-literal-bil-bd-nsl-bd-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b_1n; + + +//// [bigint-numeric-separator-literal-bil-bd-nsl-bd-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +1n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.symbols new file mode 100644 index 0000000000000..bc765cbfbaa7c --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.symbols @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.ts] //// + +=== bigint-numeric-separator-literal-bil-bd-nsl-bd-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b_1n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.types new file mode 100644 index 0000000000000..2dd9cf7b261ce --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.types @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.ts] //// + +=== bigint-numeric-separator-literal-bil-bd-nsl-bd-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b_1n; +>0b_1n : 1n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.errors.txt new file mode 100644 index 0000000000000..ef1381bc7cf73 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.errors.txt @@ -0,0 +1,50 @@ +bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.ts(43,5): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0b0__0n; + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.js new file mode 100644 index 0000000000000..4753596bca841 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.js @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.ts] //// + +//// [bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b0__0n; + + +//// [bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +0n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.symbols new file mode 100644 index 0000000000000..8f66dc0e9d134 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.symbols @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b0__0n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.types new file mode 100644 index 0000000000000..5aff521191af7 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.types @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b0__0n; +>0b0__0n : 0n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.errors.txt new file mode 100644 index 0000000000000..7652dc1380d41 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.errors.txt @@ -0,0 +1,49 @@ +bigint-numeric-separator-literal-bil-nsl-bd-err.ts(42,4): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-bil-nsl-bd-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral (before n) + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0b0_n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.js new file mode 100644 index 0000000000000..996f3ab202ce4 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.js @@ -0,0 +1,87 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-err.ts] //// + +//// [bigint-numeric-separator-literal-bil-nsl-bd-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral (before n) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b0_n; + + +//// [bigint-numeric-separator-literal-bil-nsl-bd-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral (before n) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +0n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.symbols new file mode 100644 index 0000000000000..3a822cc0fd77f --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.symbols @@ -0,0 +1,47 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-err.ts] //// + +=== bigint-numeric-separator-literal-bil-nsl-bd-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral (before n) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b0_n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.types new file mode 100644 index 0000000000000..2bb3dc224da3c --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-bil-nsl-bd-err.types @@ -0,0 +1,47 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-err.ts] //// + +=== bigint-numeric-separator-literal-bil-nsl-bd-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral (before n) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b0_n; +>0b0_n : 0n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.errors.txt new file mode 100644 index 0000000000000..475387690d5eb --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.errors.txt @@ -0,0 +1,42 @@ +bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.ts(35,3): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 1__0123456789n; + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.js new file mode 100644 index 0000000000000..7c751302da27e --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.js @@ -0,0 +1,73 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.ts] //// + +//// [bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1__0123456789n; + + +//// [bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +10123456789n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.symbols new file mode 100644 index 0000000000000..4ccc44a363a6f --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.symbols @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1__0123456789n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.types new file mode 100644 index 0000000000000..2ec58a3b2cabf --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.types @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1__0123456789n; +>1__0123456789n : 10123456789n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.errors.txt new file mode 100644 index 0000000000000..aecd082daeb83 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.errors.txt @@ -0,0 +1,44 @@ +bigint-numeric-separator-literal-dd-nsl-err.ts(37,2): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-dd-nsl-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 1_n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.js new file mode 100644 index 0000000000000..4ea1384bb3536 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.js @@ -0,0 +1,77 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-err.ts] //// + +//// [bigint-numeric-separator-literal-dd-nsl-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1_n; + + +//// [bigint-numeric-separator-literal-dd-nsl-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +1n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.symbols new file mode 100644 index 0000000000000..845fa4238632e --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.symbols @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-err.ts] //// + +=== bigint-numeric-separator-literal-dd-nsl-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1_n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.types new file mode 100644 index 0000000000000..a00c3a3119361 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dd-nsl-err.types @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-err.ts] //// + +=== bigint-numeric-separator-literal-dd-nsl-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1_n; +>1_n : 1n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.errors.txt new file mode 100644 index 0000000000000..b34cb831b69ee --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.errors.txt @@ -0,0 +1,42 @@ +bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.ts(35,4): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 10__0123456789n; + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.js new file mode 100644 index 0000000000000..19fbad39f9b3a --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.js @@ -0,0 +1,73 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.ts] //// + +//// [bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +10__0123456789n; + + +//// [bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +100123456789n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.symbols new file mode 100644 index 0000000000000..91d70465d61e8 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.symbols @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +10__0123456789n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.types new file mode 100644 index 0000000000000..ce21b07b68faf --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.types @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +10__0123456789n; +>10__0123456789n : 100123456789n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.errors.txt new file mode 100644 index 0000000000000..330eccb5bbd41 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.errors.txt @@ -0,0 +1,45 @@ +bigint-numeric-separator-literal-dds-nsl-err.ts(38,3): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-dds-nsl-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 10_n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.js new file mode 100644 index 0000000000000..1e926a7e08224 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.js @@ -0,0 +1,79 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-err.ts] //// + +//// [bigint-numeric-separator-literal-dds-nsl-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +10_n; + + +//// [bigint-numeric-separator-literal-dds-nsl-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +10n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.symbols new file mode 100644 index 0000000000000..db398bfba576e --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.symbols @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-err.ts] //// + +=== bigint-numeric-separator-literal-dds-nsl-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +10_n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.types new file mode 100644 index 0000000000000..d171fd4f10a7a --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-dds-nsl-err.types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-err.ts] //// + +=== bigint-numeric-separator-literal-dds-nsl-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +10_n; +>10_n : 10n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.errors.txt new file mode 100644 index 0000000000000..3faf8a313f6a6 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.errors.txt @@ -0,0 +1,50 @@ +bigint-numeric-separator-literal-hil-hd-nsl-hd-err.ts(43,3): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-hil-hd-nsl-hd-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0x_1n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.js new file mode 100644 index 0000000000000..6e2df228ad23e --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.js @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.ts] //// + +//// [bigint-numeric-separator-literal-hil-hd-nsl-hd-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x_1n; + + +//// [bigint-numeric-separator-literal-hil-hd-nsl-hd-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +0x1n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.symbols new file mode 100644 index 0000000000000..1e6b9cb2f1e8f --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.symbols @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.ts] //// + +=== bigint-numeric-separator-literal-hil-hd-nsl-hd-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x_1n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.types new file mode 100644 index 0000000000000..87391bc8a4e17 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.types @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.ts] //// + +=== bigint-numeric-separator-literal-hil-hd-nsl-hd-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x_1n; +>0x_1n : 1n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.errors.txt new file mode 100644 index 0000000000000..2e8504102e188 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.errors.txt @@ -0,0 +1,50 @@ +bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.ts(43,5): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0x0__0n; + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.js new file mode 100644 index 0000000000000..c94dcd21e9cc9 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.js @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.ts] //// + +//// [bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x0__0n; + + +//// [bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +0x00n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.symbols new file mode 100644 index 0000000000000..95c643d5e7f67 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.symbols @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x0__0n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.types new file mode 100644 index 0000000000000..02760f5349401 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.types @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x0__0n; +>0x0__0n : 0n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.errors.txt new file mode 100644 index 0000000000000..c1df168d4bab5 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.errors.txt @@ -0,0 +1,50 @@ +bigint-numeric-separator-literal-hil-nsl-hd-err.ts(43,4): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-hil-nsl-hd-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0x0_n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.js new file mode 100644 index 0000000000000..c07bdee531502 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.js @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-err.ts] //// + +//// [bigint-numeric-separator-literal-hil-nsl-hd-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x0_n; + + +//// [bigint-numeric-separator-literal-hil-nsl-hd-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +0x0n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.symbols new file mode 100644 index 0000000000000..57a85a88e9653 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.symbols @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-err.ts] //// + +=== bigint-numeric-separator-literal-hil-nsl-hd-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x0_n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.types new file mode 100644 index 0000000000000..69f5ba9a4a6d2 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-hil-nsl-hd-err.types @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-err.ts] //// + +=== bigint-numeric-separator-literal-hil-nsl-hd-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x0_n; +>0x0_n : 0n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.errors.txt new file mode 100644 index 0000000000000..f1f6fbcb7dadf --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.errors.txt @@ -0,0 +1,64 @@ +bigint-numeric-separator-literal-lol-00-err.ts(51,1): error TS1121: Octal literals are not allowed. Use the syntax '0o0'. +bigint-numeric-separator-literal-lol-00-err.ts(51,3): error TS1005: ';' expected. +bigint-numeric-separator-literal-lol-00-err.ts(51,3): error TS2304: Cannot find name '_0n'. + + +==== bigint-numeric-separator-literal-lol-00-err.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 00_0n; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o0'. + ~~~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS2304: Cannot find name '_0n'. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.js new file mode 100644 index 0000000000000..007821b1040e9 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.js @@ -0,0 +1,106 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-00-err.ts] //// + +//// [bigint-numeric-separator-literal-lol-00-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +00_0n; + + +//// [bigint-numeric-separator-literal-lol-00-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +0; +_0n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.symbols new file mode 100644 index 0000000000000..3b6b7b4c729a9 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.symbols @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-00-err.ts] //// + +=== bigint-numeric-separator-literal-lol-00-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +00_0n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.types new file mode 100644 index 0000000000000..ea393ed6d2fb0 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-00-err.types @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-00-err.ts] //// + +=== bigint-numeric-separator-literal-lol-00-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +00_0n; +>00 : 0 +>_0n : any + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.errors.txt new file mode 100644 index 0000000000000..0936d73f3fc6d --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.errors.txt @@ -0,0 +1,64 @@ +bigint-numeric-separator-literal-lol-01-err.ts(51,1): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. +bigint-numeric-separator-literal-lol-01-err.ts(51,3): error TS1005: ';' expected. +bigint-numeric-separator-literal-lol-01-err.ts(51,3): error TS2304: Cannot find name '_0n'. + + +==== bigint-numeric-separator-literal-lol-01-err.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 01_0n; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + ~~~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS2304: Cannot find name '_0n'. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.js new file mode 100644 index 0000000000000..0ceedc86820b8 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.js @@ -0,0 +1,106 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-01-err.ts] //// + +//// [bigint-numeric-separator-literal-lol-01-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +01_0n; + + +//// [bigint-numeric-separator-literal-lol-01-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +1; +_0n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.symbols new file mode 100644 index 0000000000000..1f86bbac174b8 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.symbols @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-01-err.ts] //// + +=== bigint-numeric-separator-literal-lol-01-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +01_0n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.types new file mode 100644 index 0000000000000..7634a4a0d0b67 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-01-err.types @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-01-err.ts] //// + +=== bigint-numeric-separator-literal-lol-01-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +01_0n; +>01 : 1 +>_0n : any + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.errors.txt new file mode 100644 index 0000000000000..a4c9e02460126 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.errors.txt @@ -0,0 +1,66 @@ +bigint-numeric-separator-literal-lol-07-err.ts(53,1): error TS1121: Octal literals are not allowed. Use the syntax '0o7'. +bigint-numeric-separator-literal-lol-07-err.ts(53,3): error TS1005: ';' expected. +bigint-numeric-separator-literal-lol-07-err.ts(53,3): error TS2304: Cannot find name '_0n'. + + +==== bigint-numeric-separator-literal-lol-07-err.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 07_0n; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o7'. + ~~~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS2304: Cannot find name '_0n'. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.js new file mode 100644 index 0000000000000..c079c4f1e6274 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.js @@ -0,0 +1,110 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-07-err.ts] //// + +//// [bigint-numeric-separator-literal-lol-07-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +07_0n; + + +//// [bigint-numeric-separator-literal-lol-07-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +7; +_0n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.symbols new file mode 100644 index 0000000000000..979cc1c532e2f --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.symbols @@ -0,0 +1,58 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-07-err.ts] //// + +=== bigint-numeric-separator-literal-lol-07-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +07_0n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.types new file mode 100644 index 0000000000000..d3d2d41acc9c3 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-07-err.types @@ -0,0 +1,59 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-07-err.ts] //// + +=== bigint-numeric-separator-literal-lol-07-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +07_0n; +>07 : 7 +>_0n : any + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.errors.txt new file mode 100644 index 0000000000000..63513b8606374 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.errors.txt @@ -0,0 +1,58 @@ +bigint-numeric-separator-literal-lol-0_0-err.ts(51,2): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-lol-0_0-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0_0n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.js new file mode 100644 index 0000000000000..5e5b19170b102 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.js @@ -0,0 +1,105 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_0-err.ts] //// + +//// [bigint-numeric-separator-literal-lol-0_0-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_0n; + + +//// [bigint-numeric-separator-literal-lol-0_0-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +00n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.symbols new file mode 100644 index 0000000000000..d676c577e207b --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.symbols @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_0-err.ts] //// + +=== bigint-numeric-separator-literal-lol-0_0-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_0n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.types new file mode 100644 index 0000000000000..d8cec5628de4e --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_0-err.types @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_0-err.ts] //// + +=== bigint-numeric-separator-literal-lol-0_0-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_0n; +>0_0n : 0n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.errors.txt new file mode 100644 index 0000000000000..dc868f911cda1 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.errors.txt @@ -0,0 +1,58 @@ +bigint-numeric-separator-literal-lol-0_1-err.ts(51,2): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-lol-0_1-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0_1n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.js new file mode 100644 index 0000000000000..0a90ea715f385 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.js @@ -0,0 +1,105 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_1-err.ts] //// + +//// [bigint-numeric-separator-literal-lol-0_1-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_1n; + + +//// [bigint-numeric-separator-literal-lol-0_1-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +01n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.symbols new file mode 100644 index 0000000000000..9dcb2fb6924c3 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.symbols @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_1-err.ts] //// + +=== bigint-numeric-separator-literal-lol-0_1-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_1n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.types new file mode 100644 index 0000000000000..fd8c20315218a --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_1-err.types @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_1-err.ts] //// + +=== bigint-numeric-separator-literal-lol-0_1-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_1n; +>0_1n : 1n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.errors.txt new file mode 100644 index 0000000000000..6d3ff45d1c81c --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.errors.txt @@ -0,0 +1,59 @@ +bigint-numeric-separator-literal-lol-0_7-err.ts(52,2): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-lol-0_7-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0_7n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.js new file mode 100644 index 0000000000000..30ac15e3133df --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.js @@ -0,0 +1,107 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_7-err.ts] //// + +//// [bigint-numeric-separator-literal-lol-0_7-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_7n; + + +//// [bigint-numeric-separator-literal-lol-0_7-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +07n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.symbols new file mode 100644 index 0000000000000..8fbb0c979d202 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.symbols @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_7-err.ts] //// + +=== bigint-numeric-separator-literal-lol-0_7-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_7n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.types new file mode 100644 index 0000000000000..a44c6f04bfca7 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-lol-0_7-err.types @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_7-err.ts] //// + +=== bigint-numeric-separator-literal-lol-0_7-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_7n; +>0_7n : 7n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.errors.txt new file mode 100644 index 0000000000000..921578187344a --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.errors.txt @@ -0,0 +1,61 @@ +bigint-numeric-separator-literal-nonoctal-08-err.ts(48,1): error TS1489: Decimals with leading zeros are not allowed. +bigint-numeric-separator-literal-nonoctal-08-err.ts(48,3): error TS1005: ';' expected. +bigint-numeric-separator-literal-nonoctal-08-err.ts(48,3): error TS2304: Cannot find name '_0n'. + + +==== bigint-numeric-separator-literal-nonoctal-08-err.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 08_0n; + ~~ +!!! error TS1489: Decimals with leading zeros are not allowed. + ~~~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS2304: Cannot find name '_0n'. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.js new file mode 100644 index 0000000000000..cddb3c39381b9 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.js @@ -0,0 +1,100 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-08-err.ts] //// + +//// [bigint-numeric-separator-literal-nonoctal-08-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +08_0n; + + +//// [bigint-numeric-separator-literal-nonoctal-08-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +8; +_0n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.symbols new file mode 100644 index 0000000000000..0fdb21cfb0a6f --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.symbols @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-08-err.ts] //// + +=== bigint-numeric-separator-literal-nonoctal-08-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +08_0n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.types new file mode 100644 index 0000000000000..3f80cf97c4f2c --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-08-err.types @@ -0,0 +1,54 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-08-err.ts] //// + +=== bigint-numeric-separator-literal-nonoctal-08-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +08_0n; +>08 : 8 +>_0n : any + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.errors.txt new file mode 100644 index 0000000000000..6aa14f6c8d164 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.errors.txt @@ -0,0 +1,61 @@ +bigint-numeric-separator-literal-nonoctal-09-err.ts(48,1): error TS1489: Decimals with leading zeros are not allowed. +bigint-numeric-separator-literal-nonoctal-09-err.ts(48,3): error TS1005: ';' expected. +bigint-numeric-separator-literal-nonoctal-09-err.ts(48,3): error TS2304: Cannot find name '_0n'. + + +==== bigint-numeric-separator-literal-nonoctal-09-err.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 09_0n; + ~~ +!!! error TS1489: Decimals with leading zeros are not allowed. + ~~~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS2304: Cannot find name '_0n'. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.js new file mode 100644 index 0000000000000..a882a8c989fcf --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.js @@ -0,0 +1,100 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-09-err.ts] //// + +//// [bigint-numeric-separator-literal-nonoctal-09-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +09_0n; + + +//// [bigint-numeric-separator-literal-nonoctal-09-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +9; +_0n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.symbols new file mode 100644 index 0000000000000..584e2e27cedde --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.symbols @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-09-err.ts] //// + +=== bigint-numeric-separator-literal-nonoctal-09-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +09_0n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.types new file mode 100644 index 0000000000000..8ec633fbf4501 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-09-err.types @@ -0,0 +1,54 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-09-err.ts] //// + +=== bigint-numeric-separator-literal-nonoctal-09-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +09_0n; +>09 : 9 +>_0n : any + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.errors.txt new file mode 100644 index 0000000000000..235901c5b0bf2 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.errors.txt @@ -0,0 +1,55 @@ +bigint-numeric-separator-literal-nonoctal-0_8-err.ts(48,2): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-nonoctal-0_8-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0_8n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.js new file mode 100644 index 0000000000000..03d3c12b4fc29 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.js @@ -0,0 +1,99 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_8-err.ts] //// + +//// [bigint-numeric-separator-literal-nonoctal-0_8-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_8n; + + +//// [bigint-numeric-separator-literal-nonoctal-0_8-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +08n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.symbols new file mode 100644 index 0000000000000..30a323a9630cb --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.symbols @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_8-err.ts] //// + +=== bigint-numeric-separator-literal-nonoctal-0_8-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_8n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.types new file mode 100644 index 0000000000000..93616f237fb70 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_8-err.types @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_8-err.ts] //// + +=== bigint-numeric-separator-literal-nonoctal-0_8-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_8n; +>0_8n : 8n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.errors.txt new file mode 100644 index 0000000000000..f1b63925272fb --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.errors.txt @@ -0,0 +1,55 @@ +bigint-numeric-separator-literal-nonoctal-0_9-err.ts(48,2): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-nonoctal-0_9-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0_9n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.js new file mode 100644 index 0000000000000..6bf666957986c --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.js @@ -0,0 +1,99 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_9-err.ts] //// + +//// [bigint-numeric-separator-literal-nonoctal-0_9-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_9n; + + +//// [bigint-numeric-separator-literal-nonoctal-0_9-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +09n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.symbols new file mode 100644 index 0000000000000..5417cea7d04c7 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.symbols @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_9-err.ts] //// + +=== bigint-numeric-separator-literal-nonoctal-0_9-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_9n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.types new file mode 100644 index 0000000000000..1958972d6df5c --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nonoctal-0_9-err.types @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_9-err.ts] //// + +=== bigint-numeric-separator-literal-nonoctal-0_9-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_9n; +>0_9n : 9n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.errors.txt new file mode 100644 index 0000000000000..bed2e0a756f6f --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.errors.txt @@ -0,0 +1,48 @@ +bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts(38,2): error TS6188: Numeric separators are not allowed here. +bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts(38,3): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts (2 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0__0123456789n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.js new file mode 100644 index 0000000000000..fc5a71c481399 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.js @@ -0,0 +1,79 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts] //// + +//// [bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0__0123456789n; + + +//// [bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +00123456789n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.symbols new file mode 100644 index 0000000000000..51b9219962c89 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.symbols @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0__0123456789n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.types new file mode 100644 index 0000000000000..4ebebd6f0d04b --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0__0123456789n; +>0__0123456789n : 123456789n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.errors.txt new file mode 100644 index 0000000000000..c5c058f9bfdc6 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.errors.txt @@ -0,0 +1,43 @@ +bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts(36,2): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: NonZeroDigit NumericLiteralSeparator DecimalDigits + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0_0123456789n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js new file mode 100644 index 0000000000000..df3027a127b43 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js @@ -0,0 +1,75 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts] //// + +//// [bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NonZeroDigit NumericLiteralSeparator DecimalDigits +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_0123456789n; + + +//// [bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: NonZeroDigit NumericLiteralSeparator DecimalDigits +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +00123456789n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.symbols new file mode 100644 index 0000000000000..1c6b4fd04035e --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.symbols @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts] //// + +=== bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NonZeroDigit NumericLiteralSeparator DecimalDigits +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_0123456789n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.types new file mode 100644 index 0000000000000..4695c52c48811 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.types @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts] //// + +=== bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NonZeroDigit NumericLiteralSeparator DecimalDigits +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_0123456789n; +>0_0123456789n : 123456789n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.errors.txt new file mode 100644 index 0000000000000..72b244e362cbd --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.errors.txt @@ -0,0 +1,50 @@ +bigint-numeric-separator-literal-oil-nsl-od-dunder-err.ts(43,5): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== bigint-numeric-separator-literal-oil-nsl-od-dunder-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0o0__0n; + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.js new file mode 100644 index 0000000000000..ef8ae6e62925a --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.js @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.ts] //// + +//// [bigint-numeric-separator-literal-oil-nsl-od-dunder-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o0__0n; + + +//// [bigint-numeric-separator-literal-oil-nsl-od-dunder-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +0n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.symbols new file mode 100644 index 0000000000000..6fe5b33c5413f --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.symbols @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-oil-nsl-od-dunder-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o0__0n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.types new file mode 100644 index 0000000000000..ad8e1fc95ab00 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.types @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.ts] //// + +=== bigint-numeric-separator-literal-oil-nsl-od-dunder-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o0__0n; +>0o0__0n : 0n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.errors.txt new file mode 100644 index 0000000000000..a1112c26c441a --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.errors.txt @@ -0,0 +1,50 @@ +bigint-numeric-separator-literal-oil-nsl-od-err.ts(43,4): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-oil-nsl-od-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0o0_n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.js new file mode 100644 index 0000000000000..2f9b79601fc94 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.js @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-err.ts] //// + +//// [bigint-numeric-separator-literal-oil-nsl-od-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o0_n; + + +//// [bigint-numeric-separator-literal-oil-nsl-od-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +0n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.symbols new file mode 100644 index 0000000000000..80587e9ba3309 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.symbols @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-err.ts] //// + +=== bigint-numeric-separator-literal-oil-nsl-od-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o0_n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.types new file mode 100644 index 0000000000000..24e41df7d8bd1 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-nsl-od-err.types @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-err.ts] //// + +=== bigint-numeric-separator-literal-oil-nsl-od-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o0_n; +>0o0_n : 0n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.errors.txt new file mode 100644 index 0000000000000..639cb2bd0b594 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.errors.txt @@ -0,0 +1,50 @@ +bigint-numeric-separator-literal-oil-od-nsl-od-err.ts(43,3): error TS6188: Numeric separators are not allowed here. + + +==== bigint-numeric-separator-literal-oil-od-nsl-od-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 0o_1n; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.js new file mode 100644 index 0000000000000..45fabd8264205 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.js @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-od-nsl-od-err.ts] //// + +//// [bigint-numeric-separator-literal-oil-od-nsl-od-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o_1n; + + +//// [bigint-numeric-separator-literal-oil-od-nsl-od-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +1n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.symbols new file mode 100644 index 0000000000000..8668fe6b18904 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.symbols @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-od-nsl-od-err.ts] //// + +=== bigint-numeric-separator-literal-oil-od-nsl-od-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o_1n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.types new file mode 100644 index 0000000000000..12c9fb5814645 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-oil-od-nsl-od-err.types @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-od-nsl-od-err.ts] //// + +=== bigint-numeric-separator-literal-oil-od-nsl-od-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o_1n; +>0o_1n : 1n + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.errors.txt b/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.errors.txt new file mode 100644 index 0000000000000..434120cdc3caa --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.errors.txt @@ -0,0 +1,45 @@ +bigint-numeric-separator-literal-unicode-err.ts(35,2): error TS1005: ';' expected. +bigint-numeric-separator-literal-unicode-err.ts(35,2): error TS2304: Cannot find name '\u005F0123456789n'. + + +==== bigint-numeric-separator-literal-unicode-err.ts (2 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + negative: + phase: parse + type: SyntaxError + features: [BigInt, numeric-separator-literal] + ---*/ + + + 1\u005F0123456789n; + ~~~~~~~~~~~~~~~~~ +!!! error TS1005: ';' expected. + ~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name '\u005F0123456789n'. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.js b/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.js new file mode 100644 index 0000000000000..18b9f55b74f5b --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.js @@ -0,0 +1,74 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-unicode-err.ts] //// + +//// [bigint-numeric-separator-literal-unicode-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1\u005F0123456789n; + + +//// [bigint-numeric-separator-literal-unicode-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ +1; +\u005F0123456789n; diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.symbols b/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.symbols new file mode 100644 index 0000000000000..38de34eeaf2e8 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.symbols @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-unicode-err.ts] //// + +=== bigint-numeric-separator-literal-unicode-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1\u005F0123456789n; + diff --git a/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.types b/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.types new file mode 100644 index 0000000000000..45970ff4c1c38 --- /dev/null +++ b/tests/baselines/reference/bigint-numeric-separator-literal-unicode-err.types @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-unicode-err.ts] //// + +=== bigint-numeric-separator-literal-unicode-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1\u005F0123456789n; +>1 : 1 +>\u005F0123456789n : any + diff --git a/tests/baselines/reference/bigint-octal-invalid-digit.errors.txt b/tests/baselines/reference/bigint-octal-invalid-digit.errors.txt new file mode 100644 index 0000000000000..85f6eabf0ed85 --- /dev/null +++ b/tests/baselines/reference/bigint-octal-invalid-digit.errors.txt @@ -0,0 +1,32 @@ +bigint-octal-invalid-digit.ts(25,3): error TS1178: Octal digit expected. + + +==== bigint-octal-invalid-digit.ts (1 errors) ==== + // Copyright (C) 2017 Robin Templeton. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Octal BigInt literal containing an invalid digit + esid: prod-NumericLiteral + info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n + negative: + phase: parse + type: SyntaxError + features: [BigInt] + ---*/ + + + 0o9n; + +!!! error TS1178: Octal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/bigint-octal-invalid-digit.js b/tests/baselines/reference/bigint-octal-invalid-digit.js new file mode 100644 index 0000000000000..5a7afd2367e4e --- /dev/null +++ b/tests/baselines/reference/bigint-octal-invalid-digit.js @@ -0,0 +1,54 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/bigint-octal-invalid-digit.ts] //// + +//// [bigint-octal-invalid-digit.ts] +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Octal BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0o9n; + + +//// [bigint-octal-invalid-digit.js] +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Octal BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ +0; +9n; diff --git a/tests/baselines/reference/bigint-octal-invalid-digit.symbols b/tests/baselines/reference/bigint-octal-invalid-digit.symbols new file mode 100644 index 0000000000000..8db9b2826b239 --- /dev/null +++ b/tests/baselines/reference/bigint-octal-invalid-digit.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/bigint-octal-invalid-digit.ts] //// + +=== bigint-octal-invalid-digit.ts === + +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Octal BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0o9n; + diff --git a/tests/baselines/reference/bigint-octal-invalid-digit.types b/tests/baselines/reference/bigint-octal-invalid-digit.types new file mode 100644 index 0000000000000..979ad4cc1bad5 --- /dev/null +++ b/tests/baselines/reference/bigint-octal-invalid-digit.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/bigint-octal-invalid-digit.ts] //// + +=== bigint-octal-invalid-digit.ts === +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Octal BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0o9n; +>0o : 0 +>9n : 9n + diff --git a/tests/baselines/reference/binary-invalid-digit.errors.txt b/tests/baselines/reference/binary-invalid-digit.errors.txt new file mode 100644 index 0000000000000..a9ce752086c3b --- /dev/null +++ b/tests/baselines/reference/binary-invalid-digit.errors.txt @@ -0,0 +1,29 @@ +binary-invalid-digit.ts(22,3): error TS1177: Binary digit expected. + + +==== binary-invalid-digit.ts (1 errors) ==== + // Copyright (C) 2015 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es6id: 11.8.3 + description: Binary-integer-literal-like sequence containing an invalid digit + info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 + negative: + phase: parse + type: SyntaxError + ---*/ + + + 0b2; + +!!! error TS1177: Binary digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/binary-invalid-digit.js b/tests/baselines/reference/binary-invalid-digit.js new file mode 100644 index 0000000000000..bd469545003e6 --- /dev/null +++ b/tests/baselines/reference/binary-invalid-digit.js @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-digit.ts] //// + +//// [binary-invalid-digit.ts] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence containing an invalid digit +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0b2; + + +//// [binary-invalid-digit.js] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence containing an invalid digit +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ +0; +2; diff --git a/tests/baselines/reference/binary-invalid-digit.symbols b/tests/baselines/reference/binary-invalid-digit.symbols new file mode 100644 index 0000000000000..f86f27d6d7770 --- /dev/null +++ b/tests/baselines/reference/binary-invalid-digit.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-digit.ts] //// + +=== binary-invalid-digit.ts === + +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence containing an invalid digit +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0b2; + diff --git a/tests/baselines/reference/binary-invalid-digit.types b/tests/baselines/reference/binary-invalid-digit.types new file mode 100644 index 0000000000000..125a32c1fecef --- /dev/null +++ b/tests/baselines/reference/binary-invalid-digit.types @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-digit.ts] //// + +=== binary-invalid-digit.ts === +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence containing an invalid digit +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0b2; +>0b : 0 +>2 : 2 + diff --git a/tests/baselines/reference/binary-invalid-leading.errors.txt b/tests/baselines/reference/binary-invalid-leading.errors.txt new file mode 100644 index 0000000000000..ad14657e4e06d --- /dev/null +++ b/tests/baselines/reference/binary-invalid-leading.errors.txt @@ -0,0 +1,35 @@ +binary-invalid-leading.ts(22,1): error TS1121: Octal literals are not allowed. Use the syntax '0o0'. +binary-invalid-leading.ts(22,3): error TS1005: ';' expected. +binary-invalid-leading.ts(22,3): error TS2304: Cannot find name 'b0'. + + +==== binary-invalid-leading.ts (3 errors) ==== + // Copyright (C) 2015 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es6id: 11.8.3 + description: Binary-integer-literal-like sequence with a leading 0 + info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 + negative: + phase: parse + type: SyntaxError + ---*/ + + + 00b0; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o0'. + ~~ +!!! error TS1005: ';' expected. + ~~ +!!! error TS2304: Cannot find name 'b0'. + \ No newline at end of file diff --git a/tests/baselines/reference/binary-invalid-leading.js b/tests/baselines/reference/binary-invalid-leading.js new file mode 100644 index 0000000000000..7ec341e422af9 --- /dev/null +++ b/tests/baselines/reference/binary-invalid-leading.js @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-leading.ts] //// + +//// [binary-invalid-leading.ts] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence with a leading 0 +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +00b0; + + +//// [binary-invalid-leading.js] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence with a leading 0 +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ +0; +b0; diff --git a/tests/baselines/reference/binary-invalid-leading.symbols b/tests/baselines/reference/binary-invalid-leading.symbols new file mode 100644 index 0000000000000..82f02d7b79fba --- /dev/null +++ b/tests/baselines/reference/binary-invalid-leading.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-leading.ts] //// + +=== binary-invalid-leading.ts === + +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence with a leading 0 +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +00b0; + diff --git a/tests/baselines/reference/binary-invalid-leading.types b/tests/baselines/reference/binary-invalid-leading.types new file mode 100644 index 0000000000000..942e531c5ea1f --- /dev/null +++ b/tests/baselines/reference/binary-invalid-leading.types @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-leading.ts] //// + +=== binary-invalid-leading.ts === +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence with a leading 0 +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +00b0; +>00 : 0 +>b0 : any + diff --git a/tests/baselines/reference/binary-invalid-truncated.errors.txt b/tests/baselines/reference/binary-invalid-truncated.errors.txt new file mode 100644 index 0000000000000..ec258c4ebef54 --- /dev/null +++ b/tests/baselines/reference/binary-invalid-truncated.errors.txt @@ -0,0 +1,29 @@ +binary-invalid-truncated.ts(22,3): error TS1177: Binary digit expected. + + +==== binary-invalid-truncated.ts (1 errors) ==== + // Copyright (C) 2015 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es6id: 11.8.3 + description: Binary-integer-literal-like sequence without any digits + info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 + negative: + phase: parse + type: SyntaxError + ---*/ + + + 0b; + +!!! error TS1177: Binary digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/binary-invalid-truncated.js b/tests/baselines/reference/binary-invalid-truncated.js new file mode 100644 index 0000000000000..81bf5d0f86ff9 --- /dev/null +++ b/tests/baselines/reference/binary-invalid-truncated.js @@ -0,0 +1,47 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-truncated.ts] //// + +//// [binary-invalid-truncated.ts] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence without any digits +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0b; + + +//// [binary-invalid-truncated.js] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence without any digits +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ +0; diff --git a/tests/baselines/reference/binary-invalid-truncated.symbols b/tests/baselines/reference/binary-invalid-truncated.symbols new file mode 100644 index 0000000000000..5fa42a7e52b39 --- /dev/null +++ b/tests/baselines/reference/binary-invalid-truncated.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-truncated.ts] //// + +=== binary-invalid-truncated.ts === + +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence without any digits +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0b; + diff --git a/tests/baselines/reference/binary-invalid-truncated.types b/tests/baselines/reference/binary-invalid-truncated.types new file mode 100644 index 0000000000000..6fa4002ed9559 --- /dev/null +++ b/tests/baselines/reference/binary-invalid-truncated.types @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-truncated.ts] //// + +=== binary-invalid-truncated.ts === +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence without any digits +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0b; +>0b : 0 + diff --git a/tests/baselines/reference/binary-invalid-unicode.errors.txt b/tests/baselines/reference/binary-invalid-unicode.errors.txt new file mode 100644 index 0000000000000..e1fcb155bce53 --- /dev/null +++ b/tests/baselines/reference/binary-invalid-unicode.errors.txt @@ -0,0 +1,32 @@ +binary-invalid-unicode.ts(22,2): error TS1005: ';' expected. +binary-invalid-unicode.ts(22,2): error TS2304: Cannot find name '\u00620'. + + +==== binary-invalid-unicode.ts (2 errors) ==== + // Copyright (C) 2015 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es6id: 11.8.3 + description: Binary-integer-literal-like sequence expressed with unicode escape sequence + info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 + negative: + phase: parse + type: SyntaxError + ---*/ + + + 0\u00620; + ~~~~~~~ +!!! error TS1005: ';' expected. + ~~~~~~~ +!!! error TS2304: Cannot find name '\u00620'. + \ No newline at end of file diff --git a/tests/baselines/reference/binary-invalid-unicode.js b/tests/baselines/reference/binary-invalid-unicode.js new file mode 100644 index 0000000000000..0c96567eb1961 --- /dev/null +++ b/tests/baselines/reference/binary-invalid-unicode.js @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-unicode.ts] //// + +//// [binary-invalid-unicode.ts] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence expressed with unicode escape sequence +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0\u00620; + + +//// [binary-invalid-unicode.js] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence expressed with unicode escape sequence +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ +0; +\u00620; diff --git a/tests/baselines/reference/binary-invalid-unicode.symbols b/tests/baselines/reference/binary-invalid-unicode.symbols new file mode 100644 index 0000000000000..08fdbb9cb78f3 --- /dev/null +++ b/tests/baselines/reference/binary-invalid-unicode.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-unicode.ts] //// + +=== binary-invalid-unicode.ts === + +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence expressed with unicode escape sequence +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0\u00620; + diff --git a/tests/baselines/reference/binary-invalid-unicode.types b/tests/baselines/reference/binary-invalid-unicode.types new file mode 100644 index 0000000000000..0cd4cf12dd077 --- /dev/null +++ b/tests/baselines/reference/binary-invalid-unicode.types @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/binary-invalid-unicode.ts] //// + +=== binary-invalid-unicode.ts === +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence expressed with unicode escape sequence +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0\u00620; +>0 : 0 +>\u00620 : any + diff --git a/tests/baselines/reference/early-err-bad-flag.errors.txt b/tests/baselines/reference/early-err-bad-flag.errors.txt new file mode 100644 index 0000000000000..d73ad0c7348bf --- /dev/null +++ b/tests/baselines/reference/early-err-bad-flag.errors.txt @@ -0,0 +1,24 @@ +early-err-bad-flag.ts(17,4): error TS1497: Unknown regular expression flag. + + +==== early-err-bad-flag.ts (1 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors + info: | + PrimaryExpression : RegularExpressionLiteral + + description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains any code points other than "g", "i", "m", "u", or "y", ... + + negative: + phase: parse + type: SyntaxError + ---*/ + + + /./G; + ~ +!!! error TS1497: Unknown regular expression flag. + \ No newline at end of file diff --git a/tests/baselines/reference/early-err-bad-flag.js b/tests/baselines/reference/early-err-bad-flag.js new file mode 100644 index 0000000000000..a5e65e14f17ee --- /dev/null +++ b/tests/baselines/reference/early-err-bad-flag.js @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-bad-flag.ts] //// + +//// [early-err-bad-flag.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains any code points other than "g", "i", "m", "u", or "y", ... + +negative: + phase: parse + type: SyntaxError +---*/ + + +/./G; + + +//// [early-err-bad-flag.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains any code points other than "g", "i", "m", "u", or "y", ... + +negative: + phase: parse + type: SyntaxError +---*/ +/./G; diff --git a/tests/baselines/reference/early-err-bad-flag.symbols b/tests/baselines/reference/early-err-bad-flag.symbols new file mode 100644 index 0000000000000..c12d73678557f --- /dev/null +++ b/tests/baselines/reference/early-err-bad-flag.symbols @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-bad-flag.ts] //// + +=== early-err-bad-flag.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains any code points other than "g", "i", "m", "u", or "y", ... + +negative: + phase: parse + type: SyntaxError +---*/ + + +/./G; + diff --git a/tests/baselines/reference/early-err-bad-flag.types b/tests/baselines/reference/early-err-bad-flag.types new file mode 100644 index 0000000000000..e8502efa8f16f --- /dev/null +++ b/tests/baselines/reference/early-err-bad-flag.types @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-bad-flag.ts] //// + +=== early-err-bad-flag.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains any code points other than "g", "i", "m", "u", or "y", ... + +negative: + phase: parse + type: SyntaxError +---*/ + + +/./G; +>/./G : RegExp + diff --git a/tests/baselines/reference/early-err-dup-flag.errors.txt b/tests/baselines/reference/early-err-dup-flag.errors.txt new file mode 100644 index 0000000000000..5f1bbbe369054 --- /dev/null +++ b/tests/baselines/reference/early-err-dup-flag.errors.txt @@ -0,0 +1,24 @@ +early-err-dup-flag.ts(17,6): error TS1498: Duplicate regular expression flag. + + +==== early-err-dup-flag.ts (1 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors + info: | + PrimaryExpression : RegularExpressionLiteral + + description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains ... the same code point more than once. + + negative: + phase: parse + type: SyntaxError + ---*/ + + + /./gig; + ~ +!!! error TS1498: Duplicate regular expression flag. + \ No newline at end of file diff --git a/tests/baselines/reference/early-err-dup-flag.js b/tests/baselines/reference/early-err-dup-flag.js new file mode 100644 index 0000000000000..3f63ea1ceb231 --- /dev/null +++ b/tests/baselines/reference/early-err-dup-flag.js @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-dup-flag.ts] //// + +//// [early-err-dup-flag.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains ... the same code point more than once. + +negative: + phase: parse + type: SyntaxError +---*/ + + +/./gig; + + +//// [early-err-dup-flag.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains ... the same code point more than once. + +negative: + phase: parse + type: SyntaxError +---*/ +/./gig; diff --git a/tests/baselines/reference/early-err-dup-flag.symbols b/tests/baselines/reference/early-err-dup-flag.symbols new file mode 100644 index 0000000000000..bfc3e0ba1e289 --- /dev/null +++ b/tests/baselines/reference/early-err-dup-flag.symbols @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-dup-flag.ts] //// + +=== early-err-dup-flag.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains ... the same code point more than once. + +negative: + phase: parse + type: SyntaxError +---*/ + + +/./gig; + diff --git a/tests/baselines/reference/early-err-dup-flag.types b/tests/baselines/reference/early-err-dup-flag.types new file mode 100644 index 0000000000000..c26159373510f --- /dev/null +++ b/tests/baselines/reference/early-err-dup-flag.types @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-dup-flag.ts] //// + +=== early-err-dup-flag.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains ... the same code point more than once. + +negative: + phase: parse + type: SyntaxError +---*/ + + +/./gig; +>/./gig : RegExp + diff --git a/tests/baselines/reference/early-err-flags-unicode-escape.errors.txt b/tests/baselines/reference/early-err-flags-unicode-escape.errors.txt new file mode 100644 index 0000000000000..e9d42a00fd625 --- /dev/null +++ b/tests/baselines/reference/early-err-flags-unicode-escape.errors.txt @@ -0,0 +1,27 @@ +early-err-flags-unicode-escape.ts(17,4): error TS1005: ';' expected. +early-err-flags-unicode-escape.ts(17,4): error TS2304: Cannot find name '\u0067'. + + +==== early-err-flags-unicode-escape.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-regular-expression-literals-static-semantics-early-errors + info: | + RegularExpressionFlags :: + RegularExpressionFlags IdentifierPart + + description: > + It is a Syntax Error if IdentifierPart contains a Unicode escape sequence. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /./\u0067; + ~~~~~~ +!!! error TS1005: ';' expected. + ~~~~~~ +!!! error TS2304: Cannot find name '\u0067'. + \ No newline at end of file diff --git a/tests/baselines/reference/early-err-flags-unicode-escape.js b/tests/baselines/reference/early-err-flags-unicode-escape.js new file mode 100644 index 0000000000000..6c7ad052ba75b --- /dev/null +++ b/tests/baselines/reference/early-err-flags-unicode-escape.js @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-flags-unicode-escape.ts] //// + +//// [early-err-flags-unicode-escape.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-regular-expression-literals-static-semantics-early-errors +info: | + RegularExpressionFlags :: + RegularExpressionFlags IdentifierPart + +description: > + It is a Syntax Error if IdentifierPart contains a Unicode escape sequence. +negative: + phase: parse + type: SyntaxError +---*/ + + +/./\u0067; + + +//// [early-err-flags-unicode-escape.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-regular-expression-literals-static-semantics-early-errors +info: | + RegularExpressionFlags :: + RegularExpressionFlags IdentifierPart + +description: > + It is a Syntax Error if IdentifierPart contains a Unicode escape sequence. +negative: + phase: parse + type: SyntaxError +---*/ +/./; +\u0067; diff --git a/tests/baselines/reference/early-err-flags-unicode-escape.symbols b/tests/baselines/reference/early-err-flags-unicode-escape.symbols new file mode 100644 index 0000000000000..fff5120586eb8 --- /dev/null +++ b/tests/baselines/reference/early-err-flags-unicode-escape.symbols @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-flags-unicode-escape.ts] //// + +=== early-err-flags-unicode-escape.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-regular-expression-literals-static-semantics-early-errors +info: | + RegularExpressionFlags :: + RegularExpressionFlags IdentifierPart + +description: > + It is a Syntax Error if IdentifierPart contains a Unicode escape sequence. +negative: + phase: parse + type: SyntaxError +---*/ + + +/./\u0067; + diff --git a/tests/baselines/reference/early-err-flags-unicode-escape.types b/tests/baselines/reference/early-err-flags-unicode-escape.types new file mode 100644 index 0000000000000..621906d55be9b --- /dev/null +++ b/tests/baselines/reference/early-err-flags-unicode-escape.types @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-flags-unicode-escape.ts] //// + +=== early-err-flags-unicode-escape.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-regular-expression-literals-static-semantics-early-errors +info: | + RegularExpressionFlags :: + RegularExpressionFlags IdentifierPart + +description: > + It is a Syntax Error if IdentifierPart contains a Unicode escape sequence. +negative: + phase: parse + type: SyntaxError +---*/ + + +/./\u0067; +>/./ : RegExp +>\u0067 : any + diff --git a/tests/baselines/reference/early-err-pattern.errors.txt b/tests/baselines/reference/early-err-pattern.errors.txt new file mode 100644 index 0000000000000..efcf12eb3b99d --- /dev/null +++ b/tests/baselines/reference/early-err-pattern.errors.txt @@ -0,0 +1,23 @@ +early-err-pattern.ts(16,2): error TS1505: There is nothing available for repetition. + + +==== early-err-pattern.ts (1 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors + info: | + PrimaryExpression : RegularExpressionLiteral + + description: > + It is a Syntax Error if BodyText of RegularExpressionLiteral cannot be recognized using the goal symbol Pattern of the ECMAScript RegExp grammar specified in #sec-patterns. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /?/; + ~ +!!! error TS1505: There is nothing available for repetition. + \ No newline at end of file diff --git a/tests/baselines/reference/early-err-pattern.js b/tests/baselines/reference/early-err-pattern.js new file mode 100644 index 0000000000000..11a25bc0e68ef --- /dev/null +++ b/tests/baselines/reference/early-err-pattern.js @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-pattern.ts] //// + +//// [early-err-pattern.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if BodyText of RegularExpressionLiteral cannot be recognized using the goal symbol Pattern of the ECMAScript RegExp grammar specified in #sec-patterns. +negative: + phase: parse + type: SyntaxError +---*/ + + +/?/; + + +//// [early-err-pattern.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if BodyText of RegularExpressionLiteral cannot be recognized using the goal symbol Pattern of the ECMAScript RegExp grammar specified in #sec-patterns. +negative: + phase: parse + type: SyntaxError +---*/ +/?/; diff --git a/tests/baselines/reference/early-err-pattern.symbols b/tests/baselines/reference/early-err-pattern.symbols new file mode 100644 index 0000000000000..85bf83ff9810b --- /dev/null +++ b/tests/baselines/reference/early-err-pattern.symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-pattern.ts] //// + +=== early-err-pattern.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if BodyText of RegularExpressionLiteral cannot be recognized using the goal symbol Pattern of the ECMAScript RegExp grammar specified in #sec-patterns. +negative: + phase: parse + type: SyntaxError +---*/ + + +/?/; + diff --git a/tests/baselines/reference/early-err-pattern.types b/tests/baselines/reference/early-err-pattern.types new file mode 100644 index 0000000000000..de5ae3458c90e --- /dev/null +++ b/tests/baselines/reference/early-err-pattern.types @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/early-err-pattern.ts] //// + +=== early-err-pattern.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if BodyText of RegularExpressionLiteral cannot be recognized using the goal symbol Pattern of the ECMAScript RegExp grammar specified in #sec-patterns. +negative: + phase: parse + type: SyntaxError +---*/ + + +/?/; +>/?/ : RegExp + diff --git a/tests/baselines/reference/exponent-part.errors.txt b/tests/baselines/reference/exponent-part.errors.txt new file mode 100644 index 0000000000000..b79cd99e6351a --- /dev/null +++ b/tests/baselines/reference/exponent-part.errors.txt @@ -0,0 +1,22 @@ +exponent-part.ts(15,1): error TS1352: A bigint literal cannot use exponential notation. + + +==== exponent-part.ts (1 errors) ==== + // Copyright (C) 2017 Robin Templeton. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: > + It is a Syntax Error if the NumericLiteralBase contains an ExponentPart. + esid: sec-numeric-literal-static-semantics-early-errors + features: [BigInt] + negative: + phase: parse + type: SyntaxError + ---*/ + + + 0e0n; + ~~~~ +!!! error TS1352: A bigint literal cannot use exponential notation. + \ No newline at end of file diff --git a/tests/baselines/reference/exponent-part.js b/tests/baselines/reference/exponent-part.js new file mode 100644 index 0000000000000..05651303a033c --- /dev/null +++ b/tests/baselines/reference/exponent-part.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/exponent-part.ts] //// + +//// [exponent-part.ts] +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: > + It is a Syntax Error if the NumericLiteralBase contains an ExponentPart. +esid: sec-numeric-literal-static-semantics-early-errors +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +0e0n; + + +//// [exponent-part.js] +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + It is a Syntax Error if the NumericLiteralBase contains an ExponentPart. +esid: sec-numeric-literal-static-semantics-early-errors +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ +0e0n; diff --git a/tests/baselines/reference/exponent-part.symbols b/tests/baselines/reference/exponent-part.symbols new file mode 100644 index 0000000000000..94281fe6109a9 --- /dev/null +++ b/tests/baselines/reference/exponent-part.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/exponent-part.ts] //// + +=== exponent-part.ts === + +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: > + It is a Syntax Error if the NumericLiteralBase contains an ExponentPart. +esid: sec-numeric-literal-static-semantics-early-errors +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +0e0n; + diff --git a/tests/baselines/reference/exponent-part.types b/tests/baselines/reference/exponent-part.types new file mode 100644 index 0000000000000..42a0251a064ec --- /dev/null +++ b/tests/baselines/reference/exponent-part.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/exponent-part.ts] //// + +=== exponent-part.ts === +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: > + It is a Syntax Error if the NumericLiteralBase contains an ExponentPart. +esid: sec-numeric-literal-static-semantics-early-errors +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +0e0n; +>0e0n : 0 + diff --git a/tests/baselines/reference/hexadecimal-invalid-digit.errors.txt b/tests/baselines/reference/hexadecimal-invalid-digit.errors.txt new file mode 100644 index 0000000000000..7e0721396d9c2 --- /dev/null +++ b/tests/baselines/reference/hexadecimal-invalid-digit.errors.txt @@ -0,0 +1,35 @@ +hexadecimal-invalid-digit.ts(25,3): error TS1125: Hexadecimal digit expected. +hexadecimal-invalid-digit.ts(25,3): error TS2304: Cannot find name 'gn'. + + +==== hexadecimal-invalid-digit.ts (2 errors) ==== + // Copyright (C) 2017 Robin Templeton. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Hexadecimal BigInt literal containing an invalid digit + esid: prod-NumericLiteral + info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n + negative: + phase: parse + type: SyntaxError + features: [BigInt] + ---*/ + + + 0xgn; + +!!! error TS1125: Hexadecimal digit expected. + ~~ +!!! error TS2304: Cannot find name 'gn'. + \ No newline at end of file diff --git a/tests/baselines/reference/hexadecimal-invalid-digit.js b/tests/baselines/reference/hexadecimal-invalid-digit.js new file mode 100644 index 0000000000000..6229bc614080f --- /dev/null +++ b/tests/baselines/reference/hexadecimal-invalid-digit.js @@ -0,0 +1,54 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/hexadecimal-invalid-digit.ts] //// + +//// [hexadecimal-invalid-digit.ts] +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Hexadecimal BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0xgn; + + +//// [hexadecimal-invalid-digit.js] +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Hexadecimal BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ +0x; +gn; diff --git a/tests/baselines/reference/hexadecimal-invalid-digit.symbols b/tests/baselines/reference/hexadecimal-invalid-digit.symbols new file mode 100644 index 0000000000000..520b45c9cbc4f --- /dev/null +++ b/tests/baselines/reference/hexadecimal-invalid-digit.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/hexadecimal-invalid-digit.ts] //// + +=== hexadecimal-invalid-digit.ts === + +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Hexadecimal BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0xgn; + diff --git a/tests/baselines/reference/hexadecimal-invalid-digit.types b/tests/baselines/reference/hexadecimal-invalid-digit.types new file mode 100644 index 0000000000000..9585dc4bed29b --- /dev/null +++ b/tests/baselines/reference/hexadecimal-invalid-digit.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/hexadecimal-invalid-digit.ts] //// + +=== hexadecimal-invalid-digit.ts === +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Hexadecimal BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0xgn; +>0x : 0 +>gn : any + diff --git a/tests/baselines/reference/invalid-braced-quantifier-exact.errors.txt b/tests/baselines/reference/invalid-braced-quantifier-exact.errors.txt new file mode 100644 index 0000000000000..9d027b21f30a9 --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-exact.errors.txt @@ -0,0 +1,31 @@ +invalid-braced-quantifier-exact.ts(24,2): error TS1505: There is nothing available for repetition. + + +==== invalid-braced-quantifier-exact.ts (1 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-patterns + es6id: 21.2.1 + description: Braced quantifier in an Atom position (exact count) + info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /{2}/; + ~~~ +!!! error TS1505: There is nothing available for repetition. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-braced-quantifier-exact.js b/tests/baselines/reference/invalid-braced-quantifier-exact.js new file mode 100644 index 0000000000000..265fccb9aca83 --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-exact.js @@ -0,0 +1,52 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-exact.ts] //// + +//// [invalid-braced-quantifier-exact.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (exact count) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2}/; + + +//// [invalid-braced-quantifier-exact.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (exact count) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ +/{2}/; diff --git a/tests/baselines/reference/invalid-braced-quantifier-exact.symbols b/tests/baselines/reference/invalid-braced-quantifier-exact.symbols new file mode 100644 index 0000000000000..39565f5f2530c --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-exact.symbols @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-exact.ts] //// + +=== invalid-braced-quantifier-exact.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (exact count) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2}/; + diff --git a/tests/baselines/reference/invalid-braced-quantifier-exact.types b/tests/baselines/reference/invalid-braced-quantifier-exact.types new file mode 100644 index 0000000000000..aff262c0136c8 --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-exact.types @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-exact.ts] //// + +=== invalid-braced-quantifier-exact.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (exact count) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2}/; +>/{2}/ : RegExp + diff --git a/tests/baselines/reference/invalid-braced-quantifier-lower.errors.txt b/tests/baselines/reference/invalid-braced-quantifier-lower.errors.txt new file mode 100644 index 0000000000000..f0966a10dcee8 --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-lower.errors.txt @@ -0,0 +1,31 @@ +invalid-braced-quantifier-lower.ts(24,2): error TS1505: There is nothing available for repetition. + + +==== invalid-braced-quantifier-lower.ts (1 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-patterns + es6id: 21.2.1 + description: Braced quantifier in an Atom position (lower-bounds) + info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /{2,}/; + ~~~~ +!!! error TS1505: There is nothing available for repetition. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-braced-quantifier-lower.js b/tests/baselines/reference/invalid-braced-quantifier-lower.js new file mode 100644 index 0000000000000..ac958f7a0bab4 --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-lower.js @@ -0,0 +1,52 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-lower.ts] //// + +//// [invalid-braced-quantifier-lower.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (lower-bounds) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2,}/; + + +//// [invalid-braced-quantifier-lower.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (lower-bounds) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ +/{2,}/; diff --git a/tests/baselines/reference/invalid-braced-quantifier-lower.symbols b/tests/baselines/reference/invalid-braced-quantifier-lower.symbols new file mode 100644 index 0000000000000..333950e31ac21 --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-lower.symbols @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-lower.ts] //// + +=== invalid-braced-quantifier-lower.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (lower-bounds) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2,}/; + diff --git a/tests/baselines/reference/invalid-braced-quantifier-lower.types b/tests/baselines/reference/invalid-braced-quantifier-lower.types new file mode 100644 index 0000000000000..1bf12436f232b --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-lower.types @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-lower.ts] //// + +=== invalid-braced-quantifier-lower.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (lower-bounds) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2,}/; +>/{2,}/ : RegExp + diff --git a/tests/baselines/reference/invalid-braced-quantifier-range.errors.txt b/tests/baselines/reference/invalid-braced-quantifier-range.errors.txt new file mode 100644 index 0000000000000..a0687e6cebfce --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-range.errors.txt @@ -0,0 +1,31 @@ +invalid-braced-quantifier-range.ts(24,2): error TS1505: There is nothing available for repetition. + + +==== invalid-braced-quantifier-range.ts (1 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-patterns + es6id: 21.2.1 + description: Braced quantifier in an Atom position (range) + info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /{2,3}/; + ~~~~~ +!!! error TS1505: There is nothing available for repetition. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-braced-quantifier-range.js b/tests/baselines/reference/invalid-braced-quantifier-range.js new file mode 100644 index 0000000000000..232e4d28486aa --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-range.js @@ -0,0 +1,52 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-range.ts] //// + +//// [invalid-braced-quantifier-range.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (range) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2,3}/; + + +//// [invalid-braced-quantifier-range.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (range) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ +/{2,3}/; diff --git a/tests/baselines/reference/invalid-braced-quantifier-range.symbols b/tests/baselines/reference/invalid-braced-quantifier-range.symbols new file mode 100644 index 0000000000000..d38c1c20b0480 --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-range.symbols @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-range.ts] //// + +=== invalid-braced-quantifier-range.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (range) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2,3}/; + diff --git a/tests/baselines/reference/invalid-braced-quantifier-range.types b/tests/baselines/reference/invalid-braced-quantifier-range.types new file mode 100644 index 0000000000000..c3c6b9fad6277 --- /dev/null +++ b/tests/baselines/reference/invalid-braced-quantifier-range.types @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-range.ts] //// + +=== invalid-braced-quantifier-range.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (range) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2,3}/; +>/{2,3}/ : RegExp + diff --git a/tests/baselines/reference/invalid-dangling-groupname-2-u.errors.txt b/tests/baselines/reference/invalid-dangling-groupname-2-u.errors.txt new file mode 100644 index 0000000000000..b338c7591c846 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-2-u.errors.txt @@ -0,0 +1,32 @@ +invalid-dangling-groupname-2-u.ts(19,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-dangling-groupname-2-u.ts(19,12): error TS1530: There is no capturing group named 'ab' in this regular expression. +invalid-dangling-groupname-2-u.ts(19,16): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-dangling-groupname-2-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Group reference must have corresponding group. + info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?a)\k/u; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~~ +!!! error TS1530: There is no capturing group named 'ab' in this regular expression. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-dangling-groupname-2-u.js b/tests/baselines/reference/invalid-dangling-groupname-2-u.js new file mode 100644 index 0000000000000..a21106e3ee8cc --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-2-u.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-2-u.ts] //// + +//// [invalid-dangling-groupname-2-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/u; + + +//// [invalid-dangling-groupname-2-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?a)\k/u; diff --git a/tests/baselines/reference/invalid-dangling-groupname-2-u.symbols b/tests/baselines/reference/invalid-dangling-groupname-2-u.symbols new file mode 100644 index 0000000000000..4bd55c2c73397 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-2-u.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-2-u.ts] //// + +=== invalid-dangling-groupname-2-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/u; + diff --git a/tests/baselines/reference/invalid-dangling-groupname-2-u.types b/tests/baselines/reference/invalid-dangling-groupname-2-u.types new file mode 100644 index 0000000000000..c6427be9468ab --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-2-u.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-2-u.ts] //// + +=== invalid-dangling-groupname-2-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/u; +>/(?a)\k/u : RegExp + diff --git a/tests/baselines/reference/invalid-dangling-groupname-2.errors.txt b/tests/baselines/reference/invalid-dangling-groupname-2.errors.txt new file mode 100644 index 0000000000000..9b6a919c9c66c --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-2.errors.txt @@ -0,0 +1,29 @@ +invalid-dangling-groupname-2.ts(19,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-dangling-groupname-2.ts(19,12): error TS1530: There is no capturing group named 'ab' in this regular expression. + + +==== invalid-dangling-groupname-2.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Group reference must have corresponding group. + info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?a)\k/; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~~ +!!! error TS1530: There is no capturing group named 'ab' in this regular expression. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-dangling-groupname-2.js b/tests/baselines/reference/invalid-dangling-groupname-2.js new file mode 100644 index 0000000000000..acdc15d1eeb83 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-2.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-2.ts] //// + +//// [invalid-dangling-groupname-2.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/; + + +//// [invalid-dangling-groupname-2.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?a)\k/; diff --git a/tests/baselines/reference/invalid-dangling-groupname-2.symbols b/tests/baselines/reference/invalid-dangling-groupname-2.symbols new file mode 100644 index 0000000000000..a80e770c230d9 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-2.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-2.ts] //// + +=== invalid-dangling-groupname-2.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/; + diff --git a/tests/baselines/reference/invalid-dangling-groupname-2.types b/tests/baselines/reference/invalid-dangling-groupname-2.types new file mode 100644 index 0000000000000..7664159dca23c --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-2.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-2.ts] //// + +=== invalid-dangling-groupname-2.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/; +>/(?a)\k/ : RegExp + diff --git a/tests/baselines/reference/invalid-dangling-groupname-3-u.errors.txt b/tests/baselines/reference/invalid-dangling-groupname-3-u.errors.txt new file mode 100644 index 0000000000000..296f001ecfcab --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-3-u.errors.txt @@ -0,0 +1,32 @@ +invalid-dangling-groupname-3-u.ts(19,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-dangling-groupname-3-u.ts(19,13): error TS1530: There is no capturing group named 'a' in this regular expression. +invalid-dangling-groupname-3-u.ts(19,16): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-dangling-groupname-3-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Group reference must have corresponding group. + info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?a)\k/u; + ~~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~ +!!! error TS1530: There is no capturing group named 'a' in this regular expression. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-dangling-groupname-3-u.js b/tests/baselines/reference/invalid-dangling-groupname-3-u.js new file mode 100644 index 0000000000000..c9535b749dc67 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-3-u.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.ts] //// + +//// [invalid-dangling-groupname-3-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/u; + + +//// [invalid-dangling-groupname-3-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?a)\k/u; diff --git a/tests/baselines/reference/invalid-dangling-groupname-3-u.symbols b/tests/baselines/reference/invalid-dangling-groupname-3-u.symbols new file mode 100644 index 0000000000000..5af9d6866fcbe --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-3-u.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.ts] //// + +=== invalid-dangling-groupname-3-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/u; + diff --git a/tests/baselines/reference/invalid-dangling-groupname-3-u.types b/tests/baselines/reference/invalid-dangling-groupname-3-u.types new file mode 100644 index 0000000000000..8a658cc9dfefd --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-3-u.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.ts] //// + +=== invalid-dangling-groupname-3-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/u; +>/(?a)\k/u : RegExp + diff --git a/tests/baselines/reference/invalid-dangling-groupname-3.errors.txt b/tests/baselines/reference/invalid-dangling-groupname-3.errors.txt new file mode 100644 index 0000000000000..35d418979bfc2 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-3.errors.txt @@ -0,0 +1,29 @@ +invalid-dangling-groupname-3.ts(19,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-dangling-groupname-3.ts(19,13): error TS1530: There is no capturing group named 'a' in this regular expression. + + +==== invalid-dangling-groupname-3.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Group reference must have corresponding group. + info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?a)\k/; + ~~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~ +!!! error TS1530: There is no capturing group named 'a' in this regular expression. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-dangling-groupname-3.js b/tests/baselines/reference/invalid-dangling-groupname-3.js new file mode 100644 index 0000000000000..2c2bf8b2070b3 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-3.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3.ts] //// + +//// [invalid-dangling-groupname-3.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/; + + +//// [invalid-dangling-groupname-3.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?a)\k/; diff --git a/tests/baselines/reference/invalid-dangling-groupname-3.symbols b/tests/baselines/reference/invalid-dangling-groupname-3.symbols new file mode 100644 index 0000000000000..8288cd1269a00 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-3.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3.ts] //// + +=== invalid-dangling-groupname-3.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/; + diff --git a/tests/baselines/reference/invalid-dangling-groupname-3.types b/tests/baselines/reference/invalid-dangling-groupname-3.types new file mode 100644 index 0000000000000..d957bb699889c --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-3.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3.ts] //// + +=== invalid-dangling-groupname-3.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/; +>/(?a)\k/ : RegExp + diff --git a/tests/baselines/reference/invalid-dangling-groupname-4-u.errors.txt b/tests/baselines/reference/invalid-dangling-groupname-4-u.errors.txt new file mode 100644 index 0000000000000..5b1848067f7b8 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-4-u.errors.txt @@ -0,0 +1,32 @@ +invalid-dangling-groupname-4-u.ts(19,5): error TS1530: There is no capturing group named 'a' in this regular expression. +invalid-dangling-groupname-4-u.ts(19,9): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-dangling-groupname-4-u.ts(19,16): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-dangling-groupname-4-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Group reference must have corresponding group. + info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /\k(?a)/u; + ~ +!!! error TS1530: There is no capturing group named 'a' in this regular expression. + ~~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-dangling-groupname-4-u.js b/tests/baselines/reference/invalid-dangling-groupname-4-u.js new file mode 100644 index 0000000000000..a948583ae59bc --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-4-u.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4-u.ts] //// + +//// [invalid-dangling-groupname-4-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?a)/u; + + +//// [invalid-dangling-groupname-4-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/\k(?a)/u; diff --git a/tests/baselines/reference/invalid-dangling-groupname-4-u.symbols b/tests/baselines/reference/invalid-dangling-groupname-4-u.symbols new file mode 100644 index 0000000000000..bd4f83706bf61 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-4-u.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4-u.ts] //// + +=== invalid-dangling-groupname-4-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?a)/u; + diff --git a/tests/baselines/reference/invalid-dangling-groupname-4-u.types b/tests/baselines/reference/invalid-dangling-groupname-4-u.types new file mode 100644 index 0000000000000..f7cefef260dad --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-4-u.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4-u.ts] //// + +=== invalid-dangling-groupname-4-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?a)/u; +>/\k(?a)/u : RegExp + diff --git a/tests/baselines/reference/invalid-dangling-groupname-4.errors.txt b/tests/baselines/reference/invalid-dangling-groupname-4.errors.txt new file mode 100644 index 0000000000000..29fcb5375b566 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-4.errors.txt @@ -0,0 +1,29 @@ +invalid-dangling-groupname-4.ts(19,5): error TS1530: There is no capturing group named 'a' in this regular expression. +invalid-dangling-groupname-4.ts(19,9): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + + +==== invalid-dangling-groupname-4.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Group reference must have corresponding group. + info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /\k(?a)/; + ~ +!!! error TS1530: There is no capturing group named 'a' in this regular expression. + ~~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-dangling-groupname-4.js b/tests/baselines/reference/invalid-dangling-groupname-4.js new file mode 100644 index 0000000000000..08778cf6acfa1 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-4.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4.ts] //// + +//// [invalid-dangling-groupname-4.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?a)/; + + +//// [invalid-dangling-groupname-4.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/\k(?a)/; diff --git a/tests/baselines/reference/invalid-dangling-groupname-4.symbols b/tests/baselines/reference/invalid-dangling-groupname-4.symbols new file mode 100644 index 0000000000000..e1d79c58d264b --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-4.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4.ts] //// + +=== invalid-dangling-groupname-4.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?a)/; + diff --git a/tests/baselines/reference/invalid-dangling-groupname-4.types b/tests/baselines/reference/invalid-dangling-groupname-4.types new file mode 100644 index 0000000000000..938ffceb18d56 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-4.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4.ts] //// + +=== invalid-dangling-groupname-4.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?a)/; +>/\k(?a)/ : RegExp + diff --git a/tests/baselines/reference/invalid-dangling-groupname-5.errors.txt b/tests/baselines/reference/invalid-dangling-groupname-5.errors.txt new file mode 100644 index 0000000000000..654b23df12cfb --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-5.errors.txt @@ -0,0 +1,29 @@ +invalid-dangling-groupname-5.ts(19,5): error TS1530: There is no capturing group named 'a' in this regular expression. +invalid-dangling-groupname-5.ts(19,9): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + + +==== invalid-dangling-groupname-5.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Group reference must have corresponding group. + info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /\k(?x)/; + ~ +!!! error TS1530: There is no capturing group named 'a' in this regular expression. + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-dangling-groupname-5.js b/tests/baselines/reference/invalid-dangling-groupname-5.js new file mode 100644 index 0000000000000..01d4c6140c89c --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-5.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-5.ts] //// + +//// [invalid-dangling-groupname-5.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?x)/; + + +//// [invalid-dangling-groupname-5.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/\k(?x)/; diff --git a/tests/baselines/reference/invalid-dangling-groupname-5.symbols b/tests/baselines/reference/invalid-dangling-groupname-5.symbols new file mode 100644 index 0000000000000..cabeea1531aeb --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-5.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-5.ts] //// + +=== invalid-dangling-groupname-5.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?x)/; + diff --git a/tests/baselines/reference/invalid-dangling-groupname-5.types b/tests/baselines/reference/invalid-dangling-groupname-5.types new file mode 100644 index 0000000000000..a9bcd58c6d9a2 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-5.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-5.ts] //// + +=== invalid-dangling-groupname-5.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?x)/; +>/\k(?x)/ : RegExp + diff --git a/tests/baselines/reference/invalid-dangling-groupname-u.errors.txt b/tests/baselines/reference/invalid-dangling-groupname-u.errors.txt new file mode 100644 index 0000000000000..da11836807747 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-u.errors.txt @@ -0,0 +1,32 @@ +invalid-dangling-groupname-u.ts(19,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-dangling-groupname-u.ts(19,12): error TS1530: There is no capturing group named 'b' in this regular expression. +invalid-dangling-groupname-u.ts(19,15): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-dangling-groupname-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Group reference must have corresponding group. + info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)\k/u; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~ +!!! error TS1530: There is no capturing group named 'b' in this regular expression. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-dangling-groupname-u.js b/tests/baselines/reference/invalid-dangling-groupname-u.js new file mode 100644 index 0000000000000..b171acb9cf710 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-u.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-u.ts] //// + +//// [invalid-dangling-groupname-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/u; + + +//// [invalid-dangling-groupname-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)\k/u; diff --git a/tests/baselines/reference/invalid-dangling-groupname-u.symbols b/tests/baselines/reference/invalid-dangling-groupname-u.symbols new file mode 100644 index 0000000000000..8e22666f1ea70 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-u.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-u.ts] //// + +=== invalid-dangling-groupname-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/u; + diff --git a/tests/baselines/reference/invalid-dangling-groupname-u.types b/tests/baselines/reference/invalid-dangling-groupname-u.types new file mode 100644 index 0000000000000..50b2780900439 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-u.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-u.ts] //// + +=== invalid-dangling-groupname-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/u; +>/(?.)\k/u : RegExp + diff --git a/tests/baselines/reference/invalid-dangling-groupname-without-group-u.errors.txt b/tests/baselines/reference/invalid-dangling-groupname-without-group-u.errors.txt new file mode 100644 index 0000000000000..d702fc863b517 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-without-group-u.errors.txt @@ -0,0 +1,29 @@ +invalid-dangling-groupname-without-group-u.ts(19,5): error TS1530: There is no capturing group named 'a' in this regular expression. +invalid-dangling-groupname-without-group-u.ts(19,8): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-dangling-groupname-without-group-u.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Group reference must have corresponding group. + info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /\k/u; + ~ +!!! error TS1530: There is no capturing group named 'a' in this regular expression. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-dangling-groupname-without-group-u.js b/tests/baselines/reference/invalid-dangling-groupname-without-group-u.js new file mode 100644 index 0000000000000..550099b920576 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-without-group-u.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-without-group-u.ts] //// + +//// [invalid-dangling-groupname-without-group-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k/u; + + +//// [invalid-dangling-groupname-without-group-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/\k/u; diff --git a/tests/baselines/reference/invalid-dangling-groupname-without-group-u.symbols b/tests/baselines/reference/invalid-dangling-groupname-without-group-u.symbols new file mode 100644 index 0000000000000..cb9ea0ed613dd --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-without-group-u.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-without-group-u.ts] //// + +=== invalid-dangling-groupname-without-group-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k/u; + diff --git a/tests/baselines/reference/invalid-dangling-groupname-without-group-u.types b/tests/baselines/reference/invalid-dangling-groupname-without-group-u.types new file mode 100644 index 0000000000000..616e76b3d637c --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname-without-group-u.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-without-group-u.ts] //// + +=== invalid-dangling-groupname-without-group-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k/u; +>/\k/u : RegExp + diff --git a/tests/baselines/reference/invalid-dangling-groupname.errors.txt b/tests/baselines/reference/invalid-dangling-groupname.errors.txt new file mode 100644 index 0000000000000..9532208b10790 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname.errors.txt @@ -0,0 +1,29 @@ +invalid-dangling-groupname.ts(19,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-dangling-groupname.ts(19,12): error TS1530: There is no capturing group named 'b' in this regular expression. + + +==== invalid-dangling-groupname.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: Group reference must have corresponding group. + info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)\k/; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~ +!!! error TS1530: There is no capturing group named 'b' in this regular expression. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-dangling-groupname.js b/tests/baselines/reference/invalid-dangling-groupname.js new file mode 100644 index 0000000000000..61f5f1173f4c8 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname.ts] //// + +//// [invalid-dangling-groupname.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/; + + +//// [invalid-dangling-groupname.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)\k/; diff --git a/tests/baselines/reference/invalid-dangling-groupname.symbols b/tests/baselines/reference/invalid-dangling-groupname.symbols new file mode 100644 index 0000000000000..ac6b50f9b3362 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname.ts] //// + +=== invalid-dangling-groupname.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/; + diff --git a/tests/baselines/reference/invalid-dangling-groupname.types b/tests/baselines/reference/invalid-dangling-groupname.types new file mode 100644 index 0000000000000..de36c73f413a6 --- /dev/null +++ b/tests/baselines/reference/invalid-dangling-groupname.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname.ts] //// + +=== invalid-dangling-groupname.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/; +>/(?.)\k/ : RegExp + diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.errors.txt b/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.errors.txt new file mode 100644 index 0000000000000..e6133feab8205 --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.errors.txt @@ -0,0 +1,37 @@ +invalid-duplicate-groupspecifier-2-u.ts(18,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-duplicate-groupspecifier-2-u.ts(18,11): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-duplicate-groupspecifier-2-u.ts(18,18): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-duplicate-groupspecifier-2-u.ts(18,19): error TS1513: Named capturing groups with the same name must be mutually exclusive to each other. +invalid-duplicate-groupspecifier-2-u.ts(18,24): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-duplicate-groupspecifier-2-u.ts (5 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifiers within one alternative must be unique. + info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?a)(?b)(?a)/u; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~ +!!! error TS1513: Named capturing groups with the same name must be mutually exclusive to each other. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.js b/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.js new file mode 100644 index 0000000000000..9d5b03abea346 --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.js @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2-u.ts] //// + +//// [invalid-duplicate-groupspecifier-2-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?b)(?a)/u; + + +//// [invalid-duplicate-groupspecifier-2-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?a)(?b)(?a)/u; diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.symbols b/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.symbols new file mode 100644 index 0000000000000..b35d92563f9e0 --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.symbols @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2-u.ts] //// + +=== invalid-duplicate-groupspecifier-2-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?b)(?a)/u; + diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.types b/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.types new file mode 100644 index 0000000000000..adc3a9359cac0 --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-2-u.types @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2-u.ts] //// + +=== invalid-duplicate-groupspecifier-2-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?b)(?a)/u; +>/(?a)(?b)(?a)/u : RegExp + diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-2.errors.txt b/tests/baselines/reference/invalid-duplicate-groupspecifier-2.errors.txt new file mode 100644 index 0000000000000..55528bd812aa6 --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-2.errors.txt @@ -0,0 +1,34 @@ +invalid-duplicate-groupspecifier-2.ts(18,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-duplicate-groupspecifier-2.ts(18,11): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-duplicate-groupspecifier-2.ts(18,18): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-duplicate-groupspecifier-2.ts(18,19): error TS1513: Named capturing groups with the same name must be mutually exclusive to each other. + + +==== invalid-duplicate-groupspecifier-2.ts (4 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifiers within one alternative must be unique. + info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?a)(?b)(?a)/; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~ +!!! error TS1513: Named capturing groups with the same name must be mutually exclusive to each other. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-2.js b/tests/baselines/reference/invalid-duplicate-groupspecifier-2.js new file mode 100644 index 0000000000000..556314e836874 --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-2.js @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2.ts] //// + +//// [invalid-duplicate-groupspecifier-2.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?b)(?a)/; + + +//// [invalid-duplicate-groupspecifier-2.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?a)(?b)(?a)/; diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-2.symbols b/tests/baselines/reference/invalid-duplicate-groupspecifier-2.symbols new file mode 100644 index 0000000000000..ed89432f12146 --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-2.symbols @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2.ts] //// + +=== invalid-duplicate-groupspecifier-2.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?b)(?a)/; + diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-2.types b/tests/baselines/reference/invalid-duplicate-groupspecifier-2.types new file mode 100644 index 0000000000000..02c76ba049e3c --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-2.types @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2.ts] //// + +=== invalid-duplicate-groupspecifier-2.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?b)(?a)/; +>/(?a)(?b)(?a)/ : RegExp + diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-u.errors.txt b/tests/baselines/reference/invalid-duplicate-groupspecifier-u.errors.txt new file mode 100644 index 0000000000000..e66380cfdee27 --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-u.errors.txt @@ -0,0 +1,34 @@ +invalid-duplicate-groupspecifier-u.ts(18,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-duplicate-groupspecifier-u.ts(18,11): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-duplicate-groupspecifier-u.ts(18,12): error TS1513: Named capturing groups with the same name must be mutually exclusive to each other. +invalid-duplicate-groupspecifier-u.ts(18,17): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-duplicate-groupspecifier-u.ts (4 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifiers within one alternative must be unique. + info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?a)(?a)/u; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~ +!!! error TS1513: Named capturing groups with the same name must be mutually exclusive to each other. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-u.js b/tests/baselines/reference/invalid-duplicate-groupspecifier-u.js new file mode 100644 index 0000000000000..9a74af8c3c011 --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-u.js @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-u.ts] //// + +//// [invalid-duplicate-groupspecifier-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?a)/u; + + +//// [invalid-duplicate-groupspecifier-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?a)(?a)/u; diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-u.symbols b/tests/baselines/reference/invalid-duplicate-groupspecifier-u.symbols new file mode 100644 index 0000000000000..a6abb6227f114 --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-u.symbols @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-u.ts] //// + +=== invalid-duplicate-groupspecifier-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?a)/u; + diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier-u.types b/tests/baselines/reference/invalid-duplicate-groupspecifier-u.types new file mode 100644 index 0000000000000..87a44b6fd3deb --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier-u.types @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-u.ts] //// + +=== invalid-duplicate-groupspecifier-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?a)/u; +>/(?a)(?a)/u : RegExp + diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier.errors.txt b/tests/baselines/reference/invalid-duplicate-groupspecifier.errors.txt new file mode 100644 index 0000000000000..a1807ba2b064e --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier.errors.txt @@ -0,0 +1,31 @@ +invalid-duplicate-groupspecifier.ts(18,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-duplicate-groupspecifier.ts(18,11): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-duplicate-groupspecifier.ts(18,12): error TS1513: Named capturing groups with the same name must be mutually exclusive to each other. + + +==== invalid-duplicate-groupspecifier.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifiers within one alternative must be unique. + info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. + esid: sec-patterns-static-semantics-early-errors + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?a)(?a)/; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~ +!!! error TS1513: Named capturing groups with the same name must be mutually exclusive to each other. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier.js b/tests/baselines/reference/invalid-duplicate-groupspecifier.js new file mode 100644 index 0000000000000..07c2bafc96d9c --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier.js @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier.ts] //// + +//// [invalid-duplicate-groupspecifier.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?a)/; + + +//// [invalid-duplicate-groupspecifier.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?a)(?a)/; diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier.symbols b/tests/baselines/reference/invalid-duplicate-groupspecifier.symbols new file mode 100644 index 0000000000000..4294238293bcc --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier.symbols @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier.ts] //// + +=== invalid-duplicate-groupspecifier.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?a)/; + diff --git a/tests/baselines/reference/invalid-duplicate-groupspecifier.types b/tests/baselines/reference/invalid-duplicate-groupspecifier.types new file mode 100644 index 0000000000000..9f1bdd767a0e8 --- /dev/null +++ b/tests/baselines/reference/invalid-duplicate-groupspecifier.types @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier.ts] //// + +=== invalid-duplicate-groupspecifier.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?a)/; +>/(?a)(?a)/ : RegExp + diff --git a/tests/baselines/reference/invalid-empty-groupspecifier-u.errors.txt b/tests/baselines/reference/invalid-empty-groupspecifier-u.errors.txt new file mode 100644 index 0000000000000..1950bb09b6ac5 --- /dev/null +++ b/tests/baselines/reference/invalid-empty-groupspecifier-u.errors.txt @@ -0,0 +1,27 @@ +invalid-empty-groupspecifier-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-empty-groupspecifier-u.ts(14,5): error TS1512: Expected a capturing group name. +invalid-empty-groupspecifier-u.ts(14,9): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-empty-groupspecifier-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<>a)/u; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-empty-groupspecifier-u.js b/tests/baselines/reference/invalid-empty-groupspecifier-u.js new file mode 100644 index 0000000000000..85063d9e165e6 --- /dev/null +++ b/tests/baselines/reference/invalid-empty-groupspecifier-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier-u.ts] //// + +//// [invalid-empty-groupspecifier-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<>a)/u; + + +//// [invalid-empty-groupspecifier-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<>a)/u; diff --git a/tests/baselines/reference/invalid-empty-groupspecifier-u.symbols b/tests/baselines/reference/invalid-empty-groupspecifier-u.symbols new file mode 100644 index 0000000000000..737e19e4322fa --- /dev/null +++ b/tests/baselines/reference/invalid-empty-groupspecifier-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier-u.ts] //// + +=== invalid-empty-groupspecifier-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<>a)/u; + diff --git a/tests/baselines/reference/invalid-empty-groupspecifier-u.types b/tests/baselines/reference/invalid-empty-groupspecifier-u.types new file mode 100644 index 0000000000000..b5b51a7a9e798 --- /dev/null +++ b/tests/baselines/reference/invalid-empty-groupspecifier-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier-u.ts] //// + +=== invalid-empty-groupspecifier-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<>a)/u; +>/(?<>a)/u : RegExp + diff --git a/tests/baselines/reference/invalid-empty-groupspecifier.errors.txt b/tests/baselines/reference/invalid-empty-groupspecifier.errors.txt new file mode 100644 index 0000000000000..fa8b238480065 --- /dev/null +++ b/tests/baselines/reference/invalid-empty-groupspecifier.errors.txt @@ -0,0 +1,24 @@ +invalid-empty-groupspecifier.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-empty-groupspecifier.ts(14,5): error TS1512: Expected a capturing group name. + + +==== invalid-empty-groupspecifier.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<>a)/; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-empty-groupspecifier.js b/tests/baselines/reference/invalid-empty-groupspecifier.js new file mode 100644 index 0000000000000..9e29cbe631a4b --- /dev/null +++ b/tests/baselines/reference/invalid-empty-groupspecifier.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier.ts] //// + +//// [invalid-empty-groupspecifier.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<>a)/; + + +//// [invalid-empty-groupspecifier.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<>a)/; diff --git a/tests/baselines/reference/invalid-empty-groupspecifier.symbols b/tests/baselines/reference/invalid-empty-groupspecifier.symbols new file mode 100644 index 0000000000000..61fe301b0efad --- /dev/null +++ b/tests/baselines/reference/invalid-empty-groupspecifier.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier.ts] //// + +=== invalid-empty-groupspecifier.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<>a)/; + diff --git a/tests/baselines/reference/invalid-empty-groupspecifier.types b/tests/baselines/reference/invalid-empty-groupspecifier.types new file mode 100644 index 0000000000000..16ee2da753e5c --- /dev/null +++ b/tests/baselines/reference/invalid-empty-groupspecifier.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier.ts] //// + +=== invalid-empty-groupspecifier.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<>a)/; +>/(?<>a)/ : RegExp + diff --git a/tests/baselines/reference/invalid-identity-escape-in-capture-u.errors.txt b/tests/baselines/reference/invalid-identity-escape-in-capture-u.errors.txt new file mode 100644 index 0000000000000..9e77f68fd5658 --- /dev/null +++ b/tests/baselines/reference/invalid-identity-escape-in-capture-u.errors.txt @@ -0,0 +1,27 @@ +invalid-identity-escape-in-capture-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-identity-escape-in-capture-u.ts(14,7): error TS1496: '\a' is not a valid character escape. +invalid-identity-escape-in-capture-u.ts(14,11): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-identity-escape-in-capture-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupName is `< RegExpIdentifierName >`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?\a)/u; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~~ +!!! error TS1496: '\a' is not a valid character escape. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-identity-escape-in-capture-u.js b/tests/baselines/reference/invalid-identity-escape-in-capture-u.js new file mode 100644 index 0000000000000..10edb3d58dce1 --- /dev/null +++ b/tests/baselines/reference/invalid-identity-escape-in-capture-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-identity-escape-in-capture-u.ts] //// + +//// [invalid-identity-escape-in-capture-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?\a)/u; + + +//// [invalid-identity-escape-in-capture-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?\a)/u; diff --git a/tests/baselines/reference/invalid-identity-escape-in-capture-u.symbols b/tests/baselines/reference/invalid-identity-escape-in-capture-u.symbols new file mode 100644 index 0000000000000..5297caec46182 --- /dev/null +++ b/tests/baselines/reference/invalid-identity-escape-in-capture-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-identity-escape-in-capture-u.ts] //// + +=== invalid-identity-escape-in-capture-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?\a)/u; + diff --git a/tests/baselines/reference/invalid-identity-escape-in-capture-u.types b/tests/baselines/reference/invalid-identity-escape-in-capture-u.types new file mode 100644 index 0000000000000..4a70a8e6e471b --- /dev/null +++ b/tests/baselines/reference/invalid-identity-escape-in-capture-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-identity-escape-in-capture-u.ts] //// + +=== invalid-identity-escape-in-capture-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?\a)/u; +>/(?\a)/u : RegExp + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-2-u.errors.txt b/tests/baselines/reference/invalid-incomplete-groupname-2-u.errors.txt new file mode 100644 index 0000000000000..14d9503228848 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-2-u.errors.txt @@ -0,0 +1,27 @@ +invalid-incomplete-groupname-2-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-incomplete-groupname-2-u.ts(14,13): error TS1005: '>' expected. +invalid-incomplete-groupname-2-u.ts(14,14): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-incomplete-groupname-2-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupName is `< RegExpIdentifierName >`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)\k' expected. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname-2-u.js b/tests/baselines/reference/invalid-incomplete-groupname-2-u.js new file mode 100644 index 0000000000000..4fbfefea89392 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-2-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-2-u.ts] //// + +//// [invalid-incomplete-groupname-2-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/(?.)\k' expected. + + +==== invalid-incomplete-groupname-2.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupName is `< RegExpIdentifierName >`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)\k' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname-2.js b/tests/baselines/reference/invalid-incomplete-groupname-2.js new file mode 100644 index 0000000000000..54e926da0adcf --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-2.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-2.ts] //// + +//// [invalid-incomplete-groupname-2.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/(?.)\k`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)\k<>/u; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname-3-u.js b/tests/baselines/reference/invalid-incomplete-groupname-3-u.js new file mode 100644 index 0000000000000..e8d65f23df00a --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-3-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-3-u.ts] //// + +//// [invalid-incomplete-groupname-3-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k<>/u; + + +//// [invalid-incomplete-groupname-3-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)\k<>/u; diff --git a/tests/baselines/reference/invalid-incomplete-groupname-3-u.symbols b/tests/baselines/reference/invalid-incomplete-groupname-3-u.symbols new file mode 100644 index 0000000000000..791f8c7c47f59 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-3-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-3-u.ts] //// + +=== invalid-incomplete-groupname-3-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k<>/u; + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-3-u.types b/tests/baselines/reference/invalid-incomplete-groupname-3-u.types new file mode 100644 index 0000000000000..ac96d0da9262b --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-3-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-3-u.ts] //// + +=== invalid-incomplete-groupname-3-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k<>/u; +>/(?.)\k<>/u : RegExp + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-3.errors.txt b/tests/baselines/reference/invalid-incomplete-groupname-3.errors.txt new file mode 100644 index 0000000000000..38ad49c10ea03 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-3.errors.txt @@ -0,0 +1,24 @@ +invalid-incomplete-groupname-3.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-incomplete-groupname-3.ts(14,12): error TS1512: Expected a capturing group name. + + +==== invalid-incomplete-groupname-3.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupName is `< RegExpIdentifierName >`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)\k<>/; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname-3.js b/tests/baselines/reference/invalid-incomplete-groupname-3.js new file mode 100644 index 0000000000000..ab7d71dd21c4b --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-3.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-3.ts] //// + +//// [invalid-incomplete-groupname-3.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k<>/; + + +//// [invalid-incomplete-groupname-3.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)\k<>/; diff --git a/tests/baselines/reference/invalid-incomplete-groupname-3.symbols b/tests/baselines/reference/invalid-incomplete-groupname-3.symbols new file mode 100644 index 0000000000000..88bd5f2ea459f --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-3.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-3.ts] //// + +=== invalid-incomplete-groupname-3.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k<>/; + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-3.types b/tests/baselines/reference/invalid-incomplete-groupname-3.types new file mode 100644 index 0000000000000..d4978aedb9b42 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-3.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-3.ts] //// + +=== invalid-incomplete-groupname-3.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k<>/; +>/(?.)\k<>/ : RegExp + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-4.errors.txt b/tests/baselines/reference/invalid-incomplete-groupname-4.errors.txt new file mode 100644 index 0000000000000..b942b87f23ada --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-4.errors.txt @@ -0,0 +1,24 @@ +invalid-incomplete-groupname-4.ts(14,6): error TS1005: '>' expected. +invalid-incomplete-groupname-4.ts(14,8): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + + +==== invalid-incomplete-groupname-4.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupName is `< RegExpIdentifierName >`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /\ka)/; + +!!! error TS1005: '>' expected. + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname-4.js b/tests/baselines/reference/invalid-incomplete-groupname-4.js new file mode 100644 index 0000000000000..439bdcc755b68 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-4.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-4.ts] //// + +//// [invalid-incomplete-groupname-4.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\ka)/; + + +//// [invalid-incomplete-groupname-4.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/\ka)/; diff --git a/tests/baselines/reference/invalid-incomplete-groupname-4.symbols b/tests/baselines/reference/invalid-incomplete-groupname-4.symbols new file mode 100644 index 0000000000000..d2b8a40654509 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-4.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-4.ts] //// + +=== invalid-incomplete-groupname-4.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\ka)/; + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-4.types b/tests/baselines/reference/invalid-incomplete-groupname-4.types new file mode 100644 index 0000000000000..253893829e848 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-4.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-4.ts] //// + +=== invalid-incomplete-groupname-4.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\ka)/; +>/\ka)/ : RegExp + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-5.errors.txt b/tests/baselines/reference/invalid-incomplete-groupname-5.errors.txt new file mode 100644 index 0000000000000..8fe4c888ce7d1 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-5.errors.txt @@ -0,0 +1,24 @@ +invalid-incomplete-groupname-5.ts(14,6): error TS1005: '>' expected. +invalid-incomplete-groupname-5.ts(14,8): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + + +==== invalid-incomplete-groupname-5.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupName is `< RegExpIdentifierName >`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /\k.)/; + +!!! error TS1005: '>' expected. + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname-5.js b/tests/baselines/reference/invalid-incomplete-groupname-5.js new file mode 100644 index 0000000000000..d829179b42adf --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-5.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-5.ts] //// + +//// [invalid-incomplete-groupname-5.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k.)/; + + +//// [invalid-incomplete-groupname-5.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/\k.)/; diff --git a/tests/baselines/reference/invalid-incomplete-groupname-5.symbols b/tests/baselines/reference/invalid-incomplete-groupname-5.symbols new file mode 100644 index 0000000000000..d55cb3f2815ae --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-5.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-5.ts] //// + +=== invalid-incomplete-groupname-5.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k.)/; + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-5.types b/tests/baselines/reference/invalid-incomplete-groupname-5.types new file mode 100644 index 0000000000000..1b084604ef268 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-5.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-5.ts] //// + +=== invalid-incomplete-groupname-5.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k.)/; +>/\k.)/ : RegExp + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-6.errors.txt b/tests/baselines/reference/invalid-incomplete-groupname-6.errors.txt new file mode 100644 index 0000000000000..fed1fb02aa799 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-6.errors.txt @@ -0,0 +1,21 @@ +invalid-incomplete-groupname-6.ts(14,6): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + + +==== invalid-incomplete-groupname-6.ts (1 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupName is `< RegExpIdentifierName >`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /\k(?.)/; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname-6.js b/tests/baselines/reference/invalid-incomplete-groupname-6.js new file mode 100644 index 0000000000000..0da2cb2f50246 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-6.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-6.ts] //// + +//// [invalid-incomplete-groupname-6.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?.)/; + + +//// [invalid-incomplete-groupname-6.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/\k(?.)/; diff --git a/tests/baselines/reference/invalid-incomplete-groupname-6.symbols b/tests/baselines/reference/invalid-incomplete-groupname-6.symbols new file mode 100644 index 0000000000000..c7b0b72cfeaf0 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-6.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-6.ts] //// + +=== invalid-incomplete-groupname-6.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?.)/; + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-6.types b/tests/baselines/reference/invalid-incomplete-groupname-6.types new file mode 100644 index 0000000000000..8907178074e13 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-6.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-6.ts] //// + +=== invalid-incomplete-groupname-6.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?.)/; +>/\k(?.)/ : RegExp + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-u.errors.txt b/tests/baselines/reference/invalid-incomplete-groupname-u.errors.txt new file mode 100644 index 0000000000000..feebcd4ac3a45 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-u.errors.txt @@ -0,0 +1,27 @@ +invalid-incomplete-groupname-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-incomplete-groupname-u.ts(14,9): error TS1508: '\k' must be followed by a capturing group name enclosed in angle brackets. +invalid-incomplete-groupname-u.ts(14,12): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-incomplete-groupname-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupName is `< RegExpIdentifierName >`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)\k/u; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + ~~ +!!! error TS1508: '\k' must be followed by a capturing group name enclosed in angle brackets. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname-u.js b/tests/baselines/reference/invalid-incomplete-groupname-u.js new file mode 100644 index 0000000000000..3193f7afde45e --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-u.ts] //// + +//// [invalid-incomplete-groupname-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/u; + + +//// [invalid-incomplete-groupname-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)\k/u; diff --git a/tests/baselines/reference/invalid-incomplete-groupname-u.symbols b/tests/baselines/reference/invalid-incomplete-groupname-u.symbols new file mode 100644 index 0000000000000..d33f93a5572ff --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-u.ts] //// + +=== invalid-incomplete-groupname-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/u; + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-u.types b/tests/baselines/reference/invalid-incomplete-groupname-u.types new file mode 100644 index 0000000000000..0ffdde06693e8 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-u.ts] //// + +=== invalid-incomplete-groupname-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/u; +>/(?.)\k/u : RegExp + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.errors.txt b/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.errors.txt new file mode 100644 index 0000000000000..d3ef1eaef5536 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.errors.txt @@ -0,0 +1,24 @@ +invalid-incomplete-groupname-without-group-2-u.ts(14,5): error TS1512: Expected a capturing group name. +invalid-incomplete-groupname-without-group-2-u.ts(14,7): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-incomplete-groupname-without-group-2-u.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupName is `< RegExpIdentifierName >`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /\k<>/u; + +!!! error TS1512: Expected a capturing group name. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.js b/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.js new file mode 100644 index 0000000000000..64e43d795b341 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-2-u.ts] //// + +//// [invalid-incomplete-groupname-without-group-2-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k<>/u; + + +//// [invalid-incomplete-groupname-without-group-2-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/\k<>/u; diff --git a/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.symbols b/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.symbols new file mode 100644 index 0000000000000..34d28b36641cc --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-2-u.ts] //// + +=== invalid-incomplete-groupname-without-group-2-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k<>/u; + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.types b/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.types new file mode 100644 index 0000000000000..272431f357ef9 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-without-group-2-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-2-u.ts] //// + +=== invalid-incomplete-groupname-without-group-2-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k<>/u; +>/\k<>/u : RegExp + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.errors.txt b/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.errors.txt new file mode 100644 index 0000000000000..058e7c7a7bc7a --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.errors.txt @@ -0,0 +1,24 @@ +invalid-incomplete-groupname-without-group-3-u.ts(14,2): error TS1508: '\k' must be followed by a capturing group name enclosed in angle brackets. +invalid-incomplete-groupname-without-group-3-u.ts(14,5): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-incomplete-groupname-without-group-3-u.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupName is `< RegExpIdentifierName >`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /\k/u; + ~~ +!!! error TS1508: '\k' must be followed by a capturing group name enclosed in angle brackets. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.js b/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.js new file mode 100644 index 0000000000000..a68256987e2d4 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-3-u.ts] //// + +//// [invalid-incomplete-groupname-without-group-3-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k/u; + + +//// [invalid-incomplete-groupname-without-group-3-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/\k/u; diff --git a/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.symbols b/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.symbols new file mode 100644 index 0000000000000..d1c50d2bceb92 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-3-u.ts] //// + +=== invalid-incomplete-groupname-without-group-3-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k/u; + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.types b/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.types new file mode 100644 index 0000000000000..677b7f1a165e5 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-without-group-3-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-3-u.ts] //// + +=== invalid-incomplete-groupname-without-group-3-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k/u; +>/\k/u : RegExp + diff --git a/tests/baselines/reference/invalid-incomplete-groupname-without-group-u.errors.txt b/tests/baselines/reference/invalid-incomplete-groupname-without-group-u.errors.txt new file mode 100644 index 0000000000000..1f1ffa7adda1e --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-without-group-u.errors.txt @@ -0,0 +1,27 @@ +invalid-incomplete-groupname-without-group-u.ts(14,5): error TS1530: There is no capturing group named 'a' in this regular expression. +invalid-incomplete-groupname-without-group-u.ts(14,6): error TS1005: '>' expected. +invalid-incomplete-groupname-without-group-u.ts(14,7): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-incomplete-groupname-without-group-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupName is `< RegExpIdentifierName >`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /\k' expected. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname-without-group-u.js b/tests/baselines/reference/invalid-incomplete-groupname-without-group-u.js new file mode 100644 index 0000000000000..8fa61a2b7f227 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname-without-group-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-u.ts] //// + +//// [invalid-incomplete-groupname-without-group-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k/\k`. + esid: prod-GroupName + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)\k/; + ~~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-incomplete-groupname.js b/tests/baselines/reference/invalid-incomplete-groupname.js new file mode 100644 index 0000000000000..b27ecba91652d --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname.ts] //// + +//// [invalid-incomplete-groupname.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/; + + +//// [invalid-incomplete-groupname.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)\k/; diff --git a/tests/baselines/reference/invalid-incomplete-groupname.symbols b/tests/baselines/reference/invalid-incomplete-groupname.symbols new file mode 100644 index 0000000000000..12b0cab3a7d42 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname.ts] //// + +=== invalid-incomplete-groupname.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/; + diff --git a/tests/baselines/reference/invalid-incomplete-groupname.types b/tests/baselines/reference/invalid-incomplete-groupname.types new file mode 100644 index 0000000000000..d4b1bc33c9632 --- /dev/null +++ b/tests/baselines/reference/invalid-incomplete-groupname.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname.ts] //// + +=== invalid-incomplete-groupname.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/; +>/(?.)\k/ : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.errors.txt b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.errors.txt new file mode 100644 index 0000000000000..09b9944505b9a --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.errors.txt @@ -0,0 +1,30 @@ +invalid-non-id-continue-groupspecifier-4-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-continue-groupspecifier-4-u.ts(14,6): error TS1005: '>' expected. +invalid-non-id-continue-groupspecifier-4-u.ts(14,6): error TS1496: '\>' is not a valid character escape. +invalid-non-id-continue-groupspecifier-4-u.ts(14,11): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-non-id-continue-groupspecifier-4-u.ts (4 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)/u; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + ~~ +!!! error TS1496: '\>' is not a valid character escape. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.js b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.js new file mode 100644 index 0000000000000..b47af04d97860 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4-u.ts] //// + +//// [invalid-non-id-continue-groupspecifier-4-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; + + +//// [invalid-non-id-continue-groupspecifier-4-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)/u; diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.symbols b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.symbols new file mode 100644 index 0000000000000..d25290f42263a --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4-u.ts] //// + +=== invalid-non-id-continue-groupspecifier-4-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; + diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.types b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.types new file mode 100644 index 0000000000000..6ec4f9b489300 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4-u.ts] //// + +=== invalid-non-id-continue-groupspecifier-4-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; +>/(?.)/u : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.errors.txt b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.errors.txt new file mode 100644 index 0000000000000..4b0ac74b2500d --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.errors.txt @@ -0,0 +1,24 @@ +invalid-non-id-continue-groupspecifier-4.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-continue-groupspecifier-4.ts(14,6): error TS1005: '>' expected. + + +==== invalid-non-id-continue-groupspecifier-4.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)/; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.js b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.js new file mode 100644 index 0000000000000..dc03377b7b44c --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4.ts] //// + +//// [invalid-non-id-continue-groupspecifier-4.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + + +//// [invalid-non-id-continue-groupspecifier-4.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)/; diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.symbols b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.symbols new file mode 100644 index 0000000000000..6afb6f1bcb6fe --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4.ts] //// + +=== invalid-non-id-continue-groupspecifier-4.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.types b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.types new file mode 100644 index 0000000000000..50cb75890cb1c --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier-4.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4.ts] //// + +=== invalid-non-id-continue-groupspecifier-4.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; +>/(?.)/ : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier.errors.txt b/tests/baselines/reference/invalid-non-id-continue-groupspecifier.errors.txt new file mode 100644 index 0000000000000..67f34649cb6ca --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier.errors.txt @@ -0,0 +1,24 @@ +invalid-non-id-continue-groupspecifier.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-continue-groupspecifier.ts(14,6): error TS1005: '>' expected. + + +==== invalid-non-id-continue-groupspecifier.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<$❁Ea)/; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier.js b/tests/baselines/reference/invalid-non-id-continue-groupspecifier.js new file mode 100644 index 0000000000000..c2880bb9d1464 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier.ts] //// + +//// [invalid-non-id-continue-groupspecifier.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<$❁Ea)/; + + +//// [invalid-non-id-continue-groupspecifier.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<$❁Ea)/; diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier.symbols b/tests/baselines/reference/invalid-non-id-continue-groupspecifier.symbols new file mode 100644 index 0000000000000..701c8d2aa018c --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier.ts] //// + +=== invalid-non-id-continue-groupspecifier.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<$❁Ea)/; + diff --git a/tests/baselines/reference/invalid-non-id-continue-groupspecifier.types b/tests/baselines/reference/invalid-non-id-continue-groupspecifier.types new file mode 100644 index 0000000000000..1f6a8a4b26cab --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-continue-groupspecifier.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier.ts] //// + +=== invalid-non-id-continue-groupspecifier.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<$❁Ea)/; +>/(?<$❁Ea)/ : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.errors.txt new file mode 100644 index 0000000000000..32e1bf579b9e2 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.errors.txt @@ -0,0 +1,27 @@ +invalid-non-id-start-groupspecifier-2-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-2-u.ts(14,5): error TS1512: Expected a capturing group name. +invalid-non-id-start-groupspecifier-2-u.ts(14,11): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-non-id-start-groupspecifier-2-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<𐒤>a)/u; + ~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.js new file mode 100644 index 0000000000000..1d878f49742a2 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2-u.ts] //// + +//// [invalid-non-id-start-groupspecifier-2-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<𐒤>a)/u; + + +//// [invalid-non-id-start-groupspecifier-2-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<𐒤>a)/u; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.symbols new file mode 100644 index 0000000000000..02d19c0fb7c6e --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2-u.ts] //// + +=== invalid-non-id-start-groupspecifier-2-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<𐒤>a)/u; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.types new file mode 100644 index 0000000000000..8dc77c738e1d6 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2-u.ts] //// + +=== invalid-non-id-start-groupspecifier-2-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<𐒤>a)/u; +>/(?<𐒤>a)/u : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.errors.txt new file mode 100644 index 0000000000000..f5e58301506b8 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.errors.txt @@ -0,0 +1,24 @@ +invalid-non-id-start-groupspecifier-2.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-2.ts(14,5): error TS1512: Expected a capturing group name. + + +==== invalid-non-id-start-groupspecifier-2.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<𐒤>a)/; + ~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.js new file mode 100644 index 0000000000000..c4d5a855cb79a --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2.ts] //// + +//// [invalid-non-id-start-groupspecifier-2.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<𐒤>a)/; + + +//// [invalid-non-id-start-groupspecifier-2.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<𐒤>a)/; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.symbols new file mode 100644 index 0000000000000..1c3046a90fbc3 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2.ts] //// + +=== invalid-non-id-start-groupspecifier-2.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<𐒤>a)/; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.types new file mode 100644 index 0000000000000..a3196c8657728 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-2.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2.ts] //// + +=== invalid-non-id-start-groupspecifier-2.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<𐒤>a)/; +>/(?<𐒤>a)/ : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.errors.txt new file mode 100644 index 0000000000000..da6cbb9e117d7 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.errors.txt @@ -0,0 +1,24 @@ +invalid-non-id-start-groupspecifier-3.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-3.ts(14,6): error TS1005: '>' expected. + + +==== invalid-non-id-start-groupspecifier-3.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)/; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.js new file mode 100644 index 0000000000000..24ec957fc43f6 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-3.ts] //// + +//// [invalid-non-id-start-groupspecifier-3.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + + +//// [invalid-non-id-start-groupspecifier-3.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)/; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.symbols new file mode 100644 index 0000000000000..6a17c878c14f9 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-3.ts] //// + +=== invalid-non-id-start-groupspecifier-3.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.types new file mode 100644 index 0000000000000..68adb6e1091cd --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-3.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-3.ts] //// + +=== invalid-non-id-start-groupspecifier-3.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; +>/(?.)/ : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.errors.txt new file mode 100644 index 0000000000000..7159f7f7330c6 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.errors.txt @@ -0,0 +1,27 @@ +invalid-non-id-start-groupspecifier-4-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-4-u.ts(14,6): error TS1005: '>' expected. +invalid-non-id-start-groupspecifier-4-u.ts(14,16): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-non-id-start-groupspecifier-4-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)/u; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.js new file mode 100644 index 0000000000000..d80b329fd5c2e --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4-u.ts] //// + +//// [invalid-non-id-start-groupspecifier-4-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; + + +//// [invalid-non-id-start-groupspecifier-4-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)/u; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.symbols new file mode 100644 index 0000000000000..28fa359eeb93b --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4-u.ts] //// + +=== invalid-non-id-start-groupspecifier-4-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.types new file mode 100644 index 0000000000000..e701dc77b0b93 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4-u.ts] //// + +=== invalid-non-id-start-groupspecifier-4-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; +>/(?.)/u : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.errors.txt new file mode 100644 index 0000000000000..2813a537e9314 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.errors.txt @@ -0,0 +1,24 @@ +invalid-non-id-start-groupspecifier-4.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-4.ts(14,6): error TS1005: '>' expected. + + +==== invalid-non-id-start-groupspecifier-4.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)/; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.js new file mode 100644 index 0000000000000..961dc6806eaab --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4.ts] //// + +//// [invalid-non-id-start-groupspecifier-4.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + + +//// [invalid-non-id-start-groupspecifier-4.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)/; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.symbols new file mode 100644 index 0000000000000..fe083dbe25983 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4.ts] //// + +=== invalid-non-id-start-groupspecifier-4.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.types new file mode 100644 index 0000000000000..b87b9ec04c9fd --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-4.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4.ts] //// + +=== invalid-non-id-start-groupspecifier-4.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; +>/(?.)/ : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.errors.txt new file mode 100644 index 0000000000000..86abaf2ef2c82 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.errors.txt @@ -0,0 +1,27 @@ +invalid-non-id-start-groupspecifier-5-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-5-u.ts(14,6): error TS1005: '>' expected. +invalid-non-id-start-groupspecifier-5-u.ts(14,16): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-non-id-start-groupspecifier-5-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)/u; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.js new file mode 100644 index 0000000000000..149ef14d3a8f2 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5-u.ts] //// + +//// [invalid-non-id-start-groupspecifier-5-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; + + +//// [invalid-non-id-start-groupspecifier-5-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)/u; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.symbols new file mode 100644 index 0000000000000..19cc3f1b109a9 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5-u.ts] //// + +=== invalid-non-id-start-groupspecifier-5-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.types new file mode 100644 index 0000000000000..30e2561710431 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5-u.ts] //// + +=== invalid-non-id-start-groupspecifier-5-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; +>/(?.)/u : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.errors.txt new file mode 100644 index 0000000000000..7ef38a8f996c4 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.errors.txt @@ -0,0 +1,24 @@ +invalid-non-id-start-groupspecifier-5.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-5.ts(14,6): error TS1005: '>' expected. + + +==== invalid-non-id-start-groupspecifier-5.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)/; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.js new file mode 100644 index 0000000000000..f006a70ea6a52 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5.ts] //// + +//// [invalid-non-id-start-groupspecifier-5.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + + +//// [invalid-non-id-start-groupspecifier-5.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)/; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.symbols new file mode 100644 index 0000000000000..9b57e432c358c --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5.ts] //// + +=== invalid-non-id-start-groupspecifier-5.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.types new file mode 100644 index 0000000000000..5680943dfcf3a --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-5.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5.ts] //// + +=== invalid-non-id-start-groupspecifier-5.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; +>/(?.)/ : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.errors.txt new file mode 100644 index 0000000000000..925c99d8658a1 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.errors.txt @@ -0,0 +1,30 @@ +invalid-non-id-start-groupspecifier-6.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-6.ts(14,6): error TS1005: '>' expected. +invalid-non-id-start-groupspecifier-6.ts(14,8): error TS1125: Hexadecimal digit expected. +invalid-non-id-start-groupspecifier-6.ts(14,10): error TS1005: '}' expected. + + +==== invalid-non-id-start-groupspecifier-6.ts (4 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)/; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1005: '}' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.js new file mode 100644 index 0000000000000..6753d386ef115 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-6.ts] //// + +//// [invalid-non-id-start-groupspecifier-6.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + + +//// [invalid-non-id-start-groupspecifier-6.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)/; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.symbols new file mode 100644 index 0000000000000..982f4adfc55d8 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-6.ts] //// + +=== invalid-non-id-start-groupspecifier-6.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.types new file mode 100644 index 0000000000000..5bee7ce9cb12e --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-6.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-6.ts] //// + +=== invalid-non-id-start-groupspecifier-6.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; +>/(?.)/ : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.errors.txt new file mode 100644 index 0000000000000..d23aa9ba58353 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.errors.txt @@ -0,0 +1,30 @@ +invalid-non-id-start-groupspecifier-7.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-7.ts(14,6): error TS1005: '>' expected. +invalid-non-id-start-groupspecifier-7.ts(14,8): error TS1125: Hexadecimal digit expected. +invalid-non-id-start-groupspecifier-7.ts(14,11): error TS1005: '}' expected. + + +==== invalid-non-id-start-groupspecifier-7.ts (4 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)/; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1005: '}' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.js new file mode 100644 index 0000000000000..400f86b5fe373 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-7.ts] //// + +//// [invalid-non-id-start-groupspecifier-7.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + + +//// [invalid-non-id-start-groupspecifier-7.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)/; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.symbols new file mode 100644 index 0000000000000..60652e9bcaf32 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-7.ts] //// + +=== invalid-non-id-start-groupspecifier-7.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.types new file mode 100644 index 0000000000000..db04bad7657e3 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-7.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-7.ts] //// + +=== invalid-non-id-start-groupspecifier-7.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; +>/(?.)/ : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.errors.txt new file mode 100644 index 0000000000000..489233babce9c --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.errors.txt @@ -0,0 +1,30 @@ +invalid-non-id-start-groupspecifier-8-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-8-u.ts(14,5): error TS1512: Expected a capturing group name. +invalid-non-id-start-groupspecifier-8-u.ts(14,5): error TS1496: '\>' is not a valid character escape. +invalid-non-id-start-groupspecifier-8-u.ts(14,10): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-non-id-start-groupspecifier-8-u.ts (4 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<\>.)/u; + ~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + ~~ +!!! error TS1496: '\>' is not a valid character escape. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.js new file mode 100644 index 0000000000000..332b4b171ec5d --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8-u.ts] //// + +//// [invalid-non-id-start-groupspecifier-8-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<\>.)/u; + + +//// [invalid-non-id-start-groupspecifier-8-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<\>.)/u; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.symbols new file mode 100644 index 0000000000000..f77198cadeb5e --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8-u.ts] //// + +=== invalid-non-id-start-groupspecifier-8-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<\>.)/u; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.types new file mode 100644 index 0000000000000..13d0f8ee67781 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8-u.ts] //// + +=== invalid-non-id-start-groupspecifier-8-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<\>.)/u; +>/(?<\>.)/u : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.errors.txt new file mode 100644 index 0000000000000..1daed90d1aab9 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.errors.txt @@ -0,0 +1,24 @@ +invalid-non-id-start-groupspecifier-8.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-8.ts(14,5): error TS1512: Expected a capturing group name. + + +==== invalid-non-id-start-groupspecifier-8.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<\>.)/; + ~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.js new file mode 100644 index 0000000000000..8f291df608d58 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8.ts] //// + +//// [invalid-non-id-start-groupspecifier-8.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<\>.)/; + + +//// [invalid-non-id-start-groupspecifier-8.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<\>.)/; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.symbols new file mode 100644 index 0000000000000..44b7c9ca8ed0c --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8.ts] //// + +=== invalid-non-id-start-groupspecifier-8.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<\>.)/; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.types new file mode 100644 index 0000000000000..32de7172a7761 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-8.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8.ts] //// + +=== invalid-non-id-start-groupspecifier-8.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<\>.)/; +>/(?<\>.)/ : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.errors.txt new file mode 100644 index 0000000000000..7d5c0e5103255 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.errors.txt @@ -0,0 +1,30 @@ +invalid-non-id-start-groupspecifier-9-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-9-u.ts(14,6): error TS1005: '>' expected. +invalid-non-id-start-groupspecifier-9-u.ts(14,9): error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive. +invalid-non-id-start-groupspecifier-9-u.ts(14,20): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-non-id-start-groupspecifier-9-u.ts (4 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?.)/u; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + ~~~~~~ +!!! error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.js new file mode 100644 index 0000000000000..edb8fb5c18bcb --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-9-u.ts] //// + +//// [invalid-non-id-start-groupspecifier-9-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; + + +//// [invalid-non-id-start-groupspecifier-9-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?.)/u; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.symbols new file mode 100644 index 0000000000000..9fed6042f7fd6 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-9-u.ts] //// + +=== invalid-non-id-start-groupspecifier-9-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.types new file mode 100644 index 0000000000000..640a78b89a0d0 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-9-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-9-u.ts] //// + +=== invalid-non-id-start-groupspecifier-9-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; +>/(?.)/u : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.errors.txt new file mode 100644 index 0000000000000..2fbeece8983d7 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.errors.txt @@ -0,0 +1,27 @@ +invalid-non-id-start-groupspecifier-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier-u.ts(14,5): error TS1512: Expected a capturing group name. +invalid-non-id-start-groupspecifier-u.ts(14,10): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-non-id-start-groupspecifier-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<❤>a)/u; + ~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.js new file mode 100644 index 0000000000000..8329df8a0addb --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-u.ts] //// + +//// [invalid-non-id-start-groupspecifier-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<❤>a)/u; + + +//// [invalid-non-id-start-groupspecifier-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<❤>a)/u; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.symbols new file mode 100644 index 0000000000000..8c779088f5701 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-u.ts] //// + +=== invalid-non-id-start-groupspecifier-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<❤>a)/u; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.types new file mode 100644 index 0000000000000..57d82e2032ac0 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-u.ts] //// + +=== invalid-non-id-start-groupspecifier-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<❤>a)/u; +>/(?<❤>a)/u : RegExp + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier.errors.txt b/tests/baselines/reference/invalid-non-id-start-groupspecifier.errors.txt new file mode 100644 index 0000000000000..eb6009e48eba2 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier.errors.txt @@ -0,0 +1,24 @@ +invalid-non-id-start-groupspecifier.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-non-id-start-groupspecifier.ts(14,5): error TS1512: Expected a capturing group name. + + +==== invalid-non-id-start-groupspecifier.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<❤>a)/; + ~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier.js b/tests/baselines/reference/invalid-non-id-start-groupspecifier.js new file mode 100644 index 0000000000000..a55c2537b12d1 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier.ts] //// + +//// [invalid-non-id-start-groupspecifier.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<❤>a)/; + + +//// [invalid-non-id-start-groupspecifier.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<❤>a)/; diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier.symbols b/tests/baselines/reference/invalid-non-id-start-groupspecifier.symbols new file mode 100644 index 0000000000000..6311847cd83f9 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier.ts] //// + +=== invalid-non-id-start-groupspecifier.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<❤>a)/; + diff --git a/tests/baselines/reference/invalid-non-id-start-groupspecifier.types b/tests/baselines/reference/invalid-non-id-start-groupspecifier.types new file mode 100644 index 0000000000000..ef718cfec5b74 --- /dev/null +++ b/tests/baselines/reference/invalid-non-id-start-groupspecifier.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier.ts] //// + +=== invalid-non-id-start-groupspecifier.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<❤>a)/; +>/(?<❤>a)/ : RegExp + diff --git a/tests/baselines/reference/invalid-numeric-groupspecifier-u.errors.txt b/tests/baselines/reference/invalid-numeric-groupspecifier-u.errors.txt new file mode 100644 index 0000000000000..76696d535acd0 --- /dev/null +++ b/tests/baselines/reference/invalid-numeric-groupspecifier-u.errors.txt @@ -0,0 +1,27 @@ +invalid-numeric-groupspecifier-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-numeric-groupspecifier-u.ts(14,5): error TS1512: Expected a capturing group name. +invalid-numeric-groupspecifier-u.ts(14,12): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-numeric-groupspecifier-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<42a>a)/u; + ~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-numeric-groupspecifier-u.js b/tests/baselines/reference/invalid-numeric-groupspecifier-u.js new file mode 100644 index 0000000000000..33f9d1d5e0b13 --- /dev/null +++ b/tests/baselines/reference/invalid-numeric-groupspecifier-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier-u.ts] //// + +//// [invalid-numeric-groupspecifier-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<42a>a)/u; + + +//// [invalid-numeric-groupspecifier-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<42a>a)/u; diff --git a/tests/baselines/reference/invalid-numeric-groupspecifier-u.symbols b/tests/baselines/reference/invalid-numeric-groupspecifier-u.symbols new file mode 100644 index 0000000000000..5315fc9633a1e --- /dev/null +++ b/tests/baselines/reference/invalid-numeric-groupspecifier-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier-u.ts] //// + +=== invalid-numeric-groupspecifier-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<42a>a)/u; + diff --git a/tests/baselines/reference/invalid-numeric-groupspecifier-u.types b/tests/baselines/reference/invalid-numeric-groupspecifier-u.types new file mode 100644 index 0000000000000..1b8acbba3a5cc --- /dev/null +++ b/tests/baselines/reference/invalid-numeric-groupspecifier-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier-u.ts] //// + +=== invalid-numeric-groupspecifier-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<42a>a)/u; +>/(?<42a>a)/u : RegExp + diff --git a/tests/baselines/reference/invalid-numeric-groupspecifier.errors.txt b/tests/baselines/reference/invalid-numeric-groupspecifier.errors.txt new file mode 100644 index 0000000000000..5c7d8c6707485 --- /dev/null +++ b/tests/baselines/reference/invalid-numeric-groupspecifier.errors.txt @@ -0,0 +1,24 @@ +invalid-numeric-groupspecifier.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-numeric-groupspecifier.ts(14,5): error TS1512: Expected a capturing group name. + + +==== invalid-numeric-groupspecifier.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<42a>a)/; + ~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-numeric-groupspecifier.js b/tests/baselines/reference/invalid-numeric-groupspecifier.js new file mode 100644 index 0000000000000..e6242dd2ade8b --- /dev/null +++ b/tests/baselines/reference/invalid-numeric-groupspecifier.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier.ts] //// + +//// [invalid-numeric-groupspecifier.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<42a>a)/; + + +//// [invalid-numeric-groupspecifier.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<42a>a)/; diff --git a/tests/baselines/reference/invalid-numeric-groupspecifier.symbols b/tests/baselines/reference/invalid-numeric-groupspecifier.symbols new file mode 100644 index 0000000000000..625fcf76e4b55 --- /dev/null +++ b/tests/baselines/reference/invalid-numeric-groupspecifier.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier.ts] //// + +=== invalid-numeric-groupspecifier.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<42a>a)/; + diff --git a/tests/baselines/reference/invalid-numeric-groupspecifier.types b/tests/baselines/reference/invalid-numeric-groupspecifier.types new file mode 100644 index 0000000000000..7268e04543bf9 --- /dev/null +++ b/tests/baselines/reference/invalid-numeric-groupspecifier.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier.ts] //// + +=== invalid-numeric-groupspecifier.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<42a>a)/; +>/(?<42a>a)/ : RegExp + diff --git a/tests/baselines/reference/invalid-optional-lookbehind.errors.txt b/tests/baselines/reference/invalid-optional-lookbehind.errors.txt new file mode 100644 index 0000000000000..86ac6b9bcafcb --- /dev/null +++ b/tests/baselines/reference/invalid-optional-lookbehind.errors.txt @@ -0,0 +1,26 @@ +invalid-optional-lookbehind.ts(19,9): error TS1505: There is nothing available for repetition. + + +==== invalid-optional-lookbehind.ts (1 errors) ==== + // Copyright (C) 2018 Igalia S. L. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-regular-expressions-patterns + description: Lookbehinds are not treated as a QuantifiableAssertion + info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) + negative: + phase: parse + type: SyntaxError + ---*/ + + + /.(?<=.)?/; + ~ +!!! error TS1505: There is nothing available for repetition. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-optional-lookbehind.js b/tests/baselines/reference/invalid-optional-lookbehind.js new file mode 100644 index 0000000000000..200b9a1456195 --- /dev/null +++ b/tests/baselines/reference/invalid-optional-lookbehind.js @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-optional-lookbehind.ts] //// + +//// [invalid-optional-lookbehind.ts] +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.)?/; + + +//// [invalid-optional-lookbehind.js] +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ +/.(?<=.)?/; diff --git a/tests/baselines/reference/invalid-optional-lookbehind.symbols b/tests/baselines/reference/invalid-optional-lookbehind.symbols new file mode 100644 index 0000000000000..ac3f3742e9974 --- /dev/null +++ b/tests/baselines/reference/invalid-optional-lookbehind.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-optional-lookbehind.ts] //// + +=== invalid-optional-lookbehind.ts === + +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.)?/; + diff --git a/tests/baselines/reference/invalid-optional-lookbehind.types b/tests/baselines/reference/invalid-optional-lookbehind.types new file mode 100644 index 0000000000000..2decfb2567568 --- /dev/null +++ b/tests/baselines/reference/invalid-optional-lookbehind.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-optional-lookbehind.ts] //// + +=== invalid-optional-lookbehind.ts === +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.)?/; +>/.(?<=.)?/ : RegExp + diff --git a/tests/baselines/reference/invalid-optional-negative-lookbehind.errors.txt b/tests/baselines/reference/invalid-optional-negative-lookbehind.errors.txt new file mode 100644 index 0000000000000..954b0e3b8f5b4 --- /dev/null +++ b/tests/baselines/reference/invalid-optional-negative-lookbehind.errors.txt @@ -0,0 +1,26 @@ +invalid-optional-negative-lookbehind.ts(19,9): error TS1505: There is nothing available for repetition. + + +==== invalid-optional-negative-lookbehind.ts (1 errors) ==== + // Copyright (C) 2018 Igalia S. L. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-regular-expressions-patterns + description: Lookbehinds are not treated as a QuantifiableAssertion + info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) + negative: + phase: parse + type: SyntaxError + ---*/ + + + /.(?/.(?a)/u; + ~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-punctuator-starting-groupspecifier-u.js b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier-u.js new file mode 100644 index 0000000000000..d86c4cbaf2628 --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier-u.ts] //// + +//// [invalid-punctuator-starting-groupspecifier-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<:a>a)/u; + + +//// [invalid-punctuator-starting-groupspecifier-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<:a>a)/u; diff --git a/tests/baselines/reference/invalid-punctuator-starting-groupspecifier-u.symbols b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier-u.symbols new file mode 100644 index 0000000000000..e6485dcfc0120 --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier-u.ts] //// + +=== invalid-punctuator-starting-groupspecifier-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<:a>a)/u; + diff --git a/tests/baselines/reference/invalid-punctuator-starting-groupspecifier-u.types b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier-u.types new file mode 100644 index 0000000000000..b6428d5f5344b --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier-u.ts] //// + +=== invalid-punctuator-starting-groupspecifier-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<:a>a)/u; +>/(?<:a>a)/u : RegExp + diff --git a/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.errors.txt b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.errors.txt new file mode 100644 index 0000000000000..1c7018ad487f1 --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.errors.txt @@ -0,0 +1,24 @@ +invalid-punctuator-starting-groupspecifier.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-punctuator-starting-groupspecifier.ts(14,5): error TS1512: Expected a capturing group name. + + +==== invalid-punctuator-starting-groupspecifier.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?<:a>a)/; + ~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1512: Expected a capturing group name. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.js b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.js new file mode 100644 index 0000000000000..f0c3aa38e094c --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier.ts] //// + +//// [invalid-punctuator-starting-groupspecifier.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<:a>a)/; + + +//// [invalid-punctuator-starting-groupspecifier.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?<:a>a)/; diff --git a/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.symbols b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.symbols new file mode 100644 index 0000000000000..eb677f444bf55 --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier.ts] //// + +=== invalid-punctuator-starting-groupspecifier.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<:a>a)/; + diff --git a/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.types b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.types new file mode 100644 index 0000000000000..f0f72e421b59a --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-starting-groupspecifier.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier.ts] //// + +=== invalid-punctuator-starting-groupspecifier.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<:a>a)/; +>/(?<:a>a)/ : RegExp + diff --git a/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.errors.txt b/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.errors.txt new file mode 100644 index 0000000000000..e85115983591e --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.errors.txt @@ -0,0 +1,27 @@ +invalid-punctuator-within-groupspecifier-u.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-punctuator-within-groupspecifier-u.ts(14,6): error TS1005: '>' expected. +invalid-punctuator-within-groupspecifier-u.ts(14,11): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-punctuator-within-groupspecifier-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?a)/u; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.js b/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.js new file mode 100644 index 0000000000000..159656ee05725 --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier-u.ts] //// + +//// [invalid-punctuator-within-groupspecifier-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)/u; + + +//// [invalid-punctuator-within-groupspecifier-u.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?a)/u; diff --git a/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.symbols b/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.symbols new file mode 100644 index 0000000000000..4c508b788c196 --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier-u.ts] //// + +=== invalid-punctuator-within-groupspecifier-u.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)/u; + diff --git a/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.types b/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.types new file mode 100644 index 0000000000000..66347e69e3e12 --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-within-groupspecifier-u.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier-u.ts] //// + +=== invalid-punctuator-within-groupspecifier-u.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)/u; +>/(?a)/u : RegExp + diff --git a/tests/baselines/reference/invalid-punctuator-within-groupspecifier.errors.txt b/tests/baselines/reference/invalid-punctuator-within-groupspecifier.errors.txt new file mode 100644 index 0000000000000..5de33fe40556d --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-within-groupspecifier.errors.txt @@ -0,0 +1,24 @@ +invalid-punctuator-within-groupspecifier.ts(14,4): error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. +invalid-punctuator-within-groupspecifier.ts(14,6): error TS1005: '>' expected. + + +==== invalid-punctuator-within-groupspecifier.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?a)/; + ~~ +!!! error TS1501: Named capturing groups are only available when targeting 'ES2018' or later. + +!!! error TS1005: '>' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-punctuator-within-groupspecifier.js b/tests/baselines/reference/invalid-punctuator-within-groupspecifier.js new file mode 100644 index 0000000000000..a57784f178c57 --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-within-groupspecifier.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier.ts] //// + +//// [invalid-punctuator-within-groupspecifier.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)/; + + +//// [invalid-punctuator-within-groupspecifier.js] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ +/(?a)/; diff --git a/tests/baselines/reference/invalid-punctuator-within-groupspecifier.symbols b/tests/baselines/reference/invalid-punctuator-within-groupspecifier.symbols new file mode 100644 index 0000000000000..a75f3f6933d65 --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-within-groupspecifier.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier.ts] //// + +=== invalid-punctuator-within-groupspecifier.ts === + +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)/; + diff --git a/tests/baselines/reference/invalid-punctuator-within-groupspecifier.types b/tests/baselines/reference/invalid-punctuator-within-groupspecifier.types new file mode 100644 index 0000000000000..74aaba8ca7511 --- /dev/null +++ b/tests/baselines/reference/invalid-punctuator-within-groupspecifier.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier.ts] //// + +=== invalid-punctuator-within-groupspecifier.ts === +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)/; +>/(?a)/ : RegExp + diff --git a/tests/baselines/reference/invalid-range-lookbehind.errors.txt b/tests/baselines/reference/invalid-range-lookbehind.errors.txt new file mode 100644 index 0000000000000..98aed08d697db --- /dev/null +++ b/tests/baselines/reference/invalid-range-lookbehind.errors.txt @@ -0,0 +1,26 @@ +invalid-range-lookbehind.ts(19,9): error TS1505: There is nothing available for repetition. + + +==== invalid-range-lookbehind.ts (1 errors) ==== + // Copyright (C) 2018 Igalia S. L. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-regular-expressions-patterns + description: Lookbehinds are not treated as a QuantifiableAssertion + info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) + negative: + phase: parse + type: SyntaxError + ---*/ + + + /.(?<=.){2,3}/; + ~~~~~ +!!! error TS1505: There is nothing available for repetition. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-range-lookbehind.js b/tests/baselines/reference/invalid-range-lookbehind.js new file mode 100644 index 0000000000000..1c316147ee6b2 --- /dev/null +++ b/tests/baselines/reference/invalid-range-lookbehind.js @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-range-lookbehind.ts] //// + +//// [invalid-range-lookbehind.ts] +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.){2,3}/; + + +//// [invalid-range-lookbehind.js] +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ +/.(?<=.){2,3}/; diff --git a/tests/baselines/reference/invalid-range-lookbehind.symbols b/tests/baselines/reference/invalid-range-lookbehind.symbols new file mode 100644 index 0000000000000..819a549caffc9 --- /dev/null +++ b/tests/baselines/reference/invalid-range-lookbehind.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-range-lookbehind.ts] //// + +=== invalid-range-lookbehind.ts === + +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.){2,3}/; + diff --git a/tests/baselines/reference/invalid-range-lookbehind.types b/tests/baselines/reference/invalid-range-lookbehind.types new file mode 100644 index 0000000000000..7d8e4a8b5722b --- /dev/null +++ b/tests/baselines/reference/invalid-range-lookbehind.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/invalid-range-lookbehind.ts] //// + +=== invalid-range-lookbehind.ts === +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.){2,3}/; +>/.(?<=.){2,3}/ : RegExp + diff --git a/tests/baselines/reference/invalid-range-negative-lookbehind.errors.txt b/tests/baselines/reference/invalid-range-negative-lookbehind.errors.txt new file mode 100644 index 0000000000000..9bbcfa46e5268 --- /dev/null +++ b/tests/baselines/reference/invalid-range-negative-lookbehind.errors.txt @@ -0,0 +1,26 @@ +invalid-range-negative-lookbehind.ts(19,9): error TS1505: There is nothing available for repetition. + + +==== invalid-range-negative-lookbehind.ts (1 errors) ==== + // Copyright (C) 2018 Igalia S. L. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-regular-expressions-patterns + description: Lookbehinds are not treated as a QuantifiableAssertion + info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) + negative: + phase: parse + type: SyntaxError + ---*/ + + + /.(?/.(?' expected. +invalid-unterminated-groupspecifier-u.ts(14,9): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== invalid-unterminated-groupspecifier-u.ts (3 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?' expected. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-unterminated-groupspecifier-u.js b/tests/baselines/reference/invalid-unterminated-groupspecifier-u.js new file mode 100644 index 0000000000000..bc61a3293363e --- /dev/null +++ b/tests/baselines/reference/invalid-unterminated-groupspecifier-u.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-unterminated-groupspecifier-u.ts] //// + +//// [invalid-unterminated-groupspecifier-u.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?/(?' expected. + + +==== invalid-unterminated-groupspecifier.ts (2 errors) ==== + // Copyright 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: GroupSpecifier must be identifier-like. + esid: prod-GroupSpecifier + negative: + phase: parse + type: SyntaxError + features: [regexp-named-groups] + ---*/ + + + /(?' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/invalid-unterminated-groupspecifier.js b/tests/baselines/reference/invalid-unterminated-groupspecifier.js new file mode 100644 index 0000000000000..f6c12798d20eb --- /dev/null +++ b/tests/baselines/reference/invalid-unterminated-groupspecifier.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-unterminated-groupspecifier.ts] //// + +//// [invalid-unterminated-groupspecifier.ts] +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?/(? + String Literals extensions disallowed in strict mode; ZeroToThree 1 + info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + + flags: [noStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + function invalid() { "\1"; "use strict"; } + ~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.js new file mode 100644 index 0000000000000..9795c627c5fe1 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.ts] //// + +//// [legacy-non-octal-escape-sequence-1-strict-explicit-pragma.ts] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 1 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\1"; "use strict"; } + + +//// [legacy-non-octal-escape-sequence-1-strict-explicit-pragma.js] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 1 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ +function invalid() { + "\1"; + "use strict"; +} diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.symbols new file mode 100644 index 0000000000000..da2c325a945d1 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-1-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 1 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\1"; "use strict"; } +>invalid : Symbol(invalid, Decl(legacy-non-octal-escape-sequence-1-strict-explicit-pragma.ts, 0, 0)) + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.types new file mode 100644 index 0000000000000..5c86154f93f09 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-1-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 1 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\1"; "use strict"; } +>invalid : () => void +>"\1" : "\u0001" +>"use strict" : "use strict" + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.errors.txt b/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.errors.txt new file mode 100644 index 0000000000000..584c2ec9a1b24 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.errors.txt @@ -0,0 +1,32 @@ +legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts(25,23): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x02'. + + +==== legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts (1 errors) ==== + // Copyright (C) 2020 Rick Waldron Inc. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-string-literals + description: > + String Literals extensions disallowed in strict mode; ZeroToThree 2 + info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + + flags: [noStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + function invalid() { "\2"; "use strict"; } + ~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x02'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.js new file mode 100644 index 0000000000000..73e214899fc36 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts] //// + +//// [legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 2 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\2"; "use strict"; } + + +//// [legacy-non-octal-escape-sequence-2-strict-explicit-pragma.js] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 2 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ +function invalid() { + "\2"; + "use strict"; +} diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.symbols new file mode 100644 index 0000000000000..8e33e79334e3b --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 2 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\2"; "use strict"; } +>invalid : Symbol(invalid, Decl(legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts, 0, 0)) + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.types new file mode 100644 index 0000000000000..3579808ccef9a --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 2 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\2"; "use strict"; } +>invalid : () => void +>"\2" : "\u0002" +>"use strict" : "use strict" + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.errors.txt b/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.errors.txt new file mode 100644 index 0000000000000..b7ea966470c63 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.errors.txt @@ -0,0 +1,32 @@ +legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts(25,23): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. + + +==== legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts (1 errors) ==== + // Copyright (C) 2020 Rick Waldron Inc. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-string-literals + description: > + String Literals extensions disallowed in strict mode; ZeroToThree 3 + info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + + flags: [noStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + function invalid() { "\3"; "use strict"; } + ~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.js new file mode 100644 index 0000000000000..16da48cfdb7c9 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts] //// + +//// [legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 3 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\3"; "use strict"; } + + +//// [legacy-non-octal-escape-sequence-3-strict-explicit-pragma.js] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 3 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ +function invalid() { + "\3"; + "use strict"; +} diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.symbols new file mode 100644 index 0000000000000..05d16dc2b285c --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 3 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\3"; "use strict"; } +>invalid : Symbol(invalid, Decl(legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts, 0, 0)) + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.types new file mode 100644 index 0000000000000..09a467128defa --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 3 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\3"; "use strict"; } +>invalid : () => void +>"\3" : "\u0003" +>"use strict" : "use strict" + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.errors.txt b/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.errors.txt new file mode 100644 index 0000000000000..ffe35284fe440 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.errors.txt @@ -0,0 +1,32 @@ +legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts(25,23): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x04'. + + +==== legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts (1 errors) ==== + // Copyright (C) 2020 Rick Waldron Inc. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-string-literals + description: > + String Literals extensions disallowed in strict mode; FourToSeven 4 + info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + + flags: [noStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + function invalid() { "\4"; "use strict"; } + ~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x04'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.js new file mode 100644 index 0000000000000..59d8c1ef05c76 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts] //// + +//// [legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 4 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\4"; "use strict"; } + + +//// [legacy-non-octal-escape-sequence-4-strict-explicit-pragma.js] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 4 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ +function invalid() { + "\4"; + "use strict"; +} diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.symbols new file mode 100644 index 0000000000000..965ee09f54541 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 4 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\4"; "use strict"; } +>invalid : Symbol(invalid, Decl(legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts, 0, 0)) + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.types new file mode 100644 index 0000000000000..9e48c2b28bf2f --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 4 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\4"; "use strict"; } +>invalid : () => void +>"\4" : "\u0004" +>"use strict" : "use strict" + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.errors.txt b/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.errors.txt new file mode 100644 index 0000000000000..eb85182ea4e26 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.errors.txt @@ -0,0 +1,32 @@ +legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts(25,23): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. + + +==== legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts (1 errors) ==== + // Copyright (C) 2020 Rick Waldron Inc. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-string-literals + description: > + String Literals extensions disallowed in strict mode; FourToSeven 5 + info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + + flags: [noStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + function invalid() { "\5"; "use strict"; } + ~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.js new file mode 100644 index 0000000000000..e2fb06608cd77 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts] //// + +//// [legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 5 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\5"; "use strict"; } + + +//// [legacy-non-octal-escape-sequence-5-strict-explicit-pragma.js] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 5 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ +function invalid() { + "\5"; + "use strict"; +} diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.symbols new file mode 100644 index 0000000000000..f50cb7f8c24f1 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 5 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\5"; "use strict"; } +>invalid : Symbol(invalid, Decl(legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts, 0, 0)) + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.types new file mode 100644 index 0000000000000..655edc6b856c4 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 5 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\5"; "use strict"; } +>invalid : () => void +>"\5" : "\u0005" +>"use strict" : "use strict" + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.errors.txt b/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.errors.txt new file mode 100644 index 0000000000000..69827f0705c10 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.errors.txt @@ -0,0 +1,32 @@ +legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts(25,23): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x06'. + + +==== legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts (1 errors) ==== + // Copyright (C) 2020 Rick Waldron Inc. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-string-literals + description: > + String Literals extensions disallowed in strict mode; FourToSeven 6 + info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + + flags: [noStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + function invalid() { "\6"; "use strict"; } + ~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x06'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.js new file mode 100644 index 0000000000000..d08c1709c5c86 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts] //// + +//// [legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 6 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\6"; "use strict"; } + + +//// [legacy-non-octal-escape-sequence-6-strict-explicit-pragma.js] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 6 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ +function invalid() { + "\6"; + "use strict"; +} diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.symbols new file mode 100644 index 0000000000000..e1fbafb124dd3 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 6 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\6"; "use strict"; } +>invalid : Symbol(invalid, Decl(legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts, 0, 0)) + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.types new file mode 100644 index 0000000000000..f1c19ff470f70 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 6 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\6"; "use strict"; } +>invalid : () => void +>"\6" : "\u0006" +>"use strict" : "use strict" + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.errors.txt b/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.errors.txt new file mode 100644 index 0000000000000..e7dd06c3b02d2 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.errors.txt @@ -0,0 +1,32 @@ +legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts(25,23): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x07'. + + +==== legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts (1 errors) ==== + // Copyright (C) 2020 Rick Waldron Inc. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-string-literals + description: > + String Literals extensions disallowed in strict mode; FourToSeven 7 + info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + + flags: [noStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + function invalid() { "\7"; "use strict"; } + ~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x07'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.js new file mode 100644 index 0000000000000..b470dcd55bba8 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts] //// + +//// [legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 7 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\7"; "use strict"; } + + +//// [legacy-non-octal-escape-sequence-7-strict-explicit-pragma.js] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 7 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ +function invalid() { + "\7"; + "use strict"; +} diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.symbols new file mode 100644 index 0000000000000..661c35c670834 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 7 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\7"; "use strict"; } +>invalid : Symbol(invalid, Decl(legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts, 0, 0)) + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.types new file mode 100644 index 0000000000000..45b08bac565ac --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 7 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\7"; "use strict"; } +>invalid : () => void +>"\7" : "\u0007" +>"use strict" : "use strict" + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.errors.txt b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.errors.txt new file mode 100644 index 0000000000000..1a5fcf3dc56d2 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.errors.txt @@ -0,0 +1,32 @@ +legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts(25,23): error TS1488: Escape sequence '\8' is not allowed. + + +==== legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts (1 errors) ==== + // Copyright (C) 2020 Rick Waldron Inc. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-string-literals + description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 8 + info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + + flags: [noStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + function invalid() { "\8"; "use strict"; } + ~~ +!!! error TS1488: Escape sequence '\8' is not allowed. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.js new file mode 100644 index 0000000000000..a1731f2de640c --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts] //// + +//// [legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 8 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\8"; "use strict"; } + + +//// [legacy-non-octal-escape-sequence-8-strict-explicit-pragma.js] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 8 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ +function invalid() { + "\8"; + "use strict"; +} diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.symbols new file mode 100644 index 0000000000000..b5a360261a02a --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 8 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\8"; "use strict"; } +>invalid : Symbol(invalid, Decl(legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts, 0, 0)) + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.types new file mode 100644 index 0000000000000..6061eb306673e --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 8 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\8"; "use strict"; } +>invalid : () => void +>"\8" : "8" +>"use strict" : "use strict" + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.errors.txt b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.errors.txt new file mode 100644 index 0000000000000..e0ff9da2b7b27 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.errors.txt @@ -0,0 +1,37 @@ +legacy-non-octal-escape-sequence-8-strict.ts(30,2): error TS1488: Escape sequence '\8' is not allowed. + + +==== legacy-non-octal-escape-sequence-8-strict.ts (1 errors) ==== + // Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-string-literals + description: LegacyOctalEscapeSequence is not enabled in strict mode code - 8 + info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. + flags: [onlyStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + '\8'; + ~~ +!!! error TS1488: Escape sequence '\8' is not allowed. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.js new file mode 100644 index 0000000000000..1eec879acd5e5 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.js @@ -0,0 +1,64 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict.ts] //// + +//// [legacy-non-octal-escape-sequence-8-strict.ts] +// Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: LegacyOctalEscapeSequence is not enabled in strict mode code - 8 +info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\8'; + + +//// [legacy-non-octal-escape-sequence-8-strict.js] +// Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: LegacyOctalEscapeSequence is not enabled in strict mode code - 8 +info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ +'\8'; diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.symbols new file mode 100644 index 0000000000000..357c49dd65582 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.symbols @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict.ts] //// + +=== legacy-non-octal-escape-sequence-8-strict.ts === + +// Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: LegacyOctalEscapeSequence is not enabled in strict mode code - 8 +info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\8'; + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.types new file mode 100644 index 0000000000000..65fb2ddd1a827 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-8-strict.types @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict.ts] //// + +=== legacy-non-octal-escape-sequence-8-strict.ts === +// Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: LegacyOctalEscapeSequence is not enabled in strict mode code - 8 +info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\8'; +>'\8' : "8" + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.errors.txt b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.errors.txt new file mode 100644 index 0000000000000..9b27f57af02cc --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.errors.txt @@ -0,0 +1,32 @@ +legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts(25,23): error TS1488: Escape sequence '\9' is not allowed. + + +==== legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts (1 errors) ==== + // Copyright (C) 2020 Rick Waldron Inc. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-string-literals + description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 9 + info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + + flags: [noStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + function invalid() { "\9"; "use strict"; } + ~~ +!!! error TS1488: Escape sequence '\9' is not allowed. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.js new file mode 100644 index 0000000000000..7eacced59ef34 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts] //// + +//// [legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 9 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\9"; "use strict"; } + + +//// [legacy-non-octal-escape-sequence-9-strict-explicit-pragma.js] +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 9 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ +function invalid() { + "\9"; + "use strict"; +} diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.symbols new file mode 100644 index 0000000000000..04013d8ebe194 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 9 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\9"; "use strict"; } +>invalid : Symbol(invalid, Decl(legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts, 0, 0)) + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.types new file mode 100644 index 0000000000000..085827f3a36b2 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts] //// + +=== legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts === +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 9 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\9"; "use strict"; } +>invalid : () => void +>"\9" : "9" +>"use strict" : "use strict" + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.errors.txt b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.errors.txt new file mode 100644 index 0000000000000..4db41a50b78e7 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.errors.txt @@ -0,0 +1,37 @@ +legacy-non-octal-escape-sequence-9-strict.ts(30,2): error TS1488: Escape sequence '\9' is not allowed. + + +==== legacy-non-octal-escape-sequence-9-strict.ts (1 errors) ==== + // Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-string-literals + description: LegacyOctalEscapeSequence is not enabled in strict mode code - 9 + info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. + flags: [onlyStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + '\9'; + ~~ +!!! error TS1488: Escape sequence '\9' is not allowed. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.js new file mode 100644 index 0000000000000..344462e684ac2 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.js @@ -0,0 +1,64 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict.ts] //// + +//// [legacy-non-octal-escape-sequence-9-strict.ts] +// Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: LegacyOctalEscapeSequence is not enabled in strict mode code - 9 +info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\9'; + + +//// [legacy-non-octal-escape-sequence-9-strict.js] +// Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: LegacyOctalEscapeSequence is not enabled in strict mode code - 9 +info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ +'\9'; diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.symbols new file mode 100644 index 0000000000000..b1efd59e3f3fb --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.symbols @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict.ts] //// + +=== legacy-non-octal-escape-sequence-9-strict.ts === + +// Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: LegacyOctalEscapeSequence is not enabled in strict mode code - 9 +info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\9'; + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.types new file mode 100644 index 0000000000000..c22463ea36f7a --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-9-strict.types @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict.ts] //// + +=== legacy-non-octal-escape-sequence-9-strict.ts === +// Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: LegacyOctalEscapeSequence is not enabled in strict mode code - 9 +info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\9'; +>'\9' : "9" + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.errors.txt b/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.errors.txt new file mode 100644 index 0000000000000..35eb4a7e6972f --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.errors.txt @@ -0,0 +1,33 @@ +legacy-non-octal-escape-sequence-strict.ts(26,2): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x00'. + + +==== legacy-non-octal-escape-sequence-strict.ts (1 errors) ==== + // Copyright (C) 2017 Kevin Gibbons. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-template-literal-lexical-components + description: LegacyOctalEscapeSequence is not available in template literals + info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + flags: [onlyStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + '\08'; + ~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x00'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.js b/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.js new file mode 100644 index 0000000000000..fa4cb8dc7542e --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.js @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-strict.ts] //// + +//// [legacy-non-octal-escape-sequence-strict.ts] +// Copyright (C) 2017 Kevin Gibbons. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-template-literal-lexical-components +description: LegacyOctalEscapeSequence is not available in template literals +info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\08'; + + +//// [legacy-non-octal-escape-sequence-strict.js] +// Copyright (C) 2017 Kevin Gibbons. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-template-literal-lexical-components +description: LegacyOctalEscapeSequence is not available in template literals +info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ +'\08'; diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.symbols b/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.symbols new file mode 100644 index 0000000000000..c572a4db1b4e1 --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.symbols @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-strict.ts] //// + +=== legacy-non-octal-escape-sequence-strict.ts === + +// Copyright (C) 2017 Kevin Gibbons. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-template-literal-lexical-components +description: LegacyOctalEscapeSequence is not available in template literals +info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\08'; + diff --git a/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.types b/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.types new file mode 100644 index 0000000000000..e28befd12625d --- /dev/null +++ b/tests/baselines/reference/legacy-non-octal-escape-sequence-strict.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-strict.ts] //// + +=== legacy-non-octal-escape-sequence-strict.ts === +// Copyright (C) 2017 Kevin Gibbons. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-template-literal-lexical-components +description: LegacyOctalEscapeSequence is not available in template literals +info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\08'; +>'\08' : "\x008" + diff --git a/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.errors.txt b/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.errors.txt new file mode 100644 index 0000000000000..9782f8a875a48 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.errors.txt @@ -0,0 +1,25 @@ +legacy-octal-escape-sequence-prologue-strict.ts(16,14): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x2a'. + + +==== legacy-octal-escape-sequence-prologue-strict.ts (1 errors) ==== + // Copyright (c) 2012 Ecma International. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es5id: 7.8.4-1-s + description: > + A directive preceding an 'use strict' directive may not contain + an OctalEscapeSequence + negative: + phase: parse + type: SyntaxError + ---*/ + + + (function() { + "asterisk: \052"; + ~~~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x2a'. + "use strict"; + }); + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.js b/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.js new file mode 100644 index 0000000000000..335c80b05d98d --- /dev/null +++ b/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.js @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-prologue-strict.ts] //// + +//// [legacy-octal-escape-sequence-prologue-strict.ts] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.4-1-s +description: > + A directive preceding an 'use strict' directive may not contain + an OctalEscapeSequence +negative: + phase: parse + type: SyntaxError +---*/ + + +(function() { + "asterisk: \052"; + "use strict"; +}); + + +//// [legacy-octal-escape-sequence-prologue-strict.js] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es5id: 7.8.4-1-s +description: > + A directive preceding an 'use strict' directive may not contain + an OctalEscapeSequence +negative: + phase: parse + type: SyntaxError +---*/ +(function () { + "asterisk: \052"; + "use strict"; +}); diff --git a/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.symbols b/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.symbols new file mode 100644 index 0000000000000..6f720608ff87a --- /dev/null +++ b/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.symbols @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-prologue-strict.ts] //// + +=== legacy-octal-escape-sequence-prologue-strict.ts === + +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.4-1-s +description: > + A directive preceding an 'use strict' directive may not contain + an OctalEscapeSequence +negative: + phase: parse + type: SyntaxError +---*/ + + +(function() { + "asterisk: \052"; + "use strict"; +}); + diff --git a/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.types b/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.types new file mode 100644 index 0000000000000..629a4d096d813 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-escape-sequence-prologue-strict.types @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-prologue-strict.ts] //// + +=== legacy-octal-escape-sequence-prologue-strict.ts === +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.4-1-s +description: > + A directive preceding an 'use strict' directive may not contain + an OctalEscapeSequence +negative: + phase: parse + type: SyntaxError +---*/ + + +(function() { +>(function() { "asterisk: \052"; "use strict";}) : () => void +>function() { "asterisk: \052"; "use strict";} : () => void + + "asterisk: \052"; +>"asterisk: \052" : "asterisk: *" + + "use strict"; +>"use strict" : "use strict" + +}); + diff --git a/tests/baselines/reference/legacy-octal-escape-sequence-strict.errors.txt b/tests/baselines/reference/legacy-octal-escape-sequence-strict.errors.txt new file mode 100644 index 0000000000000..5795339489b12 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-escape-sequence-strict.errors.txt @@ -0,0 +1,33 @@ +legacy-octal-escape-sequence-strict.ts(26,2): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. + + +==== legacy-octal-escape-sequence-strict.ts (1 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-template-literal-lexical-components + description: LegacyOctalEscapeSequence is not available in template literals + info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + flags: [onlyStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + '\1'; + ~~ +!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-escape-sequence-strict.js b/tests/baselines/reference/legacy-octal-escape-sequence-strict.js new file mode 100644 index 0000000000000..700975aa192f9 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-escape-sequence-strict.js @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-strict.ts] //// + +//// [legacy-octal-escape-sequence-strict.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-template-literal-lexical-components +description: LegacyOctalEscapeSequence is not available in template literals +info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\1'; + + +//// [legacy-octal-escape-sequence-strict.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-template-literal-lexical-components +description: LegacyOctalEscapeSequence is not available in template literals +info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ +'\1'; diff --git a/tests/baselines/reference/legacy-octal-escape-sequence-strict.symbols b/tests/baselines/reference/legacy-octal-escape-sequence-strict.symbols new file mode 100644 index 0000000000000..3fe3d9afaabcb --- /dev/null +++ b/tests/baselines/reference/legacy-octal-escape-sequence-strict.symbols @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-strict.ts] //// + +=== legacy-octal-escape-sequence-strict.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-template-literal-lexical-components +description: LegacyOctalEscapeSequence is not available in template literals +info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\1'; + diff --git a/tests/baselines/reference/legacy-octal-escape-sequence-strict.types b/tests/baselines/reference/legacy-octal-escape-sequence-strict.types new file mode 100644 index 0000000000000..171c30c2a8e41 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-escape-sequence-strict.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-strict.ts] //// + +=== legacy-octal-escape-sequence-strict.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-template-literal-lexical-components +description: LegacyOctalEscapeSequence is not available in template literals +info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\1'; +>'\1' : "\u0001" + diff --git a/tests/baselines/reference/legacy-octal-integer-strict.errors.txt b/tests/baselines/reference/legacy-octal-integer-strict.errors.txt new file mode 100644 index 0000000000000..0909099a9e79a --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integer-strict.errors.txt @@ -0,0 +1,39 @@ +legacy-octal-integer-strict.ts(32,1): error TS1121: Octal literals are not allowed. Use the syntax '0o0'. + + +==== legacy-octal-integer-strict.ts (1 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-numeric-literals + description: LegacyOctalIntegerLiteral is not enabled in strict mode code + info: | + NumericLiteral :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + LegacyOctalIntegerLiteral + + LegacyOctalIntegerLiteral :: + 0 OctalDigit + LegacyOctalIntegerLiteral OctalDigit + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. + flags: [onlyStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + 00; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o0'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-integer-strict.js b/tests/baselines/reference/legacy-octal-integer-strict.js new file mode 100644 index 0000000000000..15799dbb803f9 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integer-strict.js @@ -0,0 +1,68 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integer-strict.ts] //// + +//// [legacy-octal-integer-strict.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-numeric-literals +description: LegacyOctalIntegerLiteral is not enabled in strict mode code +info: | + NumericLiteral :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + LegacyOctalIntegerLiteral + + LegacyOctalIntegerLiteral :: + 0 OctalDigit + LegacyOctalIntegerLiteral OctalDigit + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +00; + + +//// [legacy-octal-integer-strict.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-numeric-literals +description: LegacyOctalIntegerLiteral is not enabled in strict mode code +info: | + NumericLiteral :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + LegacyOctalIntegerLiteral + + LegacyOctalIntegerLiteral :: + 0 OctalDigit + LegacyOctalIntegerLiteral OctalDigit + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ +0; diff --git a/tests/baselines/reference/legacy-octal-integer-strict.symbols b/tests/baselines/reference/legacy-octal-integer-strict.symbols new file mode 100644 index 0000000000000..5ff883771c368 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integer-strict.symbols @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integer-strict.ts] //// + +=== legacy-octal-integer-strict.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-numeric-literals +description: LegacyOctalIntegerLiteral is not enabled in strict mode code +info: | + NumericLiteral :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + LegacyOctalIntegerLiteral + + LegacyOctalIntegerLiteral :: + 0 OctalDigit + LegacyOctalIntegerLiteral OctalDigit + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +00; + diff --git a/tests/baselines/reference/legacy-octal-integer-strict.types b/tests/baselines/reference/legacy-octal-integer-strict.types new file mode 100644 index 0000000000000..15804ff071247 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integer-strict.types @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integer-strict.ts] //// + +=== legacy-octal-integer-strict.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-numeric-literals +description: LegacyOctalIntegerLiteral is not enabled in strict mode code +info: | + NumericLiteral :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + LegacyOctalIntegerLiteral + + LegacyOctalIntegerLiteral :: + 0 OctalDigit + LegacyOctalIntegerLiteral OctalDigit + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +00; +>00 : 0 + diff --git a/tests/baselines/reference/legacy-octal-integery-000-strict.errors.txt b/tests/baselines/reference/legacy-octal-integery-000-strict.errors.txt new file mode 100644 index 0000000000000..ab5694e3c7560 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-000-strict.errors.txt @@ -0,0 +1,21 @@ +legacy-octal-integery-000-strict.ts(14,1): error TS1121: Octal literals are not allowed. Use the syntax '0o0'. + + +==== legacy-octal-integery-000-strict.ts (1 errors) ==== + // Copyright (c) 2012 Ecma International. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es5id: 7.8.3-6-s + description: Strict Mode - octal extension (000) is forbidden in strict mode + negative: + phase: parse + type: SyntaxError + flags: [onlyStrict] + ---*/ + + + 000; + ~~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o0'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-integery-000-strict.js b/tests/baselines/reference/legacy-octal-integery-000-strict.js new file mode 100644 index 0000000000000..c686c3c6c1c88 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-000-strict.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-000-strict.ts] //// + +//// [legacy-octal-integery-000-strict.ts] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-6-s +description: Strict Mode - octal extension (000) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +000; + + +//// [legacy-octal-integery-000-strict.js] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es5id: 7.8.3-6-s +description: Strict Mode - octal extension (000) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ +0; diff --git a/tests/baselines/reference/legacy-octal-integery-000-strict.symbols b/tests/baselines/reference/legacy-octal-integery-000-strict.symbols new file mode 100644 index 0000000000000..0c70f5722e60c --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-000-strict.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-000-strict.ts] //// + +=== legacy-octal-integery-000-strict.ts === + +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-6-s +description: Strict Mode - octal extension (000) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +000; + diff --git a/tests/baselines/reference/legacy-octal-integery-000-strict.types b/tests/baselines/reference/legacy-octal-integery-000-strict.types new file mode 100644 index 0000000000000..d836adefd2d2b --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-000-strict.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-000-strict.ts] //// + +=== legacy-octal-integery-000-strict.ts === +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-6-s +description: Strict Mode - octal extension (000) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +000; +>000 : 0 + diff --git a/tests/baselines/reference/legacy-octal-integery-005-strict.errors.txt b/tests/baselines/reference/legacy-octal-integery-005-strict.errors.txt new file mode 100644 index 0000000000000..3c8f9b0605193 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-005-strict.errors.txt @@ -0,0 +1,21 @@ +legacy-octal-integery-005-strict.ts(14,1): error TS1121: Octal literals are not allowed. Use the syntax '0o5'. + + +==== legacy-octal-integery-005-strict.ts (1 errors) ==== + // Copyright (c) 2012 Ecma International. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es5id: 7.8.3-7-s + description: Strict Mode - octal extension (005) is forbidden in strict mode + negative: + phase: parse + type: SyntaxError + flags: [onlyStrict] + ---*/ + + + 005; + ~~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o5'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-integery-005-strict.js b/tests/baselines/reference/legacy-octal-integery-005-strict.js new file mode 100644 index 0000000000000..3d15b0c973fa0 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-005-strict.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-005-strict.ts] //// + +//// [legacy-octal-integery-005-strict.ts] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-7-s +description: Strict Mode - octal extension (005) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +005; + + +//// [legacy-octal-integery-005-strict.js] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es5id: 7.8.3-7-s +description: Strict Mode - octal extension (005) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ +5; diff --git a/tests/baselines/reference/legacy-octal-integery-005-strict.symbols b/tests/baselines/reference/legacy-octal-integery-005-strict.symbols new file mode 100644 index 0000000000000..56e29d0fd8c52 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-005-strict.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-005-strict.ts] //// + +=== legacy-octal-integery-005-strict.ts === + +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-7-s +description: Strict Mode - octal extension (005) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +005; + diff --git a/tests/baselines/reference/legacy-octal-integery-005-strict.types b/tests/baselines/reference/legacy-octal-integery-005-strict.types new file mode 100644 index 0000000000000..d6ed75feeb80b --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-005-strict.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-005-strict.ts] //// + +=== legacy-octal-integery-005-strict.ts === +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-7-s +description: Strict Mode - octal extension (005) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +005; +>005 : 5 + diff --git a/tests/baselines/reference/legacy-octal-integery-01-strict.errors.txt b/tests/baselines/reference/legacy-octal-integery-01-strict.errors.txt new file mode 100644 index 0000000000000..37eef681163a4 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-01-strict.errors.txt @@ -0,0 +1,21 @@ +legacy-octal-integery-01-strict.ts(14,1): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + + +==== legacy-octal-integery-01-strict.ts (1 errors) ==== + // Copyright (c) 2012 Ecma International. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es5id: 7.8.3-3-s + description: Strict Mode - octal extension (01) is forbidden in strict mode + negative: + phase: parse + type: SyntaxError + flags: [onlyStrict] + ---*/ + + + 01; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-integery-01-strict.js b/tests/baselines/reference/legacy-octal-integery-01-strict.js new file mode 100644 index 0000000000000..e20d354da4716 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-01-strict.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-01-strict.ts] //// + +//// [legacy-octal-integery-01-strict.ts] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-3-s +description: Strict Mode - octal extension (01) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +01; + + +//// [legacy-octal-integery-01-strict.js] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es5id: 7.8.3-3-s +description: Strict Mode - octal extension (01) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ +1; diff --git a/tests/baselines/reference/legacy-octal-integery-01-strict.symbols b/tests/baselines/reference/legacy-octal-integery-01-strict.symbols new file mode 100644 index 0000000000000..cbb825aaeeaa3 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-01-strict.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-01-strict.ts] //// + +=== legacy-octal-integery-01-strict.ts === + +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-3-s +description: Strict Mode - octal extension (01) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +01; + diff --git a/tests/baselines/reference/legacy-octal-integery-01-strict.types b/tests/baselines/reference/legacy-octal-integery-01-strict.types new file mode 100644 index 0000000000000..04591651d83c2 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-01-strict.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-01-strict.ts] //// + +=== legacy-octal-integery-01-strict.ts === +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-3-s +description: Strict Mode - octal extension (01) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +01; +>01 : 1 + diff --git a/tests/baselines/reference/legacy-octal-integery-010-strict.errors.txt b/tests/baselines/reference/legacy-octal-integery-010-strict.errors.txt new file mode 100644 index 0000000000000..699acf446c9b8 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-010-strict.errors.txt @@ -0,0 +1,21 @@ +legacy-octal-integery-010-strict.ts(14,1): error TS1121: Octal literals are not allowed. Use the syntax '0o10'. + + +==== legacy-octal-integery-010-strict.ts (1 errors) ==== + // Copyright (c) 2012 Ecma International. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es5id: 7.8.3-1-s + description: Strict Mode - octal extension (010) is forbidden in strict mode + negative: + phase: parse + type: SyntaxError + flags: [onlyStrict] + ---*/ + + + 010; + ~~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o10'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-integery-010-strict.js b/tests/baselines/reference/legacy-octal-integery-010-strict.js new file mode 100644 index 0000000000000..883b2778f6cb4 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-010-strict.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-010-strict.ts] //// + +//// [legacy-octal-integery-010-strict.ts] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-1-s +description: Strict Mode - octal extension (010) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +010; + + +//// [legacy-octal-integery-010-strict.js] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es5id: 7.8.3-1-s +description: Strict Mode - octal extension (010) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ +8; diff --git a/tests/baselines/reference/legacy-octal-integery-010-strict.symbols b/tests/baselines/reference/legacy-octal-integery-010-strict.symbols new file mode 100644 index 0000000000000..e30bd12de7a4d --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-010-strict.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-010-strict.ts] //// + +=== legacy-octal-integery-010-strict.ts === + +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-1-s +description: Strict Mode - octal extension (010) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +010; + diff --git a/tests/baselines/reference/legacy-octal-integery-010-strict.types b/tests/baselines/reference/legacy-octal-integery-010-strict.types new file mode 100644 index 0000000000000..1e397736b2631 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-010-strict.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-010-strict.ts] //// + +=== legacy-octal-integery-010-strict.ts === +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-1-s +description: Strict Mode - octal extension (010) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +010; +>010 : 8 + diff --git a/tests/baselines/reference/legacy-octal-integery-06-strict.errors.txt b/tests/baselines/reference/legacy-octal-integery-06-strict.errors.txt new file mode 100644 index 0000000000000..c928eba2dbc11 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-06-strict.errors.txt @@ -0,0 +1,21 @@ +legacy-octal-integery-06-strict.ts(14,1): error TS1121: Octal literals are not allowed. Use the syntax '0o6'. + + +==== legacy-octal-integery-06-strict.ts (1 errors) ==== + // Copyright (c) 2012 Ecma International. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es5id: 7.8.3-4-s + description: Strict Mode - octal extension (06) is forbidden in strict mode + negative: + phase: parse + type: SyntaxError + flags: [onlyStrict] + ---*/ + + + 06; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o6'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-integery-06-strict.js b/tests/baselines/reference/legacy-octal-integery-06-strict.js new file mode 100644 index 0000000000000..86db06a294d7b --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-06-strict.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-06-strict.ts] //// + +//// [legacy-octal-integery-06-strict.ts] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-4-s +description: Strict Mode - octal extension (06) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +06; + + +//// [legacy-octal-integery-06-strict.js] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es5id: 7.8.3-4-s +description: Strict Mode - octal extension (06) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ +6; diff --git a/tests/baselines/reference/legacy-octal-integery-06-strict.symbols b/tests/baselines/reference/legacy-octal-integery-06-strict.symbols new file mode 100644 index 0000000000000..a495b3d16e3bb --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-06-strict.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-06-strict.ts] //// + +=== legacy-octal-integery-06-strict.ts === + +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-4-s +description: Strict Mode - octal extension (06) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +06; + diff --git a/tests/baselines/reference/legacy-octal-integery-06-strict.types b/tests/baselines/reference/legacy-octal-integery-06-strict.types new file mode 100644 index 0000000000000..d874ebd76e33b --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-06-strict.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-06-strict.ts] //// + +=== legacy-octal-integery-06-strict.ts === +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-4-s +description: Strict Mode - octal extension (06) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +06; +>06 : 6 + diff --git a/tests/baselines/reference/legacy-octal-integery-07-strict.errors.txt b/tests/baselines/reference/legacy-octal-integery-07-strict.errors.txt new file mode 100644 index 0000000000000..9643bd595eca8 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-07-strict.errors.txt @@ -0,0 +1,21 @@ +legacy-octal-integery-07-strict.ts(14,1): error TS1121: Octal literals are not allowed. Use the syntax '0o7'. + + +==== legacy-octal-integery-07-strict.ts (1 errors) ==== + // Copyright (c) 2012 Ecma International. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es5id: 7.8.3-5-s + description: Strict Mode - octal extension (07) is forbidden in strict mode + negative: + phase: parse + type: SyntaxError + flags: [onlyStrict] + ---*/ + + + 07; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o7'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-integery-07-strict.js b/tests/baselines/reference/legacy-octal-integery-07-strict.js new file mode 100644 index 0000000000000..2ee4273795762 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-07-strict.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-07-strict.ts] //// + +//// [legacy-octal-integery-07-strict.ts] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-5-s +description: Strict Mode - octal extension (07) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +07; + + +//// [legacy-octal-integery-07-strict.js] +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es5id: 7.8.3-5-s +description: Strict Mode - octal extension (07) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ +7; diff --git a/tests/baselines/reference/legacy-octal-integery-07-strict.symbols b/tests/baselines/reference/legacy-octal-integery-07-strict.symbols new file mode 100644 index 0000000000000..640e943947d41 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-07-strict.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-07-strict.ts] //// + +=== legacy-octal-integery-07-strict.ts === + +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-5-s +description: Strict Mode - octal extension (07) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +07; + diff --git a/tests/baselines/reference/legacy-octal-integery-07-strict.types b/tests/baselines/reference/legacy-octal-integery-07-strict.types new file mode 100644 index 0000000000000..a7b40d5f829a9 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-integery-07-strict.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-07-strict.ts] //// + +=== legacy-octal-integery-07-strict.ts === +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-5-s +description: Strict Mode - octal extension (07) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +07; +>07 : 7 + diff --git a/tests/baselines/reference/legacy-octal-like-invalid-00n.errors.txt b/tests/baselines/reference/legacy-octal-like-invalid-00n.errors.txt new file mode 100644 index 0000000000000..f1010f53ef0e3 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-00n.errors.txt @@ -0,0 +1,40 @@ +legacy-octal-like-invalid-00n.ts(27,1): error TS1121: Octal literals are not allowed. Use the syntax '0o0'. +legacy-octal-like-invalid-00n.ts(27,3): error TS1005: ';' expected. +legacy-octal-like-invalid-00n.ts(27,3): error TS2304: Cannot find name 'n'. + + +==== legacy-octal-like-invalid-00n.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteral + description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + features: [BigInt] + negative: + phase: parse + type: SyntaxError + ---*/ + + + 00n; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o0'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS2304: Cannot find name 'n'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-like-invalid-00n.js b/tests/baselines/reference/legacy-octal-like-invalid-00n.js new file mode 100644 index 0000000000000..e9b3fdfc03772 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-00n.js @@ -0,0 +1,58 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-00n.ts] //// + +//// [legacy-octal-like-invalid-00n.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +00n; + + +//// [legacy-octal-like-invalid-00n.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ +0; +n; diff --git a/tests/baselines/reference/legacy-octal-like-invalid-00n.symbols b/tests/baselines/reference/legacy-octal-like-invalid-00n.symbols new file mode 100644 index 0000000000000..c8d907c13a19b --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-00n.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-00n.ts] //// + +=== legacy-octal-like-invalid-00n.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +00n; + diff --git a/tests/baselines/reference/legacy-octal-like-invalid-00n.types b/tests/baselines/reference/legacy-octal-like-invalid-00n.types new file mode 100644 index 0000000000000..f155d8b15dd00 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-00n.types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-00n.ts] //// + +=== legacy-octal-like-invalid-00n.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +00n; +>00 : 0 +>n : any + diff --git a/tests/baselines/reference/legacy-octal-like-invalid-01n.errors.txt b/tests/baselines/reference/legacy-octal-like-invalid-01n.errors.txt new file mode 100644 index 0000000000000..1a1d485839ffe --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-01n.errors.txt @@ -0,0 +1,40 @@ +legacy-octal-like-invalid-01n.ts(27,1): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. +legacy-octal-like-invalid-01n.ts(27,3): error TS1005: ';' expected. +legacy-octal-like-invalid-01n.ts(27,3): error TS2304: Cannot find name 'n'. + + +==== legacy-octal-like-invalid-01n.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteral + description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + features: [BigInt] + negative: + phase: parse + type: SyntaxError + ---*/ + + + 01n; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS2304: Cannot find name 'n'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-like-invalid-01n.js b/tests/baselines/reference/legacy-octal-like-invalid-01n.js new file mode 100644 index 0000000000000..fc4fe584a17c0 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-01n.js @@ -0,0 +1,58 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-01n.ts] //// + +//// [legacy-octal-like-invalid-01n.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +01n; + + +//// [legacy-octal-like-invalid-01n.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ +1; +n; diff --git a/tests/baselines/reference/legacy-octal-like-invalid-01n.symbols b/tests/baselines/reference/legacy-octal-like-invalid-01n.symbols new file mode 100644 index 0000000000000..e8539680eb4ee --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-01n.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-01n.ts] //// + +=== legacy-octal-like-invalid-01n.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +01n; + diff --git a/tests/baselines/reference/legacy-octal-like-invalid-01n.types b/tests/baselines/reference/legacy-octal-like-invalid-01n.types new file mode 100644 index 0000000000000..2f98738f00961 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-01n.types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-01n.ts] //// + +=== legacy-octal-like-invalid-01n.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +01n; +>01 : 1 +>n : any + diff --git a/tests/baselines/reference/legacy-octal-like-invalid-07n.errors.txt b/tests/baselines/reference/legacy-octal-like-invalid-07n.errors.txt new file mode 100644 index 0000000000000..f04c9786470fb --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-07n.errors.txt @@ -0,0 +1,40 @@ +legacy-octal-like-invalid-07n.ts(27,1): error TS1121: Octal literals are not allowed. Use the syntax '0o7'. +legacy-octal-like-invalid-07n.ts(27,3): error TS1005: ';' expected. +legacy-octal-like-invalid-07n.ts(27,3): error TS2304: Cannot find name 'n'. + + +==== legacy-octal-like-invalid-07n.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteral + description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + features: [BigInt] + negative: + phase: parse + type: SyntaxError + ---*/ + + + 07n; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o7'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS2304: Cannot find name 'n'. + \ No newline at end of file diff --git a/tests/baselines/reference/legacy-octal-like-invalid-07n.js b/tests/baselines/reference/legacy-octal-like-invalid-07n.js new file mode 100644 index 0000000000000..de8618e0821e9 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-07n.js @@ -0,0 +1,58 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-07n.ts] //// + +//// [legacy-octal-like-invalid-07n.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +07n; + + +//// [legacy-octal-like-invalid-07n.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ +7; +n; diff --git a/tests/baselines/reference/legacy-octal-like-invalid-07n.symbols b/tests/baselines/reference/legacy-octal-like-invalid-07n.symbols new file mode 100644 index 0000000000000..458d992193a1d --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-07n.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-07n.ts] //// + +=== legacy-octal-like-invalid-07n.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +07n; + diff --git a/tests/baselines/reference/legacy-octal-like-invalid-07n.types b/tests/baselines/reference/legacy-octal-like-invalid-07n.types new file mode 100644 index 0000000000000..4e12c7ac40d90 --- /dev/null +++ b/tests/baselines/reference/legacy-octal-like-invalid-07n.types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-07n.ts] //// + +=== legacy-octal-like-invalid-07n.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +07n; +>07 : 7 +>n : any + diff --git a/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.errors.txt b/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.errors.txt new file mode 100644 index 0000000000000..3f49143266b21 --- /dev/null +++ b/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.errors.txt @@ -0,0 +1,33 @@ +mv-is-not-integer-dil-dot-dds.ts(26,1): error TS1353: A bigint literal must be an integer. + + +==== mv-is-not-integer-dil-dot-dds.ts (1 errors) ==== + // Copyright (C) 2017 The V8 Project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: sec-numeric-literal-static-semantics-early-errors + description: > + It is a Syntax Error if the MV is not an integer. (decimalIntegerLiteral dot decimalDigits) + info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits + features: [BigInt] + negative: + phase: parse + type: SyntaxError + ---*/ + + + 2017.8n; + ~~~~~~~ +!!! error TS1353: A bigint literal must be an integer. + \ No newline at end of file diff --git a/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.js b/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.js new file mode 100644 index 0000000000000..9c9a01d90117f --- /dev/null +++ b/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.js @@ -0,0 +1,55 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dil-dot-dds.ts] //// + +//// [mv-is-not-integer-dil-dot-dds.ts] +// Copyright (C) 2017 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-numeric-literal-static-semantics-early-errors +description: > + It is a Syntax Error if the MV is not an integer. (decimalIntegerLiteral dot decimalDigits) +info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +2017.8n; + + +//// [mv-is-not-integer-dil-dot-dds.js] +// Copyright (C) 2017 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-numeric-literal-static-semantics-early-errors +description: > + It is a Syntax Error if the MV is not an integer. (decimalIntegerLiteral dot decimalDigits) +info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ +2017.8n; diff --git a/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.symbols b/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.symbols new file mode 100644 index 0000000000000..1dfd89d5c489b --- /dev/null +++ b/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.symbols @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dil-dot-dds.ts] //// + +=== mv-is-not-integer-dil-dot-dds.ts === + +// Copyright (C) 2017 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-numeric-literal-static-semantics-early-errors +description: > + It is a Syntax Error if the MV is not an integer. (decimalIntegerLiteral dot decimalDigits) +info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +2017.8n; + diff --git a/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.types b/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.types new file mode 100644 index 0000000000000..b557fea41ea24 --- /dev/null +++ b/tests/baselines/reference/mv-is-not-integer-dil-dot-dds.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dil-dot-dds.ts] //// + +=== mv-is-not-integer-dil-dot-dds.ts === +// Copyright (C) 2017 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-numeric-literal-static-semantics-early-errors +description: > + It is a Syntax Error if the MV is not an integer. (decimalIntegerLiteral dot decimalDigits) +info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +2017.8n; +>2017.8n : 2017.8 + diff --git a/tests/baselines/reference/mv-is-not-integer-dot-dds.errors.txt b/tests/baselines/reference/mv-is-not-integer-dot-dds.errors.txt new file mode 100644 index 0000000000000..4f1c572cd5e25 --- /dev/null +++ b/tests/baselines/reference/mv-is-not-integer-dot-dds.errors.txt @@ -0,0 +1,33 @@ +mv-is-not-integer-dot-dds.ts(26,1): error TS1353: A bigint literal must be an integer. + + +==== mv-is-not-integer-dot-dds.ts (1 errors) ==== + // Copyright (C) 2017 The V8 Project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: sec-numeric-literal-static-semantics-early-errors + description: > + It is a Syntax Error if the MV is not an integer. (dot decimalDigits) + info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits + features: [BigInt] + negative: + phase: parse + type: SyntaxError + ---*/ + + + .0000000001n; + ~~~~~~~~~~~~ +!!! error TS1353: A bigint literal must be an integer. + \ No newline at end of file diff --git a/tests/baselines/reference/mv-is-not-integer-dot-dds.js b/tests/baselines/reference/mv-is-not-integer-dot-dds.js new file mode 100644 index 0000000000000..8afa333ef0420 --- /dev/null +++ b/tests/baselines/reference/mv-is-not-integer-dot-dds.js @@ -0,0 +1,55 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dot-dds.ts] //// + +//// [mv-is-not-integer-dot-dds.ts] +// Copyright (C) 2017 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-numeric-literal-static-semantics-early-errors +description: > + It is a Syntax Error if the MV is not an integer. (dot decimalDigits) +info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +.0000000001n; + + +//// [mv-is-not-integer-dot-dds.js] +// Copyright (C) 2017 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-numeric-literal-static-semantics-early-errors +description: > + It is a Syntax Error if the MV is not an integer. (dot decimalDigits) +info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ +.0000000001n; diff --git a/tests/baselines/reference/mv-is-not-integer-dot-dds.symbols b/tests/baselines/reference/mv-is-not-integer-dot-dds.symbols new file mode 100644 index 0000000000000..957c4041a1e3a --- /dev/null +++ b/tests/baselines/reference/mv-is-not-integer-dot-dds.symbols @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dot-dds.ts] //// + +=== mv-is-not-integer-dot-dds.ts === + +// Copyright (C) 2017 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-numeric-literal-static-semantics-early-errors +description: > + It is a Syntax Error if the MV is not an integer. (dot decimalDigits) +info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +.0000000001n; + diff --git a/tests/baselines/reference/mv-is-not-integer-dot-dds.types b/tests/baselines/reference/mv-is-not-integer-dot-dds.types new file mode 100644 index 0000000000000..e5be956fdd19f --- /dev/null +++ b/tests/baselines/reference/mv-is-not-integer-dot-dds.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dot-dds.ts] //// + +=== mv-is-not-integer-dot-dds.ts === +// Copyright (C) 2017 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-numeric-literal-static-semantics-early-errors +description: > + It is a Syntax Error if the MV is not an integer. (dot decimalDigits) +info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +.0000000001n; +>.0000000001n : 1e-10 + diff --git a/tests/baselines/reference/non-octal-decimal-integer-strict.errors.txt b/tests/baselines/reference/non-octal-decimal-integer-strict.errors.txt new file mode 100644 index 0000000000000..a4c6cb14dd22d --- /dev/null +++ b/tests/baselines/reference/non-octal-decimal-integer-strict.errors.txt @@ -0,0 +1,45 @@ +non-octal-decimal-integer-strict.ts(38,1): error TS1489: Decimals with leading zeros are not allowed. + + +==== non-octal-decimal-integer-strict.ts (1 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-literals-numeric-literals + description: NonOctalDecimalIntegerLiteral is not enabled in strict mode code + info: | + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigits[opt] + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit :: one of + 8 9 + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. + flags: [onlyStrict] + negative: + phase: parse + type: SyntaxError + ---*/ + + + 08; + ~~ +!!! error TS1489: Decimals with leading zeros are not allowed. + \ No newline at end of file diff --git a/tests/baselines/reference/non-octal-decimal-integer-strict.js b/tests/baselines/reference/non-octal-decimal-integer-strict.js new file mode 100644 index 0000000000000..b77c3a950c0c1 --- /dev/null +++ b/tests/baselines/reference/non-octal-decimal-integer-strict.js @@ -0,0 +1,80 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/non-octal-decimal-integer-strict.ts] //// + +//// [non-octal-decimal-integer-strict.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-numeric-literals +description: NonOctalDecimalIntegerLiteral is not enabled in strict mode code +info: | + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigits[opt] + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit :: one of + 8 9 + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +08; + + +//// [non-octal-decimal-integer-strict.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-numeric-literals +description: NonOctalDecimalIntegerLiteral is not enabled in strict mode code +info: | + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigits[opt] + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit :: one of + 8 9 + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ +8; diff --git a/tests/baselines/reference/non-octal-decimal-integer-strict.symbols b/tests/baselines/reference/non-octal-decimal-integer-strict.symbols new file mode 100644 index 0000000000000..83ce7b4ff1ab0 --- /dev/null +++ b/tests/baselines/reference/non-octal-decimal-integer-strict.symbols @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/non-octal-decimal-integer-strict.ts] //// + +=== non-octal-decimal-integer-strict.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-numeric-literals +description: NonOctalDecimalIntegerLiteral is not enabled in strict mode code +info: | + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigits[opt] + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit :: one of + 8 9 + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +08; + diff --git a/tests/baselines/reference/non-octal-decimal-integer-strict.types b/tests/baselines/reference/non-octal-decimal-integer-strict.types new file mode 100644 index 0000000000000..080b7d52b41db --- /dev/null +++ b/tests/baselines/reference/non-octal-decimal-integer-strict.types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/non-octal-decimal-integer-strict.ts] //// + +=== non-octal-decimal-integer-strict.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-numeric-literals +description: NonOctalDecimalIntegerLiteral is not enabled in strict mode code +info: | + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigits[opt] + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit :: one of + 8 9 + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +08; +>08 : 8 + diff --git a/tests/baselines/reference/non-octal-like-invalid-0008n.errors.txt b/tests/baselines/reference/non-octal-like-invalid-0008n.errors.txt new file mode 100644 index 0000000000000..4f05e333a8b19 --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-0008n.errors.txt @@ -0,0 +1,40 @@ +non-octal-like-invalid-0008n.ts(27,1): error TS1489: Decimals with leading zeros are not allowed. +non-octal-like-invalid-0008n.ts(27,5): error TS1005: ';' expected. +non-octal-like-invalid-0008n.ts(27,5): error TS2304: Cannot find name 'n'. + + +==== non-octal-like-invalid-0008n.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteral + description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix + features: [BigInt] + negative: + phase: parse + type: SyntaxError + ---*/ + + + 0008n; + ~~~~ +!!! error TS1489: Decimals with leading zeros are not allowed. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS2304: Cannot find name 'n'. + \ No newline at end of file diff --git a/tests/baselines/reference/non-octal-like-invalid-0008n.js b/tests/baselines/reference/non-octal-like-invalid-0008n.js new file mode 100644 index 0000000000000..6ce6b657d7d0b --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-0008n.js @@ -0,0 +1,58 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-0008n.ts] //// + +//// [non-octal-like-invalid-0008n.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +0008n; + + +//// [non-octal-like-invalid-0008n.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ +8; +n; diff --git a/tests/baselines/reference/non-octal-like-invalid-0008n.symbols b/tests/baselines/reference/non-octal-like-invalid-0008n.symbols new file mode 100644 index 0000000000000..08a250ed48bbe --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-0008n.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-0008n.ts] //// + +=== non-octal-like-invalid-0008n.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +0008n; + diff --git a/tests/baselines/reference/non-octal-like-invalid-0008n.types b/tests/baselines/reference/non-octal-like-invalid-0008n.types new file mode 100644 index 0000000000000..cb81dc393d6e8 --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-0008n.types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-0008n.ts] //// + +=== non-octal-like-invalid-0008n.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +0008n; +>0008 : 8 +>n : any + diff --git a/tests/baselines/reference/non-octal-like-invalid-012348n.errors.txt b/tests/baselines/reference/non-octal-like-invalid-012348n.errors.txt new file mode 100644 index 0000000000000..dccdc431695b3 --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-012348n.errors.txt @@ -0,0 +1,40 @@ +non-octal-like-invalid-012348n.ts(27,1): error TS1489: Decimals with leading zeros are not allowed. +non-octal-like-invalid-012348n.ts(27,7): error TS1005: ';' expected. +non-octal-like-invalid-012348n.ts(27,7): error TS2304: Cannot find name 'n'. + + +==== non-octal-like-invalid-012348n.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteral + description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix + features: [BigInt] + negative: + phase: parse + type: SyntaxError + ---*/ + + + 012348n; + ~~~~~~ +!!! error TS1489: Decimals with leading zeros are not allowed. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS2304: Cannot find name 'n'. + \ No newline at end of file diff --git a/tests/baselines/reference/non-octal-like-invalid-012348n.js b/tests/baselines/reference/non-octal-like-invalid-012348n.js new file mode 100644 index 0000000000000..0dd5c1436b27c --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-012348n.js @@ -0,0 +1,58 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-012348n.ts] //// + +//// [non-octal-like-invalid-012348n.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +012348n; + + +//// [non-octal-like-invalid-012348n.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ +12348; +n; diff --git a/tests/baselines/reference/non-octal-like-invalid-012348n.symbols b/tests/baselines/reference/non-octal-like-invalid-012348n.symbols new file mode 100644 index 0000000000000..038f5857b29dc --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-012348n.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-012348n.ts] //// + +=== non-octal-like-invalid-012348n.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +012348n; + diff --git a/tests/baselines/reference/non-octal-like-invalid-012348n.types b/tests/baselines/reference/non-octal-like-invalid-012348n.types new file mode 100644 index 0000000000000..b127d720dcf33 --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-012348n.types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-012348n.ts] //// + +=== non-octal-like-invalid-012348n.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +012348n; +>012348 : 12348 +>n : any + diff --git a/tests/baselines/reference/non-octal-like-invalid-08n.errors.txt b/tests/baselines/reference/non-octal-like-invalid-08n.errors.txt new file mode 100644 index 0000000000000..d73d95f39fc72 --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-08n.errors.txt @@ -0,0 +1,40 @@ +non-octal-like-invalid-08n.ts(27,1): error TS1489: Decimals with leading zeros are not allowed. +non-octal-like-invalid-08n.ts(27,3): error TS1005: ';' expected. +non-octal-like-invalid-08n.ts(27,3): error TS2304: Cannot find name 'n'. + + +==== non-octal-like-invalid-08n.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteral + description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix + features: [BigInt] + negative: + phase: parse + type: SyntaxError + ---*/ + + + 08n; + ~~ +!!! error TS1489: Decimals with leading zeros are not allowed. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS2304: Cannot find name 'n'. + \ No newline at end of file diff --git a/tests/baselines/reference/non-octal-like-invalid-08n.js b/tests/baselines/reference/non-octal-like-invalid-08n.js new file mode 100644 index 0000000000000..d00371ccee8db --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-08n.js @@ -0,0 +1,58 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-08n.ts] //// + +//// [non-octal-like-invalid-08n.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +08n; + + +//// [non-octal-like-invalid-08n.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ +8; +n; diff --git a/tests/baselines/reference/non-octal-like-invalid-08n.symbols b/tests/baselines/reference/non-octal-like-invalid-08n.symbols new file mode 100644 index 0000000000000..56da42b81206e --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-08n.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-08n.ts] //// + +=== non-octal-like-invalid-08n.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +08n; + diff --git a/tests/baselines/reference/non-octal-like-invalid-08n.types b/tests/baselines/reference/non-octal-like-invalid-08n.types new file mode 100644 index 0000000000000..80bc6e42394e6 --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-08n.types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-08n.ts] //// + +=== non-octal-like-invalid-08n.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +08n; +>08 : 8 +>n : any + diff --git a/tests/baselines/reference/non-octal-like-invalid-09n.errors.txt b/tests/baselines/reference/non-octal-like-invalid-09n.errors.txt new file mode 100644 index 0000000000000..a8c4d5ac3a4bf --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-09n.errors.txt @@ -0,0 +1,40 @@ +non-octal-like-invalid-09n.ts(27,1): error TS1489: Decimals with leading zeros are not allowed. +non-octal-like-invalid-09n.ts(27,3): error TS1005: ';' expected. +non-octal-like-invalid-09n.ts(27,3): error TS2304: Cannot find name 'n'. + + +==== non-octal-like-invalid-09n.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteral + description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral + info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix + features: [BigInt] + negative: + phase: parse + type: SyntaxError + ---*/ + + + 09n; + ~~ +!!! error TS1489: Decimals with leading zeros are not allowed. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS2304: Cannot find name 'n'. + \ No newline at end of file diff --git a/tests/baselines/reference/non-octal-like-invalid-09n.js b/tests/baselines/reference/non-octal-like-invalid-09n.js new file mode 100644 index 0000000000000..8844e06c91bae --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-09n.js @@ -0,0 +1,58 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-09n.ts] //// + +//// [non-octal-like-invalid-09n.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +09n; + + +//// [non-octal-like-invalid-09n.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ +9; +n; diff --git a/tests/baselines/reference/non-octal-like-invalid-09n.symbols b/tests/baselines/reference/non-octal-like-invalid-09n.symbols new file mode 100644 index 0000000000000..ca89823445e72 --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-09n.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-09n.ts] //// + +=== non-octal-like-invalid-09n.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +09n; + diff --git a/tests/baselines/reference/non-octal-like-invalid-09n.types b/tests/baselines/reference/non-octal-like-invalid-09n.types new file mode 100644 index 0000000000000..d99bc0cfffb17 --- /dev/null +++ b/tests/baselines/reference/non-octal-like-invalid-09n.types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-09n.ts] //// + +=== non-octal-like-invalid-09n.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +09n; +>09 : 9 +>n : any + diff --git a/tests/baselines/reference/numeric-followed-by-ident.errors.txt b/tests/baselines/reference/numeric-followed-by-ident.errors.txt new file mode 100644 index 0000000000000..bacb66ef8d7ce --- /dev/null +++ b/tests/baselines/reference/numeric-followed-by-ident.errors.txt @@ -0,0 +1,24 @@ +numeric-followed-by-ident.ts(17,2): error TS1351: An identifier or keyword cannot immediately follow a numeric literal. + + +==== numeric-followed-by-ident.ts (1 errors) ==== + // Copyright (C) 2018 Mozilla. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: sec-literals-numeric-literals + description: > + NumericLiteral followed by IdentifierStart + info: | + The source character immediately following a NumericLiteral must not be an IdentifierStart or DecimalDigit. + + negative: + phase: parse + type: SyntaxError + ---*/ + + + 3in [] + ~~ +!!! error TS1351: An identifier or keyword cannot immediately follow a numeric literal. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-followed-by-ident.js b/tests/baselines/reference/numeric-followed-by-ident.js new file mode 100644 index 0000000000000..fc80a697f5980 --- /dev/null +++ b/tests/baselines/reference/numeric-followed-by-ident.js @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-followed-by-ident.ts] //// + +//// [numeric-followed-by-ident.ts] +// Copyright (C) 2018 Mozilla. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-numeric-literals +description: > + NumericLiteral followed by IdentifierStart +info: | + The source character immediately following a NumericLiteral must not be an IdentifierStart or DecimalDigit. + +negative: + phase: parse + type: SyntaxError +---*/ + + +3in [] + + +//// [numeric-followed-by-ident.js] +// Copyright (C) 2018 Mozilla. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-numeric-literals +description: > + NumericLiteral followed by IdentifierStart +info: | + The source character immediately following a NumericLiteral must not be an IdentifierStart or DecimalDigit. + +negative: + phase: parse + type: SyntaxError +---*/ +3 in []; diff --git a/tests/baselines/reference/numeric-followed-by-ident.symbols b/tests/baselines/reference/numeric-followed-by-ident.symbols new file mode 100644 index 0000000000000..9ba66bb38d4ab --- /dev/null +++ b/tests/baselines/reference/numeric-followed-by-ident.symbols @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-followed-by-ident.ts] //// + +=== numeric-followed-by-ident.ts === + +// Copyright (C) 2018 Mozilla. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-numeric-literals +description: > + NumericLiteral followed by IdentifierStart +info: | + The source character immediately following a NumericLiteral must not be an IdentifierStart or DecimalDigit. + +negative: + phase: parse + type: SyntaxError +---*/ + + +3in [] + diff --git a/tests/baselines/reference/numeric-followed-by-ident.types b/tests/baselines/reference/numeric-followed-by-ident.types new file mode 100644 index 0000000000000..ec9cdf693b859 --- /dev/null +++ b/tests/baselines/reference/numeric-followed-by-ident.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-followed-by-ident.ts] //// + +=== numeric-followed-by-ident.ts === +// Copyright (C) 2018 Mozilla. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-numeric-literals +description: > + NumericLiteral followed by IdentifierStart +info: | + The source character immediately following a NumericLiteral must not be an IdentifierStart or DecimalDigit. + +negative: + phase: parse + type: SyntaxError +---*/ + + +3in [] +>3in [] : boolean +>3 : 3 +>[] : undefined[] + diff --git a/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.errors.txt new file mode 100644 index 0000000000000..792d122317839 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.errors.txt @@ -0,0 +1,40 @@ +numeric-separator-literal-bil-bd-nsl-bd-err.ts(33,3): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-bil-bd-nsl-bd-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 0b_1 + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.js b/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.js new file mode 100644 index 0000000000000..067317cc7cce1 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.js @@ -0,0 +1,69 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-bd-nsl-bd-err.ts] //// + +//// [numeric-separator-literal-bil-bd-nsl-bd-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b_1 + + +//// [numeric-separator-literal-bil-bd-nsl-bd-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +1; diff --git a/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.symbols b/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.symbols new file mode 100644 index 0000000000000..9c15529555f62 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-bd-nsl-bd-err.ts] //// + +=== numeric-separator-literal-bil-bd-nsl-bd-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b_1 + diff --git a/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.types b/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.types new file mode 100644 index 0000000000000..4689bc80caeda --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-bd-nsl-bd-err.types @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-bd-nsl-bd-err.ts] //// + +=== numeric-separator-literal-bil-bd-nsl-bd-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b_1 +>0b_1 : 1 + diff --git a/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.errors.txt new file mode 100644 index 0000000000000..98f2368258c9f --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.errors.txt @@ -0,0 +1,40 @@ +numeric-separator-literal-bil-nsl-bd-dunder-err.ts(33,5): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== numeric-separator-literal-bil-nsl-bd-dunder-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 0b0__0 + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.js b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.js new file mode 100644 index 0000000000000..6e74210b095a0 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.js @@ -0,0 +1,69 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-dunder-err.ts] //// + +//// [numeric-separator-literal-bil-nsl-bd-dunder-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b0__0 + + +//// [numeric-separator-literal-bil-nsl-bd-dunder-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +0; diff --git a/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.symbols b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.symbols new file mode 100644 index 0000000000000..a6eddc56fca3c --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-dunder-err.ts] //// + +=== numeric-separator-literal-bil-nsl-bd-dunder-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b0__0 + diff --git a/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.types b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.types new file mode 100644 index 0000000000000..be722c980a083 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-dunder-err.types @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-dunder-err.ts] //// + +=== numeric-separator-literal-bil-nsl-bd-dunder-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b0__0 +>0b0__0 : 0 + diff --git a/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.errors.txt new file mode 100644 index 0000000000000..0ece4da31c53d --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.errors.txt @@ -0,0 +1,40 @@ +numeric-separator-literal-bil-nsl-bd-err.ts(33,4): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-bil-nsl-bd-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 0b0_ + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.js b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.js new file mode 100644 index 0000000000000..73e93a1f079f2 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.js @@ -0,0 +1,69 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-err.ts] //// + +//// [numeric-separator-literal-bil-nsl-bd-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b0_ + + +//// [numeric-separator-literal-bil-nsl-bd-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +0; diff --git a/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.symbols b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.symbols new file mode 100644 index 0000000000000..f786f513c9224 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-err.ts] //// + +=== numeric-separator-literal-bil-nsl-bd-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b0_ + diff --git a/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.types b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.types new file mode 100644 index 0000000000000..b59b8324132b3 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-bil-nsl-bd-err.types @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-err.ts] //// + +=== numeric-separator-literal-bil-nsl-bd-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b0_ +>0b0_ : 0 + diff --git a/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.errors.txt new file mode 100644 index 0000000000000..fc987eeb93c7f --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.errors.txt @@ -0,0 +1,32 @@ +numeric-separator-literal-dd-nsl-dds-dunder-err.ts(25,3): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== numeric-separator-literal-dd-nsl-dds-dunder-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 1__0123456789 + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.js b/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.js new file mode 100644 index 0000000000000..6b4c09a098068 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.js @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-dds-dunder-err.ts] //// + +//// [numeric-separator-literal-dd-nsl-dds-dunder-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1__0123456789 + + +//// [numeric-separator-literal-dd-nsl-dds-dunder-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +10123456789; diff --git a/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.symbols b/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.symbols new file mode 100644 index 0000000000000..a984f32d8e8f6 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-dds-dunder-err.ts] //// + +=== numeric-separator-literal-dd-nsl-dds-dunder-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1__0123456789 + diff --git a/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.types b/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.types new file mode 100644 index 0000000000000..1b22a3c7ce066 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dd-nsl-dds-dunder-err.types @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-dds-dunder-err.ts] //// + +=== numeric-separator-literal-dd-nsl-dds-dunder-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1__0123456789 +>1__0123456789 : 10123456789 + diff --git a/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.errors.txt new file mode 100644 index 0000000000000..eeeb977660332 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.errors.txt @@ -0,0 +1,34 @@ +numeric-separator-literal-dd-nsl-err.ts(27,2): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-dd-nsl-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character + info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 1_ + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.js b/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.js new file mode 100644 index 0000000000000..9a1419909dfe3 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-err.ts] //// + +//// [numeric-separator-literal-dd-nsl-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1_ + + +//// [numeric-separator-literal-dd-nsl-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +1; diff --git a/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.symbols b/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.symbols new file mode 100644 index 0000000000000..9c800767120f0 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-err.ts] //// + +=== numeric-separator-literal-dd-nsl-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1_ + diff --git a/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.types b/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.types new file mode 100644 index 0000000000000..82d9377ef01ee --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dd-nsl-err.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-err.ts] //// + +=== numeric-separator-literal-dd-nsl-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1_ +>1_ : 1 + diff --git a/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.errors.txt new file mode 100644 index 0000000000000..b164a50864e6c --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.errors.txt @@ -0,0 +1,32 @@ +numeric-separator-literal-dds-nsl-dds-dunder-err.ts(25,4): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== numeric-separator-literal-dds-nsl-dds-dunder-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 10__0123456789 + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.js b/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.js new file mode 100644 index 0000000000000..6d517396745cf --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.js @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-dds-dunder-err.ts] //// + +//// [numeric-separator-literal-dds-nsl-dds-dunder-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10__0123456789 + + +//// [numeric-separator-literal-dds-nsl-dds-dunder-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +100123456789; diff --git a/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.symbols b/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.symbols new file mode 100644 index 0000000000000..97ec7cdf18044 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-dds-dunder-err.ts] //// + +=== numeric-separator-literal-dds-nsl-dds-dunder-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10__0123456789 + diff --git a/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.types b/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.types new file mode 100644 index 0000000000000..02b68dd07b05f --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dds-nsl-dds-dunder-err.types @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-dds-dunder-err.ts] //// + +=== numeric-separator-literal-dds-nsl-dds-dunder-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10__0123456789 +>10__0123456789 : 100123456789 + diff --git a/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.errors.txt new file mode 100644 index 0000000000000..ed3b6b0708cfb --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.errors.txt @@ -0,0 +1,35 @@ +numeric-separator-literal-dds-nsl-err.ts(28,3): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-dds-nsl-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral + info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 10_ + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.js b/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.js new file mode 100644 index 0000000000000..3339094ed9fd1 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.js @@ -0,0 +1,59 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-err.ts] //// + +//// [numeric-separator-literal-dds-nsl-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10_ + + +//// [numeric-separator-literal-dds-nsl-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +10; diff --git a/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.symbols b/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.symbols new file mode 100644 index 0000000000000..f8e2df09ef721 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.symbols @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-err.ts] //// + +=== numeric-separator-literal-dds-nsl-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10_ + diff --git a/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.types b/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.types new file mode 100644 index 0000000000000..08e4aa09f1957 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dds-nsl-err.types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-err.ts] //// + +=== numeric-separator-literal-dds-nsl-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10_ +>10_ : 10 + diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.errors.txt new file mode 100644 index 0000000000000..e087ba8df1ebf --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.errors.txt @@ -0,0 +1,34 @@ +numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.ts(27,5): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to ExponentPart + info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 10.0_e1 + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.js b/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.js new file mode 100644 index 0000000000000..3989962a2d455 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.ts] //// + +//// [numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10.0_e1 + + +//// [numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +100; diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.symbols b/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.symbols new file mode 100644 index 0000000000000..c914235bf8fd6 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.ts] //// + +=== numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10.0_e1 + diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.types b/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.types new file mode 100644 index 0000000000000..e14f74919a175 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.ts] //// + +=== numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10.0_e1 +>10.0_e1 : 100 + diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.errors.txt new file mode 100644 index 0000000000000..28016ccce1d74 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.errors.txt @@ -0,0 +1,34 @@ +numeric-separator-literal-dil-dot-nsl-dd-err.ts(27,4): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-dil-dot-nsl-dd-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be adjacent to `.` + info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 10._1 + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.js b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.js new file mode 100644 index 0000000000000..93e27d3efbf26 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.js @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-dd-err.ts] //// + +//// [numeric-separator-literal-dil-dot-nsl-dd-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be adjacent to `.` +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._1 + + +//// [numeric-separator-literal-dil-dot-nsl-dd-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be adjacent to `.` +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +10.1; diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.symbols b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.symbols new file mode 100644 index 0000000000000..85c595f177ea3 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-dd-err.ts] //// + +=== numeric-separator-literal-dil-dot-nsl-dd-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be adjacent to `.` +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._1 + diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.types b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.types new file mode 100644 index 0000000000000..58a18cf23aa3e --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-dd-err.types @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-dd-err.ts] //// + +=== numeric-separator-literal-dil-dot-nsl-dd-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be adjacent to `.` +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._1 +>10._1 : 10.1 + diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.errors.txt new file mode 100644 index 0000000000000..50dbf429d030e --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.errors.txt @@ -0,0 +1,37 @@ +numeric-separator-literal-dil-dot-nsl-ep-err.ts(30,4): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-dil-dot-nsl-ep-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear between `.` and ExponentPart + info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 10._e1 + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.js b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.js new file mode 100644 index 0000000000000..2e7f60aabb1de --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.js @@ -0,0 +1,63 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-ep-err.ts] //// + +//// [numeric-separator-literal-dil-dot-nsl-ep-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear between `.` and ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._e1 + + +//// [numeric-separator-literal-dil-dot-nsl-ep-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear between `.` and ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +100; diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.symbols b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.symbols new file mode 100644 index 0000000000000..fc7098b597ff7 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.symbols @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-ep-err.ts] //// + +=== numeric-separator-literal-dil-dot-nsl-ep-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear between `.` and ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._e1 + diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.types b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.types new file mode 100644 index 0000000000000..f80ab5425cd5a --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-ep-err.types @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-ep-err.ts] //// + +=== numeric-separator-literal-dil-dot-nsl-ep-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear between `.` and ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._e1 +>10._e1 : 100 + diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.errors.txt new file mode 100644 index 0000000000000..51c4ed3489fd1 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.errors.txt @@ -0,0 +1,35 @@ +numeric-separator-literal-dil-dot-nsl-err.ts(28,4): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-dil-dot-nsl-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral + info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 10._ + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.js b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.js new file mode 100644 index 0000000000000..141472c752593 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.js @@ -0,0 +1,59 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-err.ts] //// + +//// [numeric-separator-literal-dil-dot-nsl-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._ + + +//// [numeric-separator-literal-dil-dot-nsl-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +10; diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.symbols b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.symbols new file mode 100644 index 0000000000000..aff899e6707e6 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.symbols @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-err.ts] //// + +=== numeric-separator-literal-dil-dot-nsl-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._ + diff --git a/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.types b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.types new file mode 100644 index 0000000000000..c178fdcd84b38 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dil-dot-nsl-err.types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-err.ts] //// + +=== numeric-separator-literal-dil-dot-nsl-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._ +>10._ : 10 + diff --git a/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.errors.txt new file mode 100644 index 0000000000000..b38defcd785eb --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.errors.txt @@ -0,0 +1,36 @@ +numeric-separator-literal-dot-dds-nsl-ep-err.ts(29,3): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-dot-dds-nsl-ep-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: NumericLiteralSeparator may not appear adjacent to ExponentPart + info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + .0_e1 + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.js b/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.js new file mode 100644 index 0000000000000..b3ed3cf47bc6b --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.js @@ -0,0 +1,61 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-dds-nsl-ep-err.ts] //// + +//// [numeric-separator-literal-dot-dds-nsl-ep-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NumericLiteralSeparator may not appear adjacent to ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +.0_e1 + + +//// [numeric-separator-literal-dot-dds-nsl-ep-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: NumericLiteralSeparator may not appear adjacent to ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +0; diff --git a/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.symbols b/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.symbols new file mode 100644 index 0000000000000..f13382ca0732b --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.symbols @@ -0,0 +1,34 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-dds-nsl-ep-err.ts] //// + +=== numeric-separator-literal-dot-dds-nsl-ep-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NumericLiteralSeparator may not appear adjacent to ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +.0_e1 + diff --git a/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.types b/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.types new file mode 100644 index 0000000000000..171bcae555a4b --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-dds-nsl-ep-err.types @@ -0,0 +1,34 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-dds-nsl-ep-err.ts] //// + +=== numeric-separator-literal-dot-dds-nsl-ep-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NumericLiteralSeparator may not appear adjacent to ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +.0_e1 +>.0_e1 : 0 + diff --git a/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.errors.txt new file mode 100644 index 0000000000000..9b0a9310e1f6f --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.errors.txt @@ -0,0 +1,40 @@ +numeric-separator-literal-dot-nsl-ep-err.ts(30,1): error TS1128: Declaration or statement expected. +numeric-separator-literal-dot-nsl-ep-err.ts(30,2): error TS2304: Cannot find name '_e1'. + + +==== numeric-separator-literal-dot-nsl-ep-err.ts (2 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear between `.` and ExponentPart + info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + ._e1 + ~ +!!! error TS1128: Declaration or statement expected. + ~~~ +!!! error TS2304: Cannot find name '_e1'. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.js b/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.js new file mode 100644 index 0000000000000..12b1df842c05d --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.js @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-ep-err.ts] //// + +//// [numeric-separator-literal-dot-nsl-ep-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear between `.` and ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +._e1 + + +//// [numeric-separator-literal-dot-nsl-ep-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +_e1; diff --git a/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.symbols b/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.symbols new file mode 100644 index 0000000000000..d424686fabbf2 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.symbols @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-ep-err.ts] //// + +=== numeric-separator-literal-dot-nsl-ep-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear between `.` and ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +._e1 + diff --git a/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.types b/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.types new file mode 100644 index 0000000000000..62ba4f5ab59e1 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-nsl-ep-err.types @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-ep-err.ts] //// + +=== numeric-separator-literal-dot-nsl-ep-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear between `.` and ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +._e1 +>_e1 : any + diff --git a/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.errors.txt new file mode 100644 index 0000000000000..c6c431c57121c --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.errors.txt @@ -0,0 +1,38 @@ +numeric-separator-literal-dot-nsl-err.ts(28,1): error TS1128: Declaration or statement expected. +numeric-separator-literal-dot-nsl-err.ts(28,2): error TS2304: Cannot find name '_'. + + +==== numeric-separator-literal-dot-nsl-err.ts (2 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral, nor adjacent to `.` + info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + ._ + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS2304: Cannot find name '_'. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.js b/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.js new file mode 100644 index 0000000000000..8034577cf2286 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.js @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-err.ts] //// + +//// [numeric-separator-literal-dot-nsl-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral, nor adjacent to `.` +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +._ + + +//// [numeric-separator-literal-dot-nsl-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +_; diff --git a/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.symbols b/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.symbols new file mode 100644 index 0000000000000..de257c82dde15 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.symbols @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-err.ts] //// + +=== numeric-separator-literal-dot-nsl-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral, nor adjacent to `.` +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +._ + diff --git a/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.types b/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.types new file mode 100644 index 0000000000000..8da99abb498b5 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-dot-nsl-err.types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-err.ts] //// + +=== numeric-separator-literal-dot-nsl-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral, nor adjacent to `.` +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +._ +>_ : any + diff --git a/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.errors.txt new file mode 100644 index 0000000000000..d7756c0145261 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.errors.txt @@ -0,0 +1,40 @@ +numeric-separator-literal-hil-hd-nsl-hd-err.ts(33,3): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-hil-hd-nsl-hd-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 0x_1 + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.js b/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.js new file mode 100644 index 0000000000000..c77125891e559 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.js @@ -0,0 +1,69 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-hd-nsl-hd-err.ts] //// + +//// [numeric-separator-literal-hil-hd-nsl-hd-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x_1 + + +//// [numeric-separator-literal-hil-hd-nsl-hd-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +1; diff --git a/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.symbols b/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.symbols new file mode 100644 index 0000000000000..7c2dedbdd2449 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-hd-nsl-hd-err.ts] //// + +=== numeric-separator-literal-hil-hd-nsl-hd-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x_1 + diff --git a/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.types b/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.types new file mode 100644 index 0000000000000..6785bcdf2272d --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-hd-nsl-hd-err.types @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-hd-nsl-hd-err.ts] //// + +=== numeric-separator-literal-hil-hd-nsl-hd-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x_1 +>0x_1 : 1 + diff --git a/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.errors.txt new file mode 100644 index 0000000000000..881b78369a16e --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.errors.txt @@ -0,0 +1,40 @@ +numeric-separator-literal-hil-nsl-hd-dunder-err.ts(33,5): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== numeric-separator-literal-hil-nsl-hd-dunder-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 0x0__0 + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.js b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.js new file mode 100644 index 0000000000000..f87f74d28abc3 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.js @@ -0,0 +1,69 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-dunder-err.ts] //// + +//// [numeric-separator-literal-hil-nsl-hd-dunder-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x0__0 + + +//// [numeric-separator-literal-hil-nsl-hd-dunder-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +0; diff --git a/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.symbols b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.symbols new file mode 100644 index 0000000000000..f6d042f954646 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-dunder-err.ts] //// + +=== numeric-separator-literal-hil-nsl-hd-dunder-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x0__0 + diff --git a/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.types b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.types new file mode 100644 index 0000000000000..8e756663ec44c --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-dunder-err.types @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-dunder-err.ts] //// + +=== numeric-separator-literal-hil-nsl-hd-dunder-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x0__0 +>0x0__0 : 0 + diff --git a/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.errors.txt new file mode 100644 index 0000000000000..2c9bf86f5e3d8 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.errors.txt @@ -0,0 +1,40 @@ +numeric-separator-literal-hil-nsl-hd-err.ts(33,4): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-hil-nsl-hd-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 0x0_ + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.js b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.js new file mode 100644 index 0000000000000..3dfc315a04a43 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.js @@ -0,0 +1,69 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-err.ts] //// + +//// [numeric-separator-literal-hil-nsl-hd-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x0_ + + +//// [numeric-separator-literal-hil-nsl-hd-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +0; diff --git a/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.symbols b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.symbols new file mode 100644 index 0000000000000..caa481c2712d2 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-err.ts] //// + +=== numeric-separator-literal-hil-nsl-hd-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x0_ + diff --git a/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.types b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.types new file mode 100644 index 0000000000000..c5fd46169b4ab --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-hil-nsl-hd-err.types @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-err.ts] //// + +=== numeric-separator-literal-hil-nsl-hd-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x0_ +>0x0_ : 0 + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-00-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-lol-00-err.errors.txt new file mode 100644 index 0000000000000..fe3aa858df72e --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-00-err.errors.txt @@ -0,0 +1,53 @@ +numeric-separator-literal-lol-00-err.ts(40,1): error TS1121: Octal literals are not allowed. Use the syntax '0o0'. +numeric-separator-literal-lol-00-err.ts(40,3): error TS1005: ';' expected. +numeric-separator-literal-lol-00-err.ts(40,3): error TS2304: Cannot find name '_0'. + + +==== numeric-separator-literal-lol-00-err.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [numeric-separator-literal] + ---*/ + + + 00_0; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o0'. + ~~ +!!! error TS1005: ';' expected. + ~~ +!!! error TS2304: Cannot find name '_0'. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-lol-00-err.js b/tests/baselines/reference/numeric-separator-literal-lol-00-err.js new file mode 100644 index 0000000000000..da3454b0bd08f --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-00-err.js @@ -0,0 +1,84 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-00-err.ts] //// + +//// [numeric-separator-literal-lol-00-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +00_0; + + +//// [numeric-separator-literal-lol-00-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ +0; +_0; diff --git a/tests/baselines/reference/numeric-separator-literal-lol-00-err.symbols b/tests/baselines/reference/numeric-separator-literal-lol-00-err.symbols new file mode 100644 index 0000000000000..0677b7c721664 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-00-err.symbols @@ -0,0 +1,45 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-00-err.ts] //// + +=== numeric-separator-literal-lol-00-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +00_0; + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-00-err.types b/tests/baselines/reference/numeric-separator-literal-lol-00-err.types new file mode 100644 index 0000000000000..b226025397bfe --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-00-err.types @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-00-err.ts] //// + +=== numeric-separator-literal-lol-00-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +00_0; +>00 : 0 +>_0 : any + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-01-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-lol-01-err.errors.txt new file mode 100644 index 0000000000000..5f24796d00425 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-01-err.errors.txt @@ -0,0 +1,53 @@ +numeric-separator-literal-lol-01-err.ts(40,1): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. +numeric-separator-literal-lol-01-err.ts(40,3): error TS1005: ';' expected. +numeric-separator-literal-lol-01-err.ts(40,3): error TS2304: Cannot find name '_0'. + + +==== numeric-separator-literal-lol-01-err.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [numeric-separator-literal] + ---*/ + + + 01_0; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + ~~ +!!! error TS1005: ';' expected. + ~~ +!!! error TS2304: Cannot find name '_0'. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-lol-01-err.js b/tests/baselines/reference/numeric-separator-literal-lol-01-err.js new file mode 100644 index 0000000000000..7fa4c8843c0c3 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-01-err.js @@ -0,0 +1,84 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-01-err.ts] //// + +//// [numeric-separator-literal-lol-01-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +01_0; + + +//// [numeric-separator-literal-lol-01-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ +1; +_0; diff --git a/tests/baselines/reference/numeric-separator-literal-lol-01-err.symbols b/tests/baselines/reference/numeric-separator-literal-lol-01-err.symbols new file mode 100644 index 0000000000000..291a2b7537f43 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-01-err.symbols @@ -0,0 +1,45 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-01-err.ts] //// + +=== numeric-separator-literal-lol-01-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +01_0; + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-01-err.types b/tests/baselines/reference/numeric-separator-literal-lol-01-err.types new file mode 100644 index 0000000000000..a07903b76ef80 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-01-err.types @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-01-err.ts] //// + +=== numeric-separator-literal-lol-01-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +01_0; +>01 : 1 +>_0 : any + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-07-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-lol-07-err.errors.txt new file mode 100644 index 0000000000000..5b93befa2e41e --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-07-err.errors.txt @@ -0,0 +1,55 @@ +numeric-separator-literal-lol-07-err.ts(42,1): error TS1121: Octal literals are not allowed. Use the syntax '0o7'. +numeric-separator-literal-lol-07-err.ts(42,3): error TS1005: ';' expected. +numeric-separator-literal-lol-07-err.ts(42,3): error TS2304: Cannot find name '_0'. + + +==== numeric-separator-literal-lol-07-err.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [numeric-separator-literal] + ---*/ + + + 07_0; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o7'. + ~~ +!!! error TS1005: ';' expected. + ~~ +!!! error TS2304: Cannot find name '_0'. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-lol-07-err.js b/tests/baselines/reference/numeric-separator-literal-lol-07-err.js new file mode 100644 index 0000000000000..55c47a417f2b3 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-07-err.js @@ -0,0 +1,88 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-07-err.ts] //// + +//// [numeric-separator-literal-lol-07-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +07_0; + + +//// [numeric-separator-literal-lol-07-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ +7; +_0; diff --git a/tests/baselines/reference/numeric-separator-literal-lol-07-err.symbols b/tests/baselines/reference/numeric-separator-literal-lol-07-err.symbols new file mode 100644 index 0000000000000..ac4dc3752b5e3 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-07-err.symbols @@ -0,0 +1,47 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-07-err.ts] //// + +=== numeric-separator-literal-lol-07-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +07_0; + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-07-err.types b/tests/baselines/reference/numeric-separator-literal-lol-07-err.types new file mode 100644 index 0000000000000..659f1f502bdb3 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-07-err.types @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-07-err.ts] //// + +=== numeric-separator-literal-lol-07-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +07_0; +>07 : 7 +>_0 : any + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.errors.txt new file mode 100644 index 0000000000000..3642386c1e575 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.errors.txt @@ -0,0 +1,47 @@ +numeric-separator-literal-lol-0_0-err.ts(40,2): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-lol-0_0-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [numeric-separator-literal] + ---*/ + + + 0_0; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.js b/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.js new file mode 100644 index 0000000000000..1fe066253f73d --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.js @@ -0,0 +1,83 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_0-err.ts] //// + +//// [numeric-separator-literal-lol-0_0-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_0; + + +//// [numeric-separator-literal-lol-0_0-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ +0; diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.symbols b/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.symbols new file mode 100644 index 0000000000000..486084351e61d --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.symbols @@ -0,0 +1,45 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_0-err.ts] //// + +=== numeric-separator-literal-lol-0_0-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_0; + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.types b/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.types new file mode 100644 index 0000000000000..904d128fbd097 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_0-err.types @@ -0,0 +1,45 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_0-err.ts] //// + +=== numeric-separator-literal-lol-0_0-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_0; +>0_0 : 0 + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.errors.txt new file mode 100644 index 0000000000000..ca2d7691a4a49 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.errors.txt @@ -0,0 +1,47 @@ +numeric-separator-literal-lol-0_1-err.ts(40,2): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-lol-0_1-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [numeric-separator-literal] + ---*/ + + + 0_1; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.js b/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.js new file mode 100644 index 0000000000000..255cb13757a15 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.js @@ -0,0 +1,83 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_1-err.ts] //// + +//// [numeric-separator-literal-lol-0_1-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_1; + + +//// [numeric-separator-literal-lol-0_1-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ +1; diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.symbols b/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.symbols new file mode 100644 index 0000000000000..61cd6b358796e --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.symbols @@ -0,0 +1,45 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_1-err.ts] //// + +=== numeric-separator-literal-lol-0_1-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_1; + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.types b/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.types new file mode 100644 index 0000000000000..8f50bc27dd8df --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_1-err.types @@ -0,0 +1,45 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_1-err.ts] //// + +=== numeric-separator-literal-lol-0_1-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_1; +>0_1 : 1 + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.errors.txt new file mode 100644 index 0000000000000..26703d4cb853b --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.errors.txt @@ -0,0 +1,48 @@ +numeric-separator-literal-lol-0_7-err.ts(41,2): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-lol-0_7-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + features: [numeric-separator-literal] + ---*/ + + + 0_7; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.js b/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.js new file mode 100644 index 0000000000000..0f91ed80ad26a --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.js @@ -0,0 +1,85 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_7-err.ts] //// + +//// [numeric-separator-literal-lol-0_7-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_7; + + +//// [numeric-separator-literal-lol-0_7-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ +7; diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.symbols b/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.symbols new file mode 100644 index 0000000000000..96a472ffbe693 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.symbols @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_7-err.ts] //// + +=== numeric-separator-literal-lol-0_7-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_7; + diff --git a/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.types b/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.types new file mode 100644 index 0000000000000..aeef2dbc9995b --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-lol-0_7-err.types @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_7-err.ts] //// + +=== numeric-separator-literal-lol-0_7-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_7; +>0_7 : 7 + diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.errors.txt new file mode 100644 index 0000000000000..7655634d0dd92 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.errors.txt @@ -0,0 +1,50 @@ +numeric-separator-literal-nonoctal-08-err.ts(37,1): error TS1489: Decimals with leading zeros are not allowed. +numeric-separator-literal-nonoctal-08-err.ts(37,3): error TS1005: ';' expected. +numeric-separator-literal-nonoctal-08-err.ts(37,3): error TS2304: Cannot find name '_0'. + + +==== numeric-separator-literal-nonoctal-08-err.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + negative: + phase: parse + type: SyntaxError + features: [numeric-separator-literal] + ---*/ + + + 08_0; + ~~ +!!! error TS1489: Decimals with leading zeros are not allowed. + ~~ +!!! error TS1005: ';' expected. + ~~ +!!! error TS2304: Cannot find name '_0'. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.js b/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.js new file mode 100644 index 0000000000000..b7633eda3fdc3 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.js @@ -0,0 +1,78 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-08-err.ts] //// + +//// [numeric-separator-literal-nonoctal-08-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +08_0; + + +//// [numeric-separator-literal-nonoctal-08-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ +8; +_0; diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.symbols b/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.symbols new file mode 100644 index 0000000000000..f67d972baf15b --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.symbols @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-08-err.ts] //// + +=== numeric-separator-literal-nonoctal-08-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +08_0; + diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.types b/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.types new file mode 100644 index 0000000000000..738dc121ec3c5 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-08-err.types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-08-err.ts] //// + +=== numeric-separator-literal-nonoctal-08-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +08_0; +>08 : 8 +>_0 : any + diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.errors.txt new file mode 100644 index 0000000000000..74fb11e8977fc --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.errors.txt @@ -0,0 +1,50 @@ +numeric-separator-literal-nonoctal-09-err.ts(37,1): error TS1489: Decimals with leading zeros are not allowed. +numeric-separator-literal-nonoctal-09-err.ts(37,3): error TS1005: ';' expected. +numeric-separator-literal-nonoctal-09-err.ts(37,3): error TS2304: Cannot find name '_0'. + + +==== numeric-separator-literal-nonoctal-09-err.ts (3 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + negative: + phase: parse + type: SyntaxError + features: [numeric-separator-literal] + ---*/ + + + 09_0; + ~~ +!!! error TS1489: Decimals with leading zeros are not allowed. + ~~ +!!! error TS1005: ';' expected. + ~~ +!!! error TS2304: Cannot find name '_0'. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.js b/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.js new file mode 100644 index 0000000000000..5cd118583af4f --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.js @@ -0,0 +1,78 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-09-err.ts] //// + +//// [numeric-separator-literal-nonoctal-09-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +09_0; + + +//// [numeric-separator-literal-nonoctal-09-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ +9; +_0; diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.symbols b/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.symbols new file mode 100644 index 0000000000000..360f661a30867 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.symbols @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-09-err.ts] //// + +=== numeric-separator-literal-nonoctal-09-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +09_0; + diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.types b/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.types new file mode 100644 index 0000000000000..d5d407d01a9f4 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-09-err.types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-09-err.ts] //// + +=== numeric-separator-literal-nonoctal-09-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +09_0; +>09 : 9 +>_0 : any + diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.errors.txt new file mode 100644 index 0000000000000..00f4a344c793d --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.errors.txt @@ -0,0 +1,44 @@ +numeric-separator-literal-nonoctal-0_8-err.ts(37,2): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-nonoctal-0_8-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + negative: + phase: parse + type: SyntaxError + features: [numeric-separator-literal] + ---*/ + + + 0_8; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.js b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.js new file mode 100644 index 0000000000000..de824ee0dd9a8 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.js @@ -0,0 +1,77 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_8-err.ts] //// + +//// [numeric-separator-literal-nonoctal-0_8-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_8; + + +//// [numeric-separator-literal-nonoctal-0_8-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ +8; diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.symbols b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.symbols new file mode 100644 index 0000000000000..7371845c80c51 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.symbols @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_8-err.ts] //// + +=== numeric-separator-literal-nonoctal-0_8-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_8; + diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.types b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.types new file mode 100644 index 0000000000000..31ba83d19f08a --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_8-err.types @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_8-err.ts] //// + +=== numeric-separator-literal-nonoctal-0_8-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_8; +>0_8 : 8 + diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.errors.txt new file mode 100644 index 0000000000000..c134045f1635e --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.errors.txt @@ -0,0 +1,44 @@ +numeric-separator-literal-nonoctal-0_9-err.ts(37,2): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-nonoctal-0_9-err.ts (1 errors) ==== + // Copyright (C) 2019 Leo Balter. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + negative: + phase: parse + type: SyntaxError + features: [numeric-separator-literal] + ---*/ + + + 0_9; + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.js b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.js new file mode 100644 index 0000000000000..3c04ecb919056 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.js @@ -0,0 +1,77 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_9-err.ts] //// + +//// [numeric-separator-literal-nonoctal-0_9-err.ts] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_9; + + +//// [numeric-separator-literal-nonoctal-0_9-err.js] +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ +9; diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.symbols b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.symbols new file mode 100644 index 0000000000000..9c6da7da883fd --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.symbols @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_9-err.ts] //// + +=== numeric-separator-literal-nonoctal-0_9-err.ts === + +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_9; + diff --git a/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.types b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.types new file mode 100644 index 0000000000000..15cbd5189d31f --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nonoctal-0_9-err.types @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_9-err.ts] //// + +=== numeric-separator-literal-nonoctal-0_9-err.ts === +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_9; +>0_9 : 9 + diff --git a/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.errors.txt new file mode 100644 index 0000000000000..e0811c6d83dd3 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.errors.txt @@ -0,0 +1,38 @@ +numeric-separator-literal-nzd-nsl-dds-dunder-err.ts(28,2): error TS6188: Numeric separators are not allowed here. +numeric-separator-literal-nzd-nsl-dds-dunder-err.ts(28,3): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== numeric-separator-literal-nzd-nsl-dds-dunder-err.ts (2 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 0__0123456789 + ~ +!!! error TS6188: Numeric separators are not allowed here. + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.js b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.js new file mode 100644 index 0000000000000..42d7241b50f37 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.js @@ -0,0 +1,59 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-dunder-err.ts] //// + +//// [numeric-separator-literal-nzd-nsl-dds-dunder-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0__0123456789 + + +//// [numeric-separator-literal-nzd-nsl-dds-dunder-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +123456789; diff --git a/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.symbols b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.symbols new file mode 100644 index 0000000000000..12c2b887e926f --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.symbols @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-dunder-err.ts] //// + +=== numeric-separator-literal-nzd-nsl-dds-dunder-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0__0123456789 + diff --git a/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.types b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.types new file mode 100644 index 0000000000000..ba8a0f3f72194 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-dunder-err.types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-dunder-err.ts] //// + +=== numeric-separator-literal-nzd-nsl-dds-dunder-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0__0123456789 +>0__0123456789 : 123456789 + diff --git a/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.errors.txt new file mode 100644 index 0000000000000..dcbfc3fbf1dd5 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.errors.txt @@ -0,0 +1,33 @@ +numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts(26,2): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: NonZeroDigit NumericLiteralSeparator DecimalDigits + info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 0_0123456789 + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js new file mode 100644 index 0000000000000..be19078e79528 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js @@ -0,0 +1,55 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts] //// + +//// [numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NonZeroDigit NumericLiteralSeparator DecimalDigits +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0_0123456789 + + +//// [numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: NonZeroDigit NumericLiteralSeparator DecimalDigits +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +123456789; diff --git a/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.symbols b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.symbols new file mode 100644 index 0000000000000..87dce81c256b5 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.symbols @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts] //// + +=== numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NonZeroDigit NumericLiteralSeparator DecimalDigits +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0_0123456789 + diff --git a/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.types b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.types new file mode 100644 index 0000000000000..df538c8dd1ec3 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts] //// + +=== numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NonZeroDigit NumericLiteralSeparator DecimalDigits +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0_0123456789 +>0_0123456789 : 123456789 + diff --git a/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.errors.txt new file mode 100644 index 0000000000000..7acca370de71a --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.errors.txt @@ -0,0 +1,40 @@ +numeric-separator-literal-oil-nsl-od-dunder-err.ts(33,5): error TS6189: Multiple consecutive numeric separators are not permitted. + + +==== numeric-separator-literal-oil-nsl-od-dunder-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 0o0__0 + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.js b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.js new file mode 100644 index 0000000000000..b230b616dcf52 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.js @@ -0,0 +1,69 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-dunder-err.ts] //// + +//// [numeric-separator-literal-oil-nsl-od-dunder-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o0__0 + + +//// [numeric-separator-literal-oil-nsl-od-dunder-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +0; diff --git a/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.symbols b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.symbols new file mode 100644 index 0000000000000..809936c627a59 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-dunder-err.ts] //// + +=== numeric-separator-literal-oil-nsl-od-dunder-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o0__0 + diff --git a/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.types b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.types new file mode 100644 index 0000000000000..de61d4a46370e --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-dunder-err.types @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-dunder-err.ts] //// + +=== numeric-separator-literal-oil-nsl-od-dunder-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o0__0 +>0o0__0 : 0 + diff --git a/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.errors.txt new file mode 100644 index 0000000000000..1f7f27aa3859b --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.errors.txt @@ -0,0 +1,40 @@ +numeric-separator-literal-oil-nsl-od-err.ts(33,4): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-oil-nsl-od-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 0o0_ + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.js b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.js new file mode 100644 index 0000000000000..7edc2238d444d --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.js @@ -0,0 +1,69 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-err.ts] //// + +//// [numeric-separator-literal-oil-nsl-od-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o0_ + + +//// [numeric-separator-literal-oil-nsl-od-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +0; diff --git a/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.symbols b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.symbols new file mode 100644 index 0000000000000..abd7ca48d98d7 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-err.ts] //// + +=== numeric-separator-literal-oil-nsl-od-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o0_ + diff --git a/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.types b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.types new file mode 100644 index 0000000000000..0057ae75df82c --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-nsl-od-err.types @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-err.ts] //// + +=== numeric-separator-literal-oil-nsl-od-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o0_ +>0o0_ : 0 + diff --git a/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.errors.txt new file mode 100644 index 0000000000000..ecb6145811284 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.errors.txt @@ -0,0 +1,40 @@ +numeric-separator-literal-oil-od-nsl-od-err.ts(33,3): error TS6188: Numeric separators are not allowed here. + + +==== numeric-separator-literal-oil-od-nsl-od-err.ts (1 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral + info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 0o_1 + ~ +!!! error TS6188: Numeric separators are not allowed here. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.js b/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.js new file mode 100644 index 0000000000000..5a31b534d77e8 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.js @@ -0,0 +1,69 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-od-nsl-od-err.ts] //// + +//// [numeric-separator-literal-oil-od-nsl-od-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o_1 + + +//// [numeric-separator-literal-oil-od-nsl-od-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +1; diff --git a/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.symbols b/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.symbols new file mode 100644 index 0000000000000..dfa631e860463 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-od-nsl-od-err.ts] //// + +=== numeric-separator-literal-oil-od-nsl-od-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o_1 + diff --git a/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.types b/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.types new file mode 100644 index 0000000000000..0fe50b1f50a05 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-oil-od-nsl-od-err.types @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-od-nsl-od-err.ts] //// + +=== numeric-separator-literal-oil-od-nsl-od-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o_1 +>0o_1 : 1 + diff --git a/tests/baselines/reference/numeric-separator-literal-unicode-err.errors.txt b/tests/baselines/reference/numeric-separator-literal-unicode-err.errors.txt new file mode 100644 index 0000000000000..6638b3abf6e09 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-unicode-err.errors.txt @@ -0,0 +1,35 @@ +numeric-separator-literal-unicode-err.ts(25,2): error TS1005: ';' expected. +numeric-separator-literal-unicode-err.ts(25,2): error TS2304: Cannot find name '\u005F0123456789'. + + +==== numeric-separator-literal-unicode-err.ts (2 errors) ==== + // Copyright (C) 2017 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-NumericLiteralSeparator + description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence + info: | + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + negative: + phase: parse + type: SyntaxError + + features: [numeric-separator-literal] + ---*/ + + + 1\u005F0123456789 + ~~~~~~~~~~~~~~~~ +!!! error TS1005: ';' expected. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name '\u005F0123456789'. + \ No newline at end of file diff --git a/tests/baselines/reference/numeric-separator-literal-unicode-err.js b/tests/baselines/reference/numeric-separator-literal-unicode-err.js new file mode 100644 index 0000000000000..ae9578b21c7b7 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-unicode-err.js @@ -0,0 +1,54 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-unicode-err.ts] //// + +//// [numeric-separator-literal-unicode-err.ts] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence +info: | + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1\u005F0123456789 + + +//// [numeric-separator-literal-unicode-err.js] +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-NumericLiteralSeparator +description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence +info: | + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ +1; +\u005F0123456789; diff --git a/tests/baselines/reference/numeric-separator-literal-unicode-err.symbols b/tests/baselines/reference/numeric-separator-literal-unicode-err.symbols new file mode 100644 index 0000000000000..f8769fdc9ba1b --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-unicode-err.symbols @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-unicode-err.ts] //// + +=== numeric-separator-literal-unicode-err.ts === + +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence +info: | + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1\u005F0123456789 + diff --git a/tests/baselines/reference/numeric-separator-literal-unicode-err.types b/tests/baselines/reference/numeric-separator-literal-unicode-err.types new file mode 100644 index 0000000000000..f01017518ae24 --- /dev/null +++ b/tests/baselines/reference/numeric-separator-literal-unicode-err.types @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-unicode-err.ts] //// + +=== numeric-separator-literal-unicode-err.ts === +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence +info: | + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1\u005F0123456789 +>1 : 1 +>\u005F0123456789 : any + diff --git a/tests/baselines/reference/octal-invalid-digit.errors.txt b/tests/baselines/reference/octal-invalid-digit.errors.txt new file mode 100644 index 0000000000000..0b8217abf003a --- /dev/null +++ b/tests/baselines/reference/octal-invalid-digit.errors.txt @@ -0,0 +1,29 @@ +octal-invalid-digit.ts(22,3): error TS1178: Octal digit expected. + + +==== octal-invalid-digit.ts (1 errors) ==== + // Copyright (C) 2015 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es6id: 11.8.3 + description: Octal-integer-literal-like sequence containing an invalid digit + info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + ---*/ + + + 0o8; + +!!! error TS1178: Octal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/octal-invalid-digit.js b/tests/baselines/reference/octal-invalid-digit.js new file mode 100644 index 0000000000000..edb280948667c --- /dev/null +++ b/tests/baselines/reference/octal-invalid-digit.js @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-digit.ts] //// + +//// [octal-invalid-digit.ts] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence containing an invalid digit +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0o8; + + +//// [octal-invalid-digit.js] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence containing an invalid digit +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ +0; +8; diff --git a/tests/baselines/reference/octal-invalid-digit.symbols b/tests/baselines/reference/octal-invalid-digit.symbols new file mode 100644 index 0000000000000..f205a768097f4 --- /dev/null +++ b/tests/baselines/reference/octal-invalid-digit.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-digit.ts] //// + +=== octal-invalid-digit.ts === + +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence containing an invalid digit +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0o8; + diff --git a/tests/baselines/reference/octal-invalid-digit.types b/tests/baselines/reference/octal-invalid-digit.types new file mode 100644 index 0000000000000..8bf85186283b3 --- /dev/null +++ b/tests/baselines/reference/octal-invalid-digit.types @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-digit.ts] //// + +=== octal-invalid-digit.ts === +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence containing an invalid digit +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0o8; +>0o : 0 +>8 : 8 + diff --git a/tests/baselines/reference/octal-invalid-leading.errors.txt b/tests/baselines/reference/octal-invalid-leading.errors.txt new file mode 100644 index 0000000000000..55b09e06e7cdb --- /dev/null +++ b/tests/baselines/reference/octal-invalid-leading.errors.txt @@ -0,0 +1,35 @@ +octal-invalid-leading.ts(22,1): error TS1121: Octal literals are not allowed. Use the syntax '0o0'. +octal-invalid-leading.ts(22,3): error TS1005: ';' expected. +octal-invalid-leading.ts(22,3): error TS2304: Cannot find name 'o0'. + + +==== octal-invalid-leading.ts (3 errors) ==== + // Copyright (C) 2015 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es6id: 11.8.3 + description: Octal-integer-literal-like sequence with a leading 0 + info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + ---*/ + + + 00o0; + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o0'. + ~~ +!!! error TS1005: ';' expected. + ~~ +!!! error TS2304: Cannot find name 'o0'. + \ No newline at end of file diff --git a/tests/baselines/reference/octal-invalid-leading.js b/tests/baselines/reference/octal-invalid-leading.js new file mode 100644 index 0000000000000..003b3ed118689 --- /dev/null +++ b/tests/baselines/reference/octal-invalid-leading.js @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-leading.ts] //// + +//// [octal-invalid-leading.ts] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence with a leading 0 +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +00o0; + + +//// [octal-invalid-leading.js] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence with a leading 0 +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ +0; +o0; diff --git a/tests/baselines/reference/octal-invalid-leading.symbols b/tests/baselines/reference/octal-invalid-leading.symbols new file mode 100644 index 0000000000000..89a83eebeb308 --- /dev/null +++ b/tests/baselines/reference/octal-invalid-leading.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-leading.ts] //// + +=== octal-invalid-leading.ts === + +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence with a leading 0 +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +00o0; + diff --git a/tests/baselines/reference/octal-invalid-leading.types b/tests/baselines/reference/octal-invalid-leading.types new file mode 100644 index 0000000000000..9d406c1cdc964 --- /dev/null +++ b/tests/baselines/reference/octal-invalid-leading.types @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-leading.ts] //// + +=== octal-invalid-leading.ts === +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence with a leading 0 +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +00o0; +>00 : 0 +>o0 : any + diff --git a/tests/baselines/reference/octal-invalid-truncated.errors.txt b/tests/baselines/reference/octal-invalid-truncated.errors.txt new file mode 100644 index 0000000000000..0869d330d31c1 --- /dev/null +++ b/tests/baselines/reference/octal-invalid-truncated.errors.txt @@ -0,0 +1,29 @@ +octal-invalid-truncated.ts(22,3): error TS1178: Octal digit expected. + + +==== octal-invalid-truncated.ts (1 errors) ==== + // Copyright (C) 2015 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es6id: 11.8.3 + description: Octal-integer-literal-like sequence without any digits + info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + ---*/ + + + 0o; + +!!! error TS1178: Octal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/octal-invalid-truncated.js b/tests/baselines/reference/octal-invalid-truncated.js new file mode 100644 index 0000000000000..c6b9d57e46976 --- /dev/null +++ b/tests/baselines/reference/octal-invalid-truncated.js @@ -0,0 +1,47 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-truncated.ts] //// + +//// [octal-invalid-truncated.ts] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence without any digits +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0o; + + +//// [octal-invalid-truncated.js] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence without any digits +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ +0; diff --git a/tests/baselines/reference/octal-invalid-truncated.symbols b/tests/baselines/reference/octal-invalid-truncated.symbols new file mode 100644 index 0000000000000..0225c3dc473fd --- /dev/null +++ b/tests/baselines/reference/octal-invalid-truncated.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-truncated.ts] //// + +=== octal-invalid-truncated.ts === + +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence without any digits +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0o; + diff --git a/tests/baselines/reference/octal-invalid-truncated.types b/tests/baselines/reference/octal-invalid-truncated.types new file mode 100644 index 0000000000000..46568f5b89e02 --- /dev/null +++ b/tests/baselines/reference/octal-invalid-truncated.types @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-truncated.ts] //// + +=== octal-invalid-truncated.ts === +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence without any digits +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0o; +>0o : 0 + diff --git a/tests/baselines/reference/octal-invalid-unicode.errors.txt b/tests/baselines/reference/octal-invalid-unicode.errors.txt new file mode 100644 index 0000000000000..4a92231ae9a00 --- /dev/null +++ b/tests/baselines/reference/octal-invalid-unicode.errors.txt @@ -0,0 +1,32 @@ +octal-invalid-unicode.ts(22,2): error TS1005: ';' expected. +octal-invalid-unicode.ts(22,2): error TS2304: Cannot find name '\u006f0'. + + +==== octal-invalid-unicode.ts (2 errors) ==== + // Copyright (C) 2015 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + es6id: 11.8.3 + description: Octal-integer-literal-like sequence expressed with unicode escape sequence + info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + negative: + phase: parse + type: SyntaxError + ---*/ + + + 0\u006f0; + ~~~~~~~ +!!! error TS1005: ';' expected. + ~~~~~~~ +!!! error TS2304: Cannot find name '\u006f0'. + \ No newline at end of file diff --git a/tests/baselines/reference/octal-invalid-unicode.js b/tests/baselines/reference/octal-invalid-unicode.js new file mode 100644 index 0000000000000..f35b254845a7c --- /dev/null +++ b/tests/baselines/reference/octal-invalid-unicode.js @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-unicode.ts] //// + +//// [octal-invalid-unicode.ts] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence expressed with unicode escape sequence +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0\u006f0; + + +//// [octal-invalid-unicode.js] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence expressed with unicode escape sequence +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ +0; +\u006f0; diff --git a/tests/baselines/reference/octal-invalid-unicode.symbols b/tests/baselines/reference/octal-invalid-unicode.symbols new file mode 100644 index 0000000000000..360f9ca6a39b2 --- /dev/null +++ b/tests/baselines/reference/octal-invalid-unicode.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-unicode.ts] //// + +=== octal-invalid-unicode.ts === + +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence expressed with unicode escape sequence +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0\u006f0; + diff --git a/tests/baselines/reference/octal-invalid-unicode.types b/tests/baselines/reference/octal-invalid-unicode.types new file mode 100644 index 0000000000000..91e92a80b463b --- /dev/null +++ b/tests/baselines/reference/octal-invalid-unicode.types @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/test262/language/literals/numeric/octal-invalid-unicode.ts] //// + +=== octal-invalid-unicode.ts === +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence expressed with unicode escape sequence +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0\u006f0; +>0 : 0 +>\u006f0 : any + diff --git a/tests/baselines/reference/regexp-first-char-no-line-separator.errors.txt b/tests/baselines/reference/regexp-first-char-no-line-separator.errors.txt new file mode 100644 index 0000000000000..680e6966a0c25 --- /dev/null +++ b/tests/baselines/reference/regexp-first-char-no-line-separator.errors.txt @@ -0,0 +1,45 @@ +regexp-first-char-no-line-separator.ts(28,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +regexp-first-char-no-line-separator.ts(28,2): error TS1161: Unterminated regular expression literal. +regexp-first-char-no-line-separator.ts(29,2): error TS1109: Expression expected. + + +==== regexp-first-char-no-line-separator.ts (3 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionNonTerminator + info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + description: > + The first character of a regular expression may not be a + negative: + phase: parse + type: SyntaxError + ---*/ + + + /
/ + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + + +!!! error TS1109: Expression expected. + /* + There is a between the two / characters + */ + \ No newline at end of file diff --git a/tests/baselines/reference/regexp-first-char-no-line-separator.js b/tests/baselines/reference/regexp-first-char-no-line-separator.js new file mode 100644 index 0000000000000..4c1b36473148d --- /dev/null +++ b/tests/baselines/reference/regexp-first-char-no-line-separator.js @@ -0,0 +1,68 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-first-char-no-line-separator.ts] //// + +//// [regexp-first-char-no-line-separator.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a +negative: + phase: parse + type: SyntaxError +---*/ + + +/
/ + +/* +There is a between the two / characters +*/ + + +//// [regexp-first-char-no-line-separator.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a +negative: + phase: parse + type: SyntaxError +---*/ +/ + / +; +/* +There is a between the two / characters +*/ diff --git a/tests/baselines/reference/regexp-first-char-no-line-separator.symbols b/tests/baselines/reference/regexp-first-char-no-line-separator.symbols new file mode 100644 index 0000000000000..cf698619122a7 --- /dev/null +++ b/tests/baselines/reference/regexp-first-char-no-line-separator.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-first-char-no-line-separator.ts] //// + +=== regexp-first-char-no-line-separator.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +/ + +/* +There is a between the two / characters +*/ + diff --git a/tests/baselines/reference/regexp-first-char-no-line-separator.types b/tests/baselines/reference/regexp-first-char-no-line-separator.types new file mode 100644 index 0000000000000..f6f596100f3f1 --- /dev/null +++ b/tests/baselines/reference/regexp-first-char-no-line-separator.types @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-first-char-no-line-separator.ts] //// + +=== regexp-first-char-no-line-separator.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +>/
/ : number +>/ : RegExp + +/ + +/* +There is a between the two / characters +*/ + +> : any + diff --git a/tests/baselines/reference/regexp-first-char-no-paragraph-separator.errors.txt b/tests/baselines/reference/regexp-first-char-no-paragraph-separator.errors.txt new file mode 100644 index 0000000000000..6058ab10efef7 --- /dev/null +++ b/tests/baselines/reference/regexp-first-char-no-paragraph-separator.errors.txt @@ -0,0 +1,45 @@ +regexp-first-char-no-paragraph-separator.ts(28,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +regexp-first-char-no-paragraph-separator.ts(28,2): error TS1161: Unterminated regular expression literal. +regexp-first-char-no-paragraph-separator.ts(29,2): error TS1109: Expression expected. + + +==== regexp-first-char-no-paragraph-separator.ts (3 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionNonTerminator + info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + description: > + The first character of a regular expression may not be a + negative: + phase: parse + type: SyntaxError + ---*/ + + + /
/ + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + + +!!! error TS1109: Expression expected. + /* + There is a between the two / characters + */ + \ No newline at end of file diff --git a/tests/baselines/reference/regexp-first-char-no-paragraph-separator.js b/tests/baselines/reference/regexp-first-char-no-paragraph-separator.js new file mode 100644 index 0000000000000..a3c4c9e376446 --- /dev/null +++ b/tests/baselines/reference/regexp-first-char-no-paragraph-separator.js @@ -0,0 +1,68 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-first-char-no-paragraph-separator.ts] //// + +//// [regexp-first-char-no-paragraph-separator.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a +negative: + phase: parse + type: SyntaxError +---*/ + + +/
/ + +/* +There is a between the two / characters +*/ + + +//// [regexp-first-char-no-paragraph-separator.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a +negative: + phase: parse + type: SyntaxError +---*/ +/ + / +; +/* +There is a between the two / characters +*/ diff --git a/tests/baselines/reference/regexp-first-char-no-paragraph-separator.symbols b/tests/baselines/reference/regexp-first-char-no-paragraph-separator.symbols new file mode 100644 index 0000000000000..6f32a550d826e --- /dev/null +++ b/tests/baselines/reference/regexp-first-char-no-paragraph-separator.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-first-char-no-paragraph-separator.ts] //// + +=== regexp-first-char-no-paragraph-separator.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +/ + +/* +There is a between the two / characters +*/ + diff --git a/tests/baselines/reference/regexp-first-char-no-paragraph-separator.types b/tests/baselines/reference/regexp-first-char-no-paragraph-separator.types new file mode 100644 index 0000000000000..61ab3ab8bc49a --- /dev/null +++ b/tests/baselines/reference/regexp-first-char-no-paragraph-separator.types @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-first-char-no-paragraph-separator.ts] //// + +=== regexp-first-char-no-paragraph-separator.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +>/
/ : number +>/ : RegExp + +/ + +/* +There is a between the two / characters +*/ + +> : any + diff --git a/tests/baselines/reference/regexp-source-char-no-line-separator.errors.txt b/tests/baselines/reference/regexp-source-char-no-line-separator.errors.txt new file mode 100644 index 0000000000000..c6e1c3546f599 --- /dev/null +++ b/tests/baselines/reference/regexp-source-char-no-line-separator.errors.txt @@ -0,0 +1,44 @@ +regexp-source-char-no-line-separator.ts(27,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +regexp-source-char-no-line-separator.ts(27,2): error TS1161: Unterminated regular expression literal. +regexp-source-char-no-line-separator.ts(28,2): error TS1109: Expression expected. + + +==== regexp-source-char-no-line-separator.ts (3 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionBackslashSequence + info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + + description: > + A regular expression may not contain a as a SourceCharacter + negative: + phase: parse + type: SyntaxError + ---*/ + + + /a\\
/ + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + + +!!! error TS1109: Expression expected. + /* + There is a between "a\\
" and "/" + */ + \ No newline at end of file diff --git a/tests/baselines/reference/regexp-source-char-no-line-separator.js b/tests/baselines/reference/regexp-source-char-no-line-separator.js new file mode 100644 index 0000000000000..d188947f4473f --- /dev/null +++ b/tests/baselines/reference/regexp-source-char-no-line-separator.js @@ -0,0 +1,67 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-line-separator.ts] //// + +//// [regexp-source-char-no-line-separator.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\\
/ + +/* +There is a between "a\\
" and "/" +*/ + + +//// [regexp-source-char-no-line-separator.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ +/a\\ + / +; +/* +There is a between "a\\ +" and "/" +*/ diff --git a/tests/baselines/reference/regexp-source-char-no-line-separator.symbols b/tests/baselines/reference/regexp-source-char-no-line-separator.symbols new file mode 100644 index 0000000000000..cdbda40f9e4c4 --- /dev/null +++ b/tests/baselines/reference/regexp-source-char-no-line-separator.symbols @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-line-separator.ts] //// + +=== regexp-source-char-no-line-separator.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\\ +/ + +/* +There is a between "a\\ +" and "/" +*/ + diff --git a/tests/baselines/reference/regexp-source-char-no-line-separator.types b/tests/baselines/reference/regexp-source-char-no-line-separator.types new file mode 100644 index 0000000000000..b3ab27451ad2e --- /dev/null +++ b/tests/baselines/reference/regexp-source-char-no-line-separator.types @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-line-separator.ts] //// + +=== regexp-source-char-no-line-separator.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\\ +>/a\\
/ : number +>/a\\ : RegExp + +/ + +/* +There is a between "a\\ +" and "/" +*/ + +> : any + diff --git a/tests/baselines/reference/regexp-source-char-no-paragraph-separator.errors.txt b/tests/baselines/reference/regexp-source-char-no-paragraph-separator.errors.txt new file mode 100644 index 0000000000000..db877c0082a02 --- /dev/null +++ b/tests/baselines/reference/regexp-source-char-no-paragraph-separator.errors.txt @@ -0,0 +1,45 @@ +regexp-source-char-no-paragraph-separator.ts(28,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +regexp-source-char-no-paragraph-separator.ts(28,2): error TS1161: Unterminated regular expression literal. +regexp-source-char-no-paragraph-separator.ts(30,2): error TS1109: Expression expected. + + +==== regexp-source-char-no-paragraph-separator.ts (3 errors) ==== + // Copyright 2009 the Sputnik authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-RegularExpressionNonTerminator + info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + description: > + A regular expression may not contain a as a SourceCharacter + negative: + phase: parse + type: SyntaxError + ---*/ + + + /a\\

/ + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + +!!! error TS1161: Unterminated regular expression literal. + + /* + +!!! error TS1109: Expression expected. + There is a between "a\\
" and "/" + */ + \ No newline at end of file diff --git a/tests/baselines/reference/regexp-source-char-no-paragraph-separator.js b/tests/baselines/reference/regexp-source-char-no-paragraph-separator.js new file mode 100644 index 0000000000000..a926147d15cf3 --- /dev/null +++ b/tests/baselines/reference/regexp-source-char-no-paragraph-separator.js @@ -0,0 +1,69 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-paragraph-separator.ts] //// + +//// [regexp-source-char-no-paragraph-separator.ts] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\\

/ + +/* +There is a between "a\\
" and "/" +*/ + + +//// [regexp-source-char-no-paragraph-separator.js] +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ +/a\\ + / +; +/* +There is a between "a\\ +" and "/" +*/ diff --git a/tests/baselines/reference/regexp-source-char-no-paragraph-separator.symbols b/tests/baselines/reference/regexp-source-char-no-paragraph-separator.symbols new file mode 100644 index 0000000000000..d23d282125332 --- /dev/null +++ b/tests/baselines/reference/regexp-source-char-no-paragraph-separator.symbols @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-paragraph-separator.ts] //// + +=== regexp-source-char-no-paragraph-separator.ts === + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\\ + +/ + +/* +There is a between "a\\ +" and "/" +*/ + diff --git a/tests/baselines/reference/regexp-source-char-no-paragraph-separator.types b/tests/baselines/reference/regexp-source-char-no-paragraph-separator.types new file mode 100644 index 0000000000000..50e69a0f03949 --- /dev/null +++ b/tests/baselines/reference/regexp-source-char-no-paragraph-separator.types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-paragraph-separator.ts] //// + +=== regexp-source-char-no-paragraph-separator.ts === +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\\ +>/a\\

/ : number +>/a\\ : RegExp + +/ + +/* +There is a between "a\\ +" and "/" +*/ + +> : any + diff --git a/tests/baselines/reference/u-invalid-class-escape.errors.txt b/tests/baselines/reference/u-invalid-class-escape.errors.txt new file mode 100644 index 0000000000000..873e2fb2e7d9c --- /dev/null +++ b/tests/baselines/reference/u-invalid-class-escape.errors.txt @@ -0,0 +1,32 @@ +u-invalid-class-escape.ts(22,2): error TS1510: '\c' must be followed by an ASCII letter. +u-invalid-class-escape.ts(22,6): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-class-escape.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-patterns + es6id: 21.2.1 + description: > + ClassEscape does not recognize "class control" patterns + info: | + ClassEscape[U] :: + b + [+U] - + CharacterClassEscape + CharacterEscape[?U] + + The `u` flag precludes the Annex B extension that enables this pattern. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /\c0/u; + ~~ +!!! error TS1510: '\c' must be followed by an ASCII letter. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-class-escape.js b/tests/baselines/reference/u-invalid-class-escape.js new file mode 100644 index 0000000000000..f864a38d27d5b --- /dev/null +++ b/tests/baselines/reference/u-invalid-class-escape.js @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-class-escape.ts] //// + +//// [u-invalid-class-escape.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: > + ClassEscape does not recognize "class control" patterns +info: | + ClassEscape[U] :: + b + [+U] - + CharacterClassEscape + CharacterEscape[?U] + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\c0/u; + + +//// [u-invalid-class-escape.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: > + ClassEscape does not recognize "class control" patterns +info: | + ClassEscape[U] :: + b + [+U] - + CharacterClassEscape + CharacterEscape[?U] + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ +/\c0/u; diff --git a/tests/baselines/reference/u-invalid-class-escape.symbols b/tests/baselines/reference/u-invalid-class-escape.symbols new file mode 100644 index 0000000000000..8d62e187b302d --- /dev/null +++ b/tests/baselines/reference/u-invalid-class-escape.symbols @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-class-escape.ts] //// + +=== u-invalid-class-escape.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: > + ClassEscape does not recognize "class control" patterns +info: | + ClassEscape[U] :: + b + [+U] - + CharacterClassEscape + CharacterEscape[?U] + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\c0/u; + diff --git a/tests/baselines/reference/u-invalid-class-escape.types b/tests/baselines/reference/u-invalid-class-escape.types new file mode 100644 index 0000000000000..94399973dd6c7 --- /dev/null +++ b/tests/baselines/reference/u-invalid-class-escape.types @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-class-escape.ts] //// + +=== u-invalid-class-escape.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: > + ClassEscape does not recognize "class control" patterns +info: | + ClassEscape[U] :: + b + [+U] - + CharacterClassEscape + CharacterEscape[?U] + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\c0/u; +>/\c0/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-extended-pattern-char.errors.txt b/tests/baselines/reference/u-invalid-extended-pattern-char.errors.txt new file mode 100644 index 0000000000000..16190be2a328d --- /dev/null +++ b/tests/baselines/reference/u-invalid-extended-pattern-char.errors.txt @@ -0,0 +1,29 @@ +u-invalid-extended-pattern-char.ts(19,2): error TS1506: Unexpected '{'. Did you mean to escape it with backslash? +u-invalid-extended-pattern-char.ts(19,4): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-extended-pattern-char.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-patterns + es6id: 21.2.1 + description: Quantifiable assertions disallowed with `u` flag + info: | + The `u` flag precludes the use of extended pattern characters irrespective + of the presence of Annex B extensions. + + Term[U] :: + [~U] ExtendedAtom + negative: + phase: parse + type: SyntaxError + ---*/ + + + /{/u; + ~ +!!! error TS1506: Unexpected '{'. Did you mean to escape it with backslash? + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-extended-pattern-char.js b/tests/baselines/reference/u-invalid-extended-pattern-char.js new file mode 100644 index 0000000000000..f184c3c67e97a --- /dev/null +++ b/tests/baselines/reference/u-invalid-extended-pattern-char.js @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-extended-pattern-char.ts] //// + +//// [u-invalid-extended-pattern-char.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes the use of extended pattern characters irrespective + of the presence of Annex B extensions. + + Term[U] :: + [~U] ExtendedAtom +negative: + phase: parse + type: SyntaxError +---*/ + + +/{/u; + + +//// [u-invalid-extended-pattern-char.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes the use of extended pattern characters irrespective + of the presence of Annex B extensions. + + Term[U] :: + [~U] ExtendedAtom +negative: + phase: parse + type: SyntaxError +---*/ +/{/u; diff --git a/tests/baselines/reference/u-invalid-extended-pattern-char.symbols b/tests/baselines/reference/u-invalid-extended-pattern-char.symbols new file mode 100644 index 0000000000000..d96d410513905 --- /dev/null +++ b/tests/baselines/reference/u-invalid-extended-pattern-char.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-extended-pattern-char.ts] //// + +=== u-invalid-extended-pattern-char.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes the use of extended pattern characters irrespective + of the presence of Annex B extensions. + + Term[U] :: + [~U] ExtendedAtom +negative: + phase: parse + type: SyntaxError +---*/ + + +/{/u; + diff --git a/tests/baselines/reference/u-invalid-extended-pattern-char.types b/tests/baselines/reference/u-invalid-extended-pattern-char.types new file mode 100644 index 0000000000000..d675d2e7644e7 --- /dev/null +++ b/tests/baselines/reference/u-invalid-extended-pattern-char.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-extended-pattern-char.ts] //// + +=== u-invalid-extended-pattern-char.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes the use of extended pattern characters irrespective + of the presence of Annex B extensions. + + Term[U] :: + [~U] ExtendedAtom +negative: + phase: parse + type: SyntaxError +---*/ + + +/{/u; +>/{/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-identity-escape.errors.txt b/tests/baselines/reference/u-invalid-identity-escape.errors.txt new file mode 100644 index 0000000000000..91da307766211 --- /dev/null +++ b/tests/baselines/reference/u-invalid-identity-escape.errors.txt @@ -0,0 +1,31 @@ +u-invalid-identity-escape.ts(21,2): error TS1496: '\M' is not a valid character escape. +u-invalid-identity-escape.ts(21,5): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-identity-escape.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-patterns + es6id: 21.2.1 + description: Support for UnicodeIDContinue in IdentityEscape + info: | + IdentityEscape[U] :: + [+U] SyntaxCharacter + [+U] / + [~U] SourceCharacter but not UnicodeIDContinue + + The `u` flag precludes the use of characters in UnicodeIDContinue + irrespective of the presence of Annex B extensions. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /\M/u; + ~~ +!!! error TS1496: '\M' is not a valid character escape. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-identity-escape.js b/tests/baselines/reference/u-invalid-identity-escape.js new file mode 100644 index 0000000000000..009e6144fad60 --- /dev/null +++ b/tests/baselines/reference/u-invalid-identity-escape.js @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-identity-escape.ts] //// + +//// [u-invalid-identity-escape.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Support for UnicodeIDContinue in IdentityEscape +info: | + IdentityEscape[U] :: + [+U] SyntaxCharacter + [+U] / + [~U] SourceCharacter but not UnicodeIDContinue + + The `u` flag precludes the use of characters in UnicodeIDContinue + irrespective of the presence of Annex B extensions. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\M/u; + + +//// [u-invalid-identity-escape.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Support for UnicodeIDContinue in IdentityEscape +info: | + IdentityEscape[U] :: + [+U] SyntaxCharacter + [+U] / + [~U] SourceCharacter but not UnicodeIDContinue + + The `u` flag precludes the use of characters in UnicodeIDContinue + irrespective of the presence of Annex B extensions. +negative: + phase: parse + type: SyntaxError +---*/ +/\M/u; diff --git a/tests/baselines/reference/u-invalid-identity-escape.symbols b/tests/baselines/reference/u-invalid-identity-escape.symbols new file mode 100644 index 0000000000000..cf18b9ac91727 --- /dev/null +++ b/tests/baselines/reference/u-invalid-identity-escape.symbols @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-identity-escape.ts] //// + +=== u-invalid-identity-escape.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Support for UnicodeIDContinue in IdentityEscape +info: | + IdentityEscape[U] :: + [+U] SyntaxCharacter + [+U] / + [~U] SourceCharacter but not UnicodeIDContinue + + The `u` flag precludes the use of characters in UnicodeIDContinue + irrespective of the presence of Annex B extensions. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\M/u; + diff --git a/tests/baselines/reference/u-invalid-identity-escape.types b/tests/baselines/reference/u-invalid-identity-escape.types new file mode 100644 index 0000000000000..0260adec7a124 --- /dev/null +++ b/tests/baselines/reference/u-invalid-identity-escape.types @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-identity-escape.ts] //// + +=== u-invalid-identity-escape.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Support for UnicodeIDContinue in IdentityEscape +info: | + IdentityEscape[U] :: + [+U] SyntaxCharacter + [+U] / + [~U] SourceCharacter but not UnicodeIDContinue + + The `u` flag precludes the use of characters in UnicodeIDContinue + irrespective of the presence of Annex B extensions. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\M/u; +>/\M/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-legacy-octal-escape.errors.txt b/tests/baselines/reference/u-invalid-legacy-octal-escape.errors.txt new file mode 100644 index 0000000000000..1ec965e34daa1 --- /dev/null +++ b/tests/baselines/reference/u-invalid-legacy-octal-escape.errors.txt @@ -0,0 +1,34 @@ +u-invalid-legacy-octal-escape.ts(24,3): error TS1532: Decimal escapes are invalid when there are no capturing groups in a regular expression. +u-invalid-legacy-octal-escape.ts(24,5): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-legacy-octal-escape.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-patterns + es6id: 21.2.1 + description: Legacy Octal Escape Sequence not supported with `u` flag + info: | + The `u` flag precludes the use of LegacyOctalEscapeSequence irrespective + of the presence of Annex B extensions. + + CharacterEscape [U] :: + ControlEscape + c ControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] + negative: + phase: parse + type: SyntaxError + ---*/ + + + /\1/u; + ~ +!!! error TS1532: Decimal escapes are invalid when there are no capturing groups in a regular expression. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-legacy-octal-escape.js b/tests/baselines/reference/u-invalid-legacy-octal-escape.js new file mode 100644 index 0000000000000..c0ca28defc58b --- /dev/null +++ b/tests/baselines/reference/u-invalid-legacy-octal-escape.js @@ -0,0 +1,52 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-legacy-octal-escape.ts] //// + +//// [u-invalid-legacy-octal-escape.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Legacy Octal Escape Sequence not supported with `u` flag +info: | + The `u` flag precludes the use of LegacyOctalEscapeSequence irrespective + of the presence of Annex B extensions. + + CharacterEscape [U] :: + ControlEscape + c ControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] +negative: + phase: parse + type: SyntaxError +---*/ + + +/\1/u; + + +//// [u-invalid-legacy-octal-escape.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Legacy Octal Escape Sequence not supported with `u` flag +info: | + The `u` flag precludes the use of LegacyOctalEscapeSequence irrespective + of the presence of Annex B extensions. + + CharacterEscape [U] :: + ControlEscape + c ControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] +negative: + phase: parse + type: SyntaxError +---*/ +/\1/u; diff --git a/tests/baselines/reference/u-invalid-legacy-octal-escape.symbols b/tests/baselines/reference/u-invalid-legacy-octal-escape.symbols new file mode 100644 index 0000000000000..2853416fa587f --- /dev/null +++ b/tests/baselines/reference/u-invalid-legacy-octal-escape.symbols @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-legacy-octal-escape.ts] //// + +=== u-invalid-legacy-octal-escape.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Legacy Octal Escape Sequence not supported with `u` flag +info: | + The `u` flag precludes the use of LegacyOctalEscapeSequence irrespective + of the presence of Annex B extensions. + + CharacterEscape [U] :: + ControlEscape + c ControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] +negative: + phase: parse + type: SyntaxError +---*/ + + +/\1/u; + diff --git a/tests/baselines/reference/u-invalid-legacy-octal-escape.types b/tests/baselines/reference/u-invalid-legacy-octal-escape.types new file mode 100644 index 0000000000000..06594d5eb0e3f --- /dev/null +++ b/tests/baselines/reference/u-invalid-legacy-octal-escape.types @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-legacy-octal-escape.ts] //// + +=== u-invalid-legacy-octal-escape.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Legacy Octal Escape Sequence not supported with `u` flag +info: | + The `u` flag precludes the use of LegacyOctalEscapeSequence irrespective + of the presence of Annex B extensions. + + CharacterEscape [U] :: + ControlEscape + c ControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] +negative: + phase: parse + type: SyntaxError +---*/ + + +/\1/u; +>/\1/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.errors.txt b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.errors.txt new file mode 100644 index 0000000000000..acd1f68ef720c --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.errors.txt @@ -0,0 +1,41 @@ +u-invalid-non-empty-class-ranges-no-dash-a.ts(31,3): error TS1514: A character class range must not be bounded by another character class. +u-invalid-non-empty-class-ranges-no-dash-a.ts(31,9): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-non-empty-class-ranges-no-dash-a.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-pattern-semantics + es6id: 21.2.2 + description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("A" parameter) + info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /[\d-a]/u; + ~~ +!!! error TS1514: A character class range must not be bounded by another character class. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.js b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.js new file mode 100644 index 0000000000000..94ecadaf846aa --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.js @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.ts] //// + +//// [u-invalid-non-empty-class-ranges-no-dash-a.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("A" parameter) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[\d-a]/u; + + +//// [u-invalid-non-empty-class-ranges-no-dash-a.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("A" parameter) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ +/[\d-a]/u; diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.symbols b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.symbols new file mode 100644 index 0000000000000..f9ec5e59d57b5 --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.symbols @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.ts] //// + +=== u-invalid-non-empty-class-ranges-no-dash-a.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("A" parameter) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[\d-a]/u; + diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.types b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.types new file mode 100644 index 0000000000000..48ede2ea5d95f --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-a.types @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.ts] //// + +=== u-invalid-non-empty-class-ranges-no-dash-a.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("A" parameter) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[\d-a]/u; +>/[\d-a]/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.errors.txt b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.errors.txt new file mode 100644 index 0000000000000..c304ab12be65c --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.errors.txt @@ -0,0 +1,44 @@ +u-invalid-non-empty-class-ranges-no-dash-ab.ts(31,3): error TS1514: A character class range must not be bounded by another character class. +u-invalid-non-empty-class-ranges-no-dash-ab.ts(31,6): error TS1514: A character class range must not be bounded by another character class. +u-invalid-non-empty-class-ranges-no-dash-ab.ts(31,10): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-non-empty-class-ranges-no-dash-ab.ts (3 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-pattern-semantics + es6id: 21.2.2 + description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + (both "A" and "B" parameters) + info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /[\s-\d]/u; + ~~ +!!! error TS1514: A character class range must not be bounded by another character class. + ~~ +!!! error TS1514: A character class range must not be bounded by another character class. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.js b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.js new file mode 100644 index 0000000000000..e07121be165ce --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.js @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-ab.ts] //// + +//// [u-invalid-non-empty-class-ranges-no-dash-ab.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + (both "A" and "B" parameters) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[\s-\d]/u; + + +//// [u-invalid-non-empty-class-ranges-no-dash-ab.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + (both "A" and "B" parameters) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ +/[\s-\d]/u; diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.symbols b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.symbols new file mode 100644 index 0000000000000..60fa272ae4030 --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.symbols @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-ab.ts] //// + +=== u-invalid-non-empty-class-ranges-no-dash-ab.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + (both "A" and "B" parameters) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[\s-\d]/u; + diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.types b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.types new file mode 100644 index 0000000000000..b200786f11a67 --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-ab.types @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-ab.ts] //// + +=== u-invalid-non-empty-class-ranges-no-dash-ab.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + (both "A" and "B" parameters) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[\s-\d]/u; +>/[\s-\d]/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.errors.txt b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.errors.txt new file mode 100644 index 0000000000000..01098c7fd1bf5 --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.errors.txt @@ -0,0 +1,41 @@ +u-invalid-non-empty-class-ranges-no-dash-b.ts(31,5): error TS1514: A character class range must not be bounded by another character class. +u-invalid-non-empty-class-ranges-no-dash-b.ts(31,9): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-non-empty-class-ranges-no-dash-b.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-pattern-semantics + es6id: 21.2.2 + description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("B" parameter) + info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /[%-\d]/u; + ~~ +!!! error TS1514: A character class range must not be bounded by another character class. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.js b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.js new file mode 100644 index 0000000000000..a6b24ef02fed1 --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.js @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-b.ts] //// + +//// [u-invalid-non-empty-class-ranges-no-dash-b.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("B" parameter) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[%-\d]/u; + + +//// [u-invalid-non-empty-class-ranges-no-dash-b.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("B" parameter) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ +/[%-\d]/u; diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.symbols b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.symbols new file mode 100644 index 0000000000000..04b6638ba2f60 --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.symbols @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-b.ts] //// + +=== u-invalid-non-empty-class-ranges-no-dash-b.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("B" parameter) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[%-\d]/u; + diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.types b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.types new file mode 100644 index 0000000000000..6d22cb99de03f --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges-no-dash-b.types @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-b.ts] //// + +=== u-invalid-non-empty-class-ranges-no-dash-b.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("B" parameter) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[%-\d]/u; +>/[%-\d]/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges.errors.txt b/tests/baselines/reference/u-invalid-non-empty-class-ranges.errors.txt new file mode 100644 index 0000000000000..21c92af0735b2 --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges.errors.txt @@ -0,0 +1,40 @@ +u-invalid-non-empty-class-ranges.ts(30,5): error TS1514: A character class range must not be bounded by another character class. +u-invalid-non-empty-class-ranges.ts(30,9): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-non-empty-class-ranges.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-pattern-semantics + es6id: 21.2.2 + description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /[--\d]/u; + ~~ +!!! error TS1514: A character class range must not be bounded by another character class. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges.js b/tests/baselines/reference/u-invalid-non-empty-class-ranges.js new file mode 100644 index 0000000000000..66502b23848c9 --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges.js @@ -0,0 +1,64 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges.ts] //// + +//// [u-invalid-non-empty-class-ranges.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[--\d]/u; + + +//// [u-invalid-non-empty-class-ranges.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ +/[--\d]/u; diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges.symbols b/tests/baselines/reference/u-invalid-non-empty-class-ranges.symbols new file mode 100644 index 0000000000000..4c96ef0712e0c --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges.symbols @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges.ts] //// + +=== u-invalid-non-empty-class-ranges.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[--\d]/u; + diff --git a/tests/baselines/reference/u-invalid-non-empty-class-ranges.types b/tests/baselines/reference/u-invalid-non-empty-class-ranges.types new file mode 100644 index 0000000000000..c917a91fafc52 --- /dev/null +++ b/tests/baselines/reference/u-invalid-non-empty-class-ranges.types @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges.ts] //// + +=== u-invalid-non-empty-class-ranges.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[--\d]/u; +>/[--\d]/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-oob-decimal-escape.errors.txt b/tests/baselines/reference/u-invalid-oob-decimal-escape.errors.txt new file mode 100644 index 0000000000000..bb995f3ec0477 --- /dev/null +++ b/tests/baselines/reference/u-invalid-oob-decimal-escape.errors.txt @@ -0,0 +1,29 @@ +u-invalid-oob-decimal-escape.ts(19,3): error TS1532: Decimal escapes are invalid when there are no capturing groups in a regular expression. +u-invalid-oob-decimal-escape.ts(19,5): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-oob-decimal-escape.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-pattern-semantics + es6id: 21.2.2 + description: Out-of-bounds decimal escapes + info: | + 1. Evaluate DecimalEscape to obtain an integer n. + 2. If n>NcapturingParens, throw a SyntaxError exception. + + When the "unicode" flag is set, this algorithm is honored irrespective of + the presence of Annex B extensions. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /\8/u; + ~ +!!! error TS1532: Decimal escapes are invalid when there are no capturing groups in a regular expression. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-oob-decimal-escape.js b/tests/baselines/reference/u-invalid-oob-decimal-escape.js new file mode 100644 index 0000000000000..8ba838cf3f579 --- /dev/null +++ b/tests/baselines/reference/u-invalid-oob-decimal-escape.js @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-oob-decimal-escape.ts] //// + +//// [u-invalid-oob-decimal-escape.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: Out-of-bounds decimal escapes +info: | + 1. Evaluate DecimalEscape to obtain an integer n. + 2. If n>NcapturingParens, throw a SyntaxError exception. + + When the "unicode" flag is set, this algorithm is honored irrespective of + the presence of Annex B extensions. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\8/u; + + +//// [u-invalid-oob-decimal-escape.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: Out-of-bounds decimal escapes +info: | + 1. Evaluate DecimalEscape to obtain an integer n. + 2. If n>NcapturingParens, throw a SyntaxError exception. + + When the "unicode" flag is set, this algorithm is honored irrespective of + the presence of Annex B extensions. +negative: + phase: parse + type: SyntaxError +---*/ +/\8/u; diff --git a/tests/baselines/reference/u-invalid-oob-decimal-escape.symbols b/tests/baselines/reference/u-invalid-oob-decimal-escape.symbols new file mode 100644 index 0000000000000..cb18b36eed167 --- /dev/null +++ b/tests/baselines/reference/u-invalid-oob-decimal-escape.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-oob-decimal-escape.ts] //// + +=== u-invalid-oob-decimal-escape.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: Out-of-bounds decimal escapes +info: | + 1. Evaluate DecimalEscape to obtain an integer n. + 2. If n>NcapturingParens, throw a SyntaxError exception. + + When the "unicode" flag is set, this algorithm is honored irrespective of + the presence of Annex B extensions. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\8/u; + diff --git a/tests/baselines/reference/u-invalid-oob-decimal-escape.types b/tests/baselines/reference/u-invalid-oob-decimal-escape.types new file mode 100644 index 0000000000000..78df3f939fad2 --- /dev/null +++ b/tests/baselines/reference/u-invalid-oob-decimal-escape.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-oob-decimal-escape.ts] //// + +=== u-invalid-oob-decimal-escape.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: Out-of-bounds decimal escapes +info: | + 1. Evaluate DecimalEscape to obtain an integer n. + 2. If n>NcapturingParens, throw a SyntaxError exception. + + When the "unicode" flag is set, this algorithm is honored irrespective of + the presence of Annex B extensions. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\8/u; +>/\8/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-optional-lookahead.errors.txt b/tests/baselines/reference/u-invalid-optional-lookahead.errors.txt new file mode 100644 index 0000000000000..302776048e1ba --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-lookahead.errors.txt @@ -0,0 +1,29 @@ +u-invalid-optional-lookahead.ts(19,8): error TS1505: There is nothing available for repetition. +u-invalid-optional-lookahead.ts(19,10): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-optional-lookahead.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-regular-expressions-patterns + es6id: B.1.4 + description: Quantifiable assertions disallowed with `u` flag + info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier + negative: + phase: parse + type: SyntaxError + ---*/ + + + /.(?=.)?/u; + ~ +!!! error TS1505: There is nothing available for repetition. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-optional-lookahead.js b/tests/baselines/reference/u-invalid-optional-lookahead.js new file mode 100644 index 0000000000000..85fd16ec2e201 --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-lookahead.js @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookahead.ts] //// + +//// [u-invalid-optional-lookahead.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?=.)?/u; + + +//// [u-invalid-optional-lookahead.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ +/.(?=.)?/u; diff --git a/tests/baselines/reference/u-invalid-optional-lookahead.symbols b/tests/baselines/reference/u-invalid-optional-lookahead.symbols new file mode 100644 index 0000000000000..7474832465ff3 --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-lookahead.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookahead.ts] //// + +=== u-invalid-optional-lookahead.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?=.)?/u; + diff --git a/tests/baselines/reference/u-invalid-optional-lookahead.types b/tests/baselines/reference/u-invalid-optional-lookahead.types new file mode 100644 index 0000000000000..1b7b0dc2af70e --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-lookahead.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookahead.ts] //// + +=== u-invalid-optional-lookahead.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?=.)?/u; +>/.(?=.)?/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-optional-lookbehind.errors.txt b/tests/baselines/reference/u-invalid-optional-lookbehind.errors.txt new file mode 100644 index 0000000000000..8f03d851b4343 --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-lookbehind.errors.txt @@ -0,0 +1,29 @@ +u-invalid-optional-lookbehind.ts(19,9): error TS1505: There is nothing available for repetition. +u-invalid-optional-lookbehind.ts(19,11): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-optional-lookbehind.ts (2 errors) ==== + // Copyright (C) 2018 Igalia S. L. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-regular-expressions-patterns + description: Lookbehinds are not treated as a QuantifiableAssertion + info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) + negative: + phase: parse + type: SyntaxError + ---*/ + + + /.(?<=.)?/u; + ~ +!!! error TS1505: There is nothing available for repetition. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-optional-lookbehind.js b/tests/baselines/reference/u-invalid-optional-lookbehind.js new file mode 100644 index 0000000000000..6c65078e3b22e --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-lookbehind.js @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookbehind.ts] //// + +//// [u-invalid-optional-lookbehind.ts] +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.)?/u; + + +//// [u-invalid-optional-lookbehind.js] +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ +/.(?<=.)?/u; diff --git a/tests/baselines/reference/u-invalid-optional-lookbehind.symbols b/tests/baselines/reference/u-invalid-optional-lookbehind.symbols new file mode 100644 index 0000000000000..911be6862522a --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-lookbehind.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookbehind.ts] //// + +=== u-invalid-optional-lookbehind.ts === + +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.)?/u; + diff --git a/tests/baselines/reference/u-invalid-optional-lookbehind.types b/tests/baselines/reference/u-invalid-optional-lookbehind.types new file mode 100644 index 0000000000000..595db0378f4e5 --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-lookbehind.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookbehind.ts] //// + +=== u-invalid-optional-lookbehind.ts === +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.)?/u; +>/.(?<=.)?/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-optional-negative-lookahead.errors.txt b/tests/baselines/reference/u-invalid-optional-negative-lookahead.errors.txt new file mode 100644 index 0000000000000..31b748f78a0ee --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-negative-lookahead.errors.txt @@ -0,0 +1,29 @@ +u-invalid-optional-negative-lookahead.ts(19,8): error TS1505: There is nothing available for repetition. +u-invalid-optional-negative-lookahead.ts(19,10): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-optional-negative-lookahead.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-regular-expressions-patterns + es6id: B.1.4 + description: Quantifiable assertions disallowed with `u` flag + info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier + negative: + phase: parse + type: SyntaxError + ---*/ + + + /.(?!.)?/u; + ~ +!!! error TS1505: There is nothing available for repetition. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-optional-negative-lookahead.js b/tests/baselines/reference/u-invalid-optional-negative-lookahead.js new file mode 100644 index 0000000000000..fdcf77ae12d36 --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-negative-lookahead.js @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-negative-lookahead.ts] //// + +//// [u-invalid-optional-negative-lookahead.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?!.)?/u; + + +//// [u-invalid-optional-negative-lookahead.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ +/.(?!.)?/u; diff --git a/tests/baselines/reference/u-invalid-optional-negative-lookahead.symbols b/tests/baselines/reference/u-invalid-optional-negative-lookahead.symbols new file mode 100644 index 0000000000000..77cbc94f646ad --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-negative-lookahead.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-negative-lookahead.ts] //// + +=== u-invalid-optional-negative-lookahead.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?!.)?/u; + diff --git a/tests/baselines/reference/u-invalid-optional-negative-lookahead.types b/tests/baselines/reference/u-invalid-optional-negative-lookahead.types new file mode 100644 index 0000000000000..c611c82e6b7fc --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-negative-lookahead.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-negative-lookahead.ts] //// + +=== u-invalid-optional-negative-lookahead.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?!.)?/u; +>/.(?!.)?/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-optional-negative-lookbehind.errors.txt b/tests/baselines/reference/u-invalid-optional-negative-lookbehind.errors.txt new file mode 100644 index 0000000000000..59a7fa2c6eafc --- /dev/null +++ b/tests/baselines/reference/u-invalid-optional-negative-lookbehind.errors.txt @@ -0,0 +1,29 @@ +u-invalid-optional-negative-lookbehind.ts(19,9): error TS1505: There is nothing available for repetition. +u-invalid-optional-negative-lookbehind.ts(19,11): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-optional-negative-lookbehind.ts (2 errors) ==== + // Copyright (C) 2018 Igalia S. L. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-regular-expressions-patterns + description: Lookbehinds are not treated as a QuantifiableAssertion + info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) + negative: + phase: parse + type: SyntaxError + ---*/ + + + /.(?/.(?/.(?=.){2,3}/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-range-lookbehind.errors.txt b/tests/baselines/reference/u-invalid-range-lookbehind.errors.txt new file mode 100644 index 0000000000000..a527b8cd65a1b --- /dev/null +++ b/tests/baselines/reference/u-invalid-range-lookbehind.errors.txt @@ -0,0 +1,29 @@ +u-invalid-range-lookbehind.ts(19,9): error TS1505: There is nothing available for repetition. +u-invalid-range-lookbehind.ts(19,15): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-range-lookbehind.ts (2 errors) ==== + // Copyright (C) 2018 Igalia S. L. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-regular-expressions-patterns + description: Lookbehinds are not treated as a QuantifiableAssertion + info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) + negative: + phase: parse + type: SyntaxError + ---*/ + + + /.(?<=.){2,3}/u; + ~~~~~ +!!! error TS1505: There is nothing available for repetition. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-range-lookbehind.js b/tests/baselines/reference/u-invalid-range-lookbehind.js new file mode 100644 index 0000000000000..0dc127b0794ed --- /dev/null +++ b/tests/baselines/reference/u-invalid-range-lookbehind.js @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-range-lookbehind.ts] //// + +//// [u-invalid-range-lookbehind.ts] +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.){2,3}/u; + + +//// [u-invalid-range-lookbehind.js] +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ +/.(?<=.){2,3}/u; diff --git a/tests/baselines/reference/u-invalid-range-lookbehind.symbols b/tests/baselines/reference/u-invalid-range-lookbehind.symbols new file mode 100644 index 0000000000000..1a60a4c63dce1 --- /dev/null +++ b/tests/baselines/reference/u-invalid-range-lookbehind.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-range-lookbehind.ts] //// + +=== u-invalid-range-lookbehind.ts === + +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.){2,3}/u; + diff --git a/tests/baselines/reference/u-invalid-range-lookbehind.types b/tests/baselines/reference/u-invalid-range-lookbehind.types new file mode 100644 index 0000000000000..131e23e6cf4a1 --- /dev/null +++ b/tests/baselines/reference/u-invalid-range-lookbehind.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-range-lookbehind.ts] //// + +=== u-invalid-range-lookbehind.ts === +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.){2,3}/u; +>/.(?<=.){2,3}/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-range-negative-lookahead.errors.txt b/tests/baselines/reference/u-invalid-range-negative-lookahead.errors.txt new file mode 100644 index 0000000000000..9d486247eb8d0 --- /dev/null +++ b/tests/baselines/reference/u-invalid-range-negative-lookahead.errors.txt @@ -0,0 +1,29 @@ +u-invalid-range-negative-lookahead.ts(19,8): error TS1505: There is nothing available for repetition. +u-invalid-range-negative-lookahead.ts(19,14): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-range-negative-lookahead.ts (2 errors) ==== + // Copyright (C) 2016 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-regular-expressions-patterns + es6id: B.1.4 + description: Quantifiable assertions disallowed with `u` flag + info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier + negative: + phase: parse + type: SyntaxError + ---*/ + + + /.(?!.){2,3}/u; + ~~~~~ +!!! error TS1505: There is nothing available for repetition. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-invalid-range-negative-lookahead.js b/tests/baselines/reference/u-invalid-range-negative-lookahead.js new file mode 100644 index 0000000000000..a76869977c434 --- /dev/null +++ b/tests/baselines/reference/u-invalid-range-negative-lookahead.js @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-range-negative-lookahead.ts] //// + +//// [u-invalid-range-negative-lookahead.ts] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?!.){2,3}/u; + + +//// [u-invalid-range-negative-lookahead.js] +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ +/.(?!.){2,3}/u; diff --git a/tests/baselines/reference/u-invalid-range-negative-lookahead.symbols b/tests/baselines/reference/u-invalid-range-negative-lookahead.symbols new file mode 100644 index 0000000000000..d97d8bf9c9bb6 --- /dev/null +++ b/tests/baselines/reference/u-invalid-range-negative-lookahead.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-range-negative-lookahead.ts] //// + +=== u-invalid-range-negative-lookahead.ts === + +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?!.){2,3}/u; + diff --git a/tests/baselines/reference/u-invalid-range-negative-lookahead.types b/tests/baselines/reference/u-invalid-range-negative-lookahead.types new file mode 100644 index 0000000000000..4548e5b2e38a6 --- /dev/null +++ b/tests/baselines/reference/u-invalid-range-negative-lookahead.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-invalid-range-negative-lookahead.ts] //// + +=== u-invalid-range-negative-lookahead.ts === +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?!.){2,3}/u; +>/.(?!.){2,3}/u : RegExp + diff --git a/tests/baselines/reference/u-invalid-range-negative-lookbehind.errors.txt b/tests/baselines/reference/u-invalid-range-negative-lookbehind.errors.txt new file mode 100644 index 0000000000000..bf2389105956d --- /dev/null +++ b/tests/baselines/reference/u-invalid-range-negative-lookbehind.errors.txt @@ -0,0 +1,29 @@ +u-invalid-range-negative-lookbehind.ts(19,9): error TS1505: There is nothing available for repetition. +u-invalid-range-negative-lookbehind.ts(19,15): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-invalid-range-negative-lookbehind.ts (2 errors) ==== + // Copyright (C) 2018 Igalia S. L. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + /*--- + esid: sec-regular-expressions-patterns + description: Lookbehinds are not treated as a QuantifiableAssertion + info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) + negative: + phase: parse + type: SyntaxError + ---*/ + + + /.(?/.(? 1114111. + negative: + phase: parse + type: SyntaxError + ---*/ + + + /\u{110000}/u; + ~~~~~~ +!!! error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive. + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-unicode-esc-bounds.js b/tests/baselines/reference/u-unicode-esc-bounds.js new file mode 100644 index 0000000000000..13a15d044bac8 --- /dev/null +++ b/tests/baselines/reference/u-unicode-esc-bounds.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-unicode-esc-bounds.ts] //// + +//// [u-unicode-esc-bounds.ts] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Out-of-range value of hexadecimal digits in UnicodeEscapeSequence +es6id: 21.2.1.1 +info: | + 21.2.1.1 Static Semantics: Early Errors + + RegExpUnicodeEscapeSequence :: u{ HexDigits } + + - It is a Syntax Error if the MV of HexDigits > 1114111. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{110000}/u; + + +//// [u-unicode-esc-bounds.js] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Out-of-range value of hexadecimal digits in UnicodeEscapeSequence +es6id: 21.2.1.1 +info: | + 21.2.1.1 Static Semantics: Early Errors + + RegExpUnicodeEscapeSequence :: u{ HexDigits } + + - It is a Syntax Error if the MV of HexDigits > 1114111. +negative: + phase: parse + type: SyntaxError +---*/ +/\u{110000}/u; diff --git a/tests/baselines/reference/u-unicode-esc-bounds.symbols b/tests/baselines/reference/u-unicode-esc-bounds.symbols new file mode 100644 index 0000000000000..ca40441434186 --- /dev/null +++ b/tests/baselines/reference/u-unicode-esc-bounds.symbols @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-unicode-esc-bounds.ts] //// + +=== u-unicode-esc-bounds.ts === + +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Out-of-range value of hexadecimal digits in UnicodeEscapeSequence +es6id: 21.2.1.1 +info: | + 21.2.1.1 Static Semantics: Early Errors + + RegExpUnicodeEscapeSequence :: u{ HexDigits } + + - It is a Syntax Error if the MV of HexDigits > 1114111. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{110000}/u; + diff --git a/tests/baselines/reference/u-unicode-esc-bounds.types b/tests/baselines/reference/u-unicode-esc-bounds.types new file mode 100644 index 0000000000000..f330eb7ed92a5 --- /dev/null +++ b/tests/baselines/reference/u-unicode-esc-bounds.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-unicode-esc-bounds.ts] //// + +=== u-unicode-esc-bounds.ts === +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Out-of-range value of hexadecimal digits in UnicodeEscapeSequence +es6id: 21.2.1.1 +info: | + 21.2.1.1 Static Semantics: Early Errors + + RegExpUnicodeEscapeSequence :: u{ HexDigits } + + - It is a Syntax Error if the MV of HexDigits > 1114111. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{110000}/u; +>/\u{110000}/u : RegExp + diff --git a/tests/baselines/reference/u-unicode-esc-non-hex.errors.txt b/tests/baselines/reference/u-unicode-esc-non-hex.errors.txt new file mode 100644 index 0000000000000..bfea4bca62853 --- /dev/null +++ b/tests/baselines/reference/u-unicode-esc-non-hex.errors.txt @@ -0,0 +1,27 @@ +u-unicode-esc-non-hex.ts(14,6): error TS1199: Unterminated Unicode escape sequence. +u-unicode-esc-non-hex.ts(14,7): error TS1506: Unexpected '}'. Did you mean to escape it with backslash? +u-unicode-esc-non-hex.ts(14,9): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== u-unicode-esc-non-hex.ts (3 errors) ==== + // Copyright (C) 2015 the V8 project authors. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + description: > + Non-hexadecimal value within the delimiters of a UnicodeEscapeSequence + es6id: 21.2.1 + negative: + phase: parse + type: SyntaxError + ---*/ + + + /\u{1,}/u; + +!!! error TS1199: Unterminated Unicode escape sequence. + ~ +!!! error TS1506: Unexpected '}'. Did you mean to escape it with backslash? + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/u-unicode-esc-non-hex.js b/tests/baselines/reference/u-unicode-esc-non-hex.js new file mode 100644 index 0000000000000..070691621dfbf --- /dev/null +++ b/tests/baselines/reference/u-unicode-esc-non-hex.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-unicode-esc-non-hex.ts] //// + +//// [u-unicode-esc-non-hex.ts] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: > + Non-hexadecimal value within the delimiters of a UnicodeEscapeSequence +es6id: 21.2.1 +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{1,}/u; + + +//// [u-unicode-esc-non-hex.js] +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + Non-hexadecimal value within the delimiters of a UnicodeEscapeSequence +es6id: 21.2.1 +negative: + phase: parse + type: SyntaxError +---*/ +/\u{1,}/u; diff --git a/tests/baselines/reference/u-unicode-esc-non-hex.symbols b/tests/baselines/reference/u-unicode-esc-non-hex.symbols new file mode 100644 index 0000000000000..ec77d08b0e9f2 --- /dev/null +++ b/tests/baselines/reference/u-unicode-esc-non-hex.symbols @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-unicode-esc-non-hex.ts] //// + +=== u-unicode-esc-non-hex.ts === + +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: > + Non-hexadecimal value within the delimiters of a UnicodeEscapeSequence +es6id: 21.2.1 +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{1,}/u; + diff --git a/tests/baselines/reference/u-unicode-esc-non-hex.types b/tests/baselines/reference/u-unicode-esc-non-hex.types new file mode 100644 index 0000000000000..c197dbc01e423 --- /dev/null +++ b/tests/baselines/reference/u-unicode-esc-non-hex.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/u-unicode-esc-non-hex.ts] //// + +=== u-unicode-esc-non-hex.ts === +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: > + Non-hexadecimal value within the delimiters of a UnicodeEscapeSequence +es6id: 21.2.1 +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{1,}/u; +>/\u{1,}/u : RegExp + diff --git a/tests/baselines/reference/unicode-escape-nls-err-double.errors.txt b/tests/baselines/reference/unicode-escape-nls-err-double.errors.txt new file mode 100644 index 0000000000000..bfa63b383543c --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err-double.errors.txt @@ -0,0 +1,55 @@ +unicode-escape-nls-err-double.ts(48,7): error TS1199: Unterminated Unicode escape sequence. + + +==== unicode-escape-nls-err-double.ts (1 errors) ==== + // Copyright (C) 2017 Valerie Young. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-StringLiteral + description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) + info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + DoubleStringCharacters:: + DoubleStringCharacter DoubleStringCharacters opt + + DoubleStringCharacter:: + SourceCharacter but not one of " or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + + features: [numeric-separator-literal] + negative: + phase: parse + type: SyntaxError + ---*/ + + + "\u{1F_639}" + +!!! error TS1199: Unterminated Unicode escape sequence. + \ No newline at end of file diff --git a/tests/baselines/reference/unicode-escape-nls-err-double.js b/tests/baselines/reference/unicode-escape-nls-err-double.js new file mode 100644 index 0000000000000..f3afad66c76de --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err-double.js @@ -0,0 +1,99 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-double.ts] //// + +//// [unicode-escape-nls-err-double.ts] +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) +info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + DoubleStringCharacters:: + DoubleStringCharacter DoubleStringCharacters opt + + DoubleStringCharacter:: + SourceCharacter but not one of " or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +"\u{1F_639}" + + +//// [unicode-escape-nls-err-double.js] +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-StringLiteral +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) +info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + DoubleStringCharacters:: + DoubleStringCharacter DoubleStringCharacters opt + + DoubleStringCharacter:: + SourceCharacter but not one of " or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ +"\u{1F_639}"; diff --git a/tests/baselines/reference/unicode-escape-nls-err-double.symbols b/tests/baselines/reference/unicode-escape-nls-err-double.symbols new file mode 100644 index 0000000000000..9f7ac04de9967 --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err-double.symbols @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-double.ts] //// + +=== unicode-escape-nls-err-double.ts === + +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) +info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + DoubleStringCharacters:: + DoubleStringCharacter DoubleStringCharacters opt + + DoubleStringCharacter:: + SourceCharacter but not one of " or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +"\u{1F_639}" + diff --git a/tests/baselines/reference/unicode-escape-nls-err-double.types b/tests/baselines/reference/unicode-escape-nls-err-double.types new file mode 100644 index 0000000000000..c9dd48aa7d89f --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err-double.types @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-double.ts] //// + +=== unicode-escape-nls-err-double.ts === +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) +info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + DoubleStringCharacters:: + DoubleStringCharacter DoubleStringCharacters opt + + DoubleStringCharacter:: + SourceCharacter but not one of " or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +"\u{1F_639}" +>"\u{1F_639}" : "\\u{1F_639}" + diff --git a/tests/baselines/reference/unicode-escape-nls-err-single.errors.txt b/tests/baselines/reference/unicode-escape-nls-err-single.errors.txt new file mode 100644 index 0000000000000..0c42d15f6eac4 --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err-single.errors.txt @@ -0,0 +1,55 @@ +unicode-escape-nls-err-single.ts(48,7): error TS1199: Unterminated Unicode escape sequence. + + +==== unicode-escape-nls-err-single.ts (1 errors) ==== + // Copyright (C) 2017 Valerie Young. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-StringLiteral + description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) + info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + SingleStringCharacters:: + SingleStringCharacterSingleStringCharactersopt + + SingleStringCharacter:: + SourceCharacterbut not one of ' or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + + features: [numeric-separator-literal] + negative: + phase: parse + type: SyntaxError + ---*/ + + + '\u{1F_639}'; + +!!! error TS1199: Unterminated Unicode escape sequence. + \ No newline at end of file diff --git a/tests/baselines/reference/unicode-escape-nls-err-single.js b/tests/baselines/reference/unicode-escape-nls-err-single.js new file mode 100644 index 0000000000000..a27556af7754b --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err-single.js @@ -0,0 +1,99 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-single.ts] //// + +//// [unicode-escape-nls-err-single.ts] +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) +info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + SingleStringCharacters:: + SingleStringCharacterSingleStringCharactersopt + + SingleStringCharacter:: + SourceCharacterbut not one of ' or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\u{1F_639}'; + + +//// [unicode-escape-nls-err-single.js] +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-StringLiteral +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) +info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + SingleStringCharacters:: + SingleStringCharacterSingleStringCharactersopt + + SingleStringCharacter:: + SourceCharacterbut not one of ' or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ +'\u{1F_639}'; diff --git a/tests/baselines/reference/unicode-escape-nls-err-single.symbols b/tests/baselines/reference/unicode-escape-nls-err-single.symbols new file mode 100644 index 0000000000000..ae00d73eb1e18 --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err-single.symbols @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-single.ts] //// + +=== unicode-escape-nls-err-single.ts === + +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) +info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + SingleStringCharacters:: + SingleStringCharacterSingleStringCharactersopt + + SingleStringCharacter:: + SourceCharacterbut not one of ' or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\u{1F_639}'; + diff --git a/tests/baselines/reference/unicode-escape-nls-err-single.types b/tests/baselines/reference/unicode-escape-nls-err-single.types new file mode 100644 index 0000000000000..292f0b5d141a4 --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err-single.types @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-single.ts] //// + +=== unicode-escape-nls-err-single.ts === +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) +info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + SingleStringCharacters:: + SingleStringCharacterSingleStringCharactersopt + + SingleStringCharacter:: + SourceCharacterbut not one of ' or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\u{1F_639}'; +>'\u{1F_639}' : "\\u{1F_639}" + diff --git a/tests/baselines/reference/unicode-escape-nls-err.errors.txt b/tests/baselines/reference/unicode-escape-nls-err.errors.txt new file mode 100644 index 0000000000000..66b9d81859bbf --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err.errors.txt @@ -0,0 +1,85 @@ +unicode-escape-nls-err.ts(72,7): error TS1199: Unterminated Unicode escape sequence. +unicode-escape-nls-err.ts(72,11): error TS1506: Unexpected '}'. Did you mean to escape it with backslash? +unicode-escape-nls-err.ts(72,13): error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + + +==== unicode-escape-nls-err.ts (3 errors) ==== + // Copyright (C) 2017 Valerie Young. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-Pattern + description: NumericLiteralSeperator disallowed in unicode CodePoint sequence + info: | + Pattern[U, N]:: + Disjunction[?U, ?N] + + Disjunction[U, N]:: + Alternative[?U, ?N] + Alternative[?U, ?N]|Disjunction[?U, ?N] + + Alternative[U, N]:: + [empty] + Alternative[?U, ?N]Term[?U, ?N] + + Term[U, N]:: + Assertion[?U, ?N] + Atom[?U, ?N] + Atom[?U, ?N]Quantifier + + Atom[U, N]:: + PatternCharacter + . + \AtomEscape[?U, ?N] + CharacterClass[?U] + (GroupSpecifier[?U]Disjunction[?U, ?N]) + (?:Disjunction[?U, ?N]) + + AtomEscape[U, N]:: + DecimalEscape + CharacterClassEscape[?U] + CharacterEscape[?U] + [+N]kGroupName[?U] + + CharacterEscape[U]:: + ControlEscape + cControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] + + RegExpUnicodeEscapeSequence[U]:: + [+U]uLeadSurrogate\uTrailSurrogate + [+U]uLeadSurrogate + [+U]uTrailSurrogate + [+U]uNonSurrogate + [~U]uHex4Digits + [+U]u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + + features: [numeric-separator-literal] + negative: + phase: parse + type: SyntaxError + ---*/ + + + /\u{1F_639}/u; + +!!! error TS1199: Unterminated Unicode escape sequence. + ~ +!!! error TS1506: Unexpected '}'. Did you mean to escape it with backslash? + ~ +!!! error TS1499: This regular expression flag is only available when targeting 'ES2015' or later. + \ No newline at end of file diff --git a/tests/baselines/reference/unicode-escape-nls-err.js b/tests/baselines/reference/unicode-escape-nls-err.js new file mode 100644 index 0000000000000..1708ee5b767ac --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err.js @@ -0,0 +1,147 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/unicode-escape-nls-err.ts] //// + +//// [unicode-escape-nls-err.ts] +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-Pattern +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence +info: | + Pattern[U, N]:: + Disjunction[?U, ?N] + + Disjunction[U, N]:: + Alternative[?U, ?N] + Alternative[?U, ?N]|Disjunction[?U, ?N] + + Alternative[U, N]:: + [empty] + Alternative[?U, ?N]Term[?U, ?N] + + Term[U, N]:: + Assertion[?U, ?N] + Atom[?U, ?N] + Atom[?U, ?N]Quantifier + + Atom[U, N]:: + PatternCharacter + . + \AtomEscape[?U, ?N] + CharacterClass[?U] + (GroupSpecifier[?U]Disjunction[?U, ?N]) + (?:Disjunction[?U, ?N]) + + AtomEscape[U, N]:: + DecimalEscape + CharacterClassEscape[?U] + CharacterEscape[?U] + [+N]kGroupName[?U] + + CharacterEscape[U]:: + ControlEscape + cControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] + + RegExpUnicodeEscapeSequence[U]:: + [+U]uLeadSurrogate\uTrailSurrogate + [+U]uLeadSurrogate + [+U]uTrailSurrogate + [+U]uNonSurrogate + [~U]uHex4Digits + [+U]u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{1F_639}/u; + + +//// [unicode-escape-nls-err.js] +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-Pattern +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence +info: | + Pattern[U, N]:: + Disjunction[?U, ?N] + + Disjunction[U, N]:: + Alternative[?U, ?N] + Alternative[?U, ?N]|Disjunction[?U, ?N] + + Alternative[U, N]:: + [empty] + Alternative[?U, ?N]Term[?U, ?N] + + Term[U, N]:: + Assertion[?U, ?N] + Atom[?U, ?N] + Atom[?U, ?N]Quantifier + + Atom[U, N]:: + PatternCharacter + . + \AtomEscape[?U, ?N] + CharacterClass[?U] + (GroupSpecifier[?U]Disjunction[?U, ?N]) + (?:Disjunction[?U, ?N]) + + AtomEscape[U, N]:: + DecimalEscape + CharacterClassEscape[?U] + CharacterEscape[?U] + [+N]kGroupName[?U] + + CharacterEscape[U]:: + ControlEscape + cControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] + + RegExpUnicodeEscapeSequence[U]:: + [+U]uLeadSurrogate\uTrailSurrogate + [+U]uLeadSurrogate + [+U]uTrailSurrogate + [+U]uNonSurrogate + [~U]uHex4Digits + [+U]u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ +/\u{1F_639}/u; diff --git a/tests/baselines/reference/unicode-escape-nls-err.symbols b/tests/baselines/reference/unicode-escape-nls-err.symbols new file mode 100644 index 0000000000000..3e19c3e7b3470 --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err.symbols @@ -0,0 +1,77 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/unicode-escape-nls-err.ts] //// + +=== unicode-escape-nls-err.ts === + +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-Pattern +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence +info: | + Pattern[U, N]:: + Disjunction[?U, ?N] + + Disjunction[U, N]:: + Alternative[?U, ?N] + Alternative[?U, ?N]|Disjunction[?U, ?N] + + Alternative[U, N]:: + [empty] + Alternative[?U, ?N]Term[?U, ?N] + + Term[U, N]:: + Assertion[?U, ?N] + Atom[?U, ?N] + Atom[?U, ?N]Quantifier + + Atom[U, N]:: + PatternCharacter + . + \AtomEscape[?U, ?N] + CharacterClass[?U] + (GroupSpecifier[?U]Disjunction[?U, ?N]) + (?:Disjunction[?U, ?N]) + + AtomEscape[U, N]:: + DecimalEscape + CharacterClassEscape[?U] + CharacterEscape[?U] + [+N]kGroupName[?U] + + CharacterEscape[U]:: + ControlEscape + cControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] + + RegExpUnicodeEscapeSequence[U]:: + [+U]uLeadSurrogate\uTrailSurrogate + [+U]uLeadSurrogate + [+U]uTrailSurrogate + [+U]uNonSurrogate + [~U]uHex4Digits + [+U]u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{1F_639}/u; + diff --git a/tests/baselines/reference/unicode-escape-nls-err.types b/tests/baselines/reference/unicode-escape-nls-err.types new file mode 100644 index 0000000000000..6287b37f025ed --- /dev/null +++ b/tests/baselines/reference/unicode-escape-nls-err.types @@ -0,0 +1,77 @@ +//// [tests/cases/conformance/test262/language/literals/regexp/unicode-escape-nls-err.ts] //// + +=== unicode-escape-nls-err.ts === +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-Pattern +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence +info: | + Pattern[U, N]:: + Disjunction[?U, ?N] + + Disjunction[U, N]:: + Alternative[?U, ?N] + Alternative[?U, ?N]|Disjunction[?U, ?N] + + Alternative[U, N]:: + [empty] + Alternative[?U, ?N]Term[?U, ?N] + + Term[U, N]:: + Assertion[?U, ?N] + Atom[?U, ?N] + Atom[?U, ?N]Quantifier + + Atom[U, N]:: + PatternCharacter + . + \AtomEscape[?U, ?N] + CharacterClass[?U] + (GroupSpecifier[?U]Disjunction[?U, ?N]) + (?:Disjunction[?U, ?N]) + + AtomEscape[U, N]:: + DecimalEscape + CharacterClassEscape[?U] + CharacterEscape[?U] + [+N]kGroupName[?U] + + CharacterEscape[U]:: + ControlEscape + cControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] + + RegExpUnicodeEscapeSequence[U]:: + [+U]uLeadSurrogate\uTrailSurrogate + [+U]uLeadSurrogate + [+U]uTrailSurrogate + [+U]uNonSurrogate + [~U]uHex4Digits + [+U]u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{1F_639}/u; +>/\u{1F_639}/u : RegExp + diff --git a/tests/baselines/reference/unicode-escape-no-hex-err-double.errors.txt b/tests/baselines/reference/unicode-escape-no-hex-err-double.errors.txt new file mode 100644 index 0000000000000..c5eae25e663a9 --- /dev/null +++ b/tests/baselines/reference/unicode-escape-no-hex-err-double.errors.txt @@ -0,0 +1,52 @@ +unicode-escape-no-hex-err-double.ts(45,4): error TS1125: Hexadecimal digit expected. + + +==== unicode-escape-no-hex-err-double.ts (1 errors) ==== + // Copyright (C) 2020 Alexey Shvayka. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-StringLiteral + description: > + \u is at the end of string, Hex4Digits is required. + info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + DoubleStringCharacters :: + DoubleStringCharacter DoubleStringCharacters_opt + + DoubleStringCharacter :: + SourceCharacter but not one of " or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + + negative: + phase: parse + type: SyntaxError + ---*/ + + + "\u" + +!!! error TS1125: Hexadecimal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/unicode-escape-no-hex-err-double.js b/tests/baselines/reference/unicode-escape-no-hex-err-double.js new file mode 100644 index 0000000000000..58306c7e1351a --- /dev/null +++ b/tests/baselines/reference/unicode-escape-no-hex-err-double.js @@ -0,0 +1,93 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-double.ts] //// + +//// [unicode-escape-no-hex-err-double.ts] +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: > + \u is at the end of string, Hex4Digits is required. +info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + DoubleStringCharacters :: + DoubleStringCharacter DoubleStringCharacters_opt + + DoubleStringCharacter :: + SourceCharacter but not one of " or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +---*/ + + +"\u" + + +//// [unicode-escape-no-hex-err-double.js] +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-StringLiteral +description: > + \u is at the end of string, Hex4Digits is required. +info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + DoubleStringCharacters :: + DoubleStringCharacter DoubleStringCharacters_opt + + DoubleStringCharacter :: + SourceCharacter but not one of " or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +---*/ +"\u"; diff --git a/tests/baselines/reference/unicode-escape-no-hex-err-double.symbols b/tests/baselines/reference/unicode-escape-no-hex-err-double.symbols new file mode 100644 index 0000000000000..71af11afa4613 --- /dev/null +++ b/tests/baselines/reference/unicode-escape-no-hex-err-double.symbols @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-double.ts] //// + +=== unicode-escape-no-hex-err-double.ts === + +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: > + \u is at the end of string, Hex4Digits is required. +info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + DoubleStringCharacters :: + DoubleStringCharacter DoubleStringCharacters_opt + + DoubleStringCharacter :: + SourceCharacter but not one of " or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +---*/ + + +"\u" + diff --git a/tests/baselines/reference/unicode-escape-no-hex-err-double.types b/tests/baselines/reference/unicode-escape-no-hex-err-double.types new file mode 100644 index 0000000000000..d0fa202193362 --- /dev/null +++ b/tests/baselines/reference/unicode-escape-no-hex-err-double.types @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-double.ts] //// + +=== unicode-escape-no-hex-err-double.ts === +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: > + \u is at the end of string, Hex4Digits is required. +info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + DoubleStringCharacters :: + DoubleStringCharacter DoubleStringCharacters_opt + + DoubleStringCharacter :: + SourceCharacter but not one of " or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +---*/ + + +"\u" +>"\u" : "\\u" + diff --git a/tests/baselines/reference/unicode-escape-no-hex-err-single.errors.txt b/tests/baselines/reference/unicode-escape-no-hex-err-single.errors.txt new file mode 100644 index 0000000000000..35916b40b2648 --- /dev/null +++ b/tests/baselines/reference/unicode-escape-no-hex-err-single.errors.txt @@ -0,0 +1,52 @@ +unicode-escape-no-hex-err-single.ts(45,4): error TS1125: Hexadecimal digit expected. + + +==== unicode-escape-no-hex-err-single.ts (1 errors) ==== + // Copyright (C) 2020 Alexey Shvayka. All rights reserved. + // This code is governed by the BSD license found in the LICENSE file. + + /*--- + esid: prod-StringLiteral + description: > + \u is at the end of string, Hex4Digits is required. + info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + SingleStringCharacters :: + SingleStringCharacter SingleStringCharacters_opt + + SingleStringCharacter :: + SourceCharacter but not one of ' or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + + negative: + phase: parse + type: SyntaxError + ---*/ + + + '\u' + +!!! error TS1125: Hexadecimal digit expected. + \ No newline at end of file diff --git a/tests/baselines/reference/unicode-escape-no-hex-err-single.js b/tests/baselines/reference/unicode-escape-no-hex-err-single.js new file mode 100644 index 0000000000000..a4705d9cbe7f0 --- /dev/null +++ b/tests/baselines/reference/unicode-escape-no-hex-err-single.js @@ -0,0 +1,93 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-single.ts] //// + +//// [unicode-escape-no-hex-err-single.ts] +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: > + \u is at the end of string, Hex4Digits is required. +info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + SingleStringCharacters :: + SingleStringCharacter SingleStringCharacters_opt + + SingleStringCharacter :: + SourceCharacter but not one of ' or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +---*/ + + +'\u' + + +//// [unicode-escape-no-hex-err-single.js] +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: prod-StringLiteral +description: > + \u is at the end of string, Hex4Digits is required. +info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + SingleStringCharacters :: + SingleStringCharacter SingleStringCharacters_opt + + SingleStringCharacter :: + SourceCharacter but not one of ' or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +---*/ +'\u'; diff --git a/tests/baselines/reference/unicode-escape-no-hex-err-single.symbols b/tests/baselines/reference/unicode-escape-no-hex-err-single.symbols new file mode 100644 index 0000000000000..ee86d83b6604e --- /dev/null +++ b/tests/baselines/reference/unicode-escape-no-hex-err-single.symbols @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-single.ts] //// + +=== unicode-escape-no-hex-err-single.ts === + +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: > + \u is at the end of string, Hex4Digits is required. +info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + SingleStringCharacters :: + SingleStringCharacter SingleStringCharacters_opt + + SingleStringCharacter :: + SourceCharacter but not one of ' or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +---*/ + + +'\u' + diff --git a/tests/baselines/reference/unicode-escape-no-hex-err-single.types b/tests/baselines/reference/unicode-escape-no-hex-err-single.types new file mode 100644 index 0000000000000..10f618524003f --- /dev/null +++ b/tests/baselines/reference/unicode-escape-no-hex-err-single.types @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-single.ts] //// + +=== unicode-escape-no-hex-err-single.ts === +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: > + \u is at the end of string, Hex4Digits is required. +info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + SingleStringCharacters :: + SingleStringCharacter SingleStringCharacters_opt + + SingleStringCharacter :: + SourceCharacter but not one of ' or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +---*/ + + +'\u' +>'\u' : "\\u" + diff --git a/tests/cases/conformance/test262/language/literals/bigint/bigint-binary-invalid-digit.ts b/tests/cases/conformance/test262/language/literals/bigint/bigint-binary-invalid-digit.ts new file mode 100644 index 0000000000000..72a0ab3cdf259 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/bigint-binary-invalid-digit.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Binary BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0b2n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/bigint-octal-invalid-digit.ts b/tests/cases/conformance/test262/language/literals/bigint/bigint-octal-invalid-digit.ts new file mode 100644 index 0000000000000..6a51c2e5623f6 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/bigint-octal-invalid-digit.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Octal BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0o9n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/exponent-part.ts b/tests/cases/conformance/test262/language/literals/bigint/exponent-part.ts new file mode 100644 index 0000000000000..5b732f9112275 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/exponent-part.ts @@ -0,0 +1,15 @@ +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: > + It is a Syntax Error if the NumericLiteralBase contains an ExponentPart. +esid: sec-numeric-literal-static-semantics-early-errors +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +0e0n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/hexadecimal-invalid-digit.ts b/tests/cases/conformance/test262/language/literals/bigint/hexadecimal-invalid-digit.ts new file mode 100644 index 0000000000000..84e285a810a01 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/hexadecimal-invalid-digit.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2017 Robin Templeton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Hexadecimal BigInt literal containing an invalid digit +esid: prod-NumericLiteral +info: | + NumericLiteral :: + NumericLiteralBase NumericLiteralSuffix + + NumericLiteralBase :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + NumericLiteralSuffix :: n +negative: + phase: parse + type: SyntaxError +features: [BigInt] +---*/ + + +0xgn; diff --git a/tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-00n.ts b/tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-00n.ts new file mode 100644 index 0000000000000..c8c60d9f3f6b1 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-00n.ts @@ -0,0 +1,27 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +00n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-01n.ts b/tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-01n.ts new file mode 100644 index 0000000000000..e3c7bc650a5d6 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-01n.ts @@ -0,0 +1,27 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +01n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-07n.ts b/tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-07n.ts new file mode 100644 index 0000000000000..a35f811a7bd16 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/legacy-octal-like-invalid-07n.ts @@ -0,0 +1,27 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in LegacyOctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + LegacyOctalIntegerLiteral + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +07n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dil-dot-dds.ts b/tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dil-dot-dds.ts new file mode 100644 index 0000000000000..eb5a8d27ab641 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dil-dot-dds.ts @@ -0,0 +1,26 @@ +// Copyright (C) 2017 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-numeric-literal-static-semantics-early-errors +description: > + It is a Syntax Error if the MV is not an integer. (decimalIntegerLiteral dot decimalDigits) +info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +2017.8n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dot-dds.ts b/tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dot-dds.ts new file mode 100644 index 0000000000000..52ade930ad9ed --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/mv-is-not-integer-dot-dds.ts @@ -0,0 +1,26 @@ +// Copyright (C) 2017 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-numeric-literal-static-semantics-early-errors +description: > + It is a Syntax Error if the MV is not an integer. (dot decimalDigits) +info: | + Static Semantics: BigInt Value + + NumericLiteral :: NumericLiteralBase NumericLiteralSuffix + + 1. Assert: NumericLiteralSuffix is n. + 2. Let the value of NumericLiteral be the MV of NumericLiteralBase represented as BigInt. + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt + . DecimalDigits +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +.0000000001n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-0008n.ts b/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-0008n.ts new file mode 100644 index 0000000000000..ff59230c8d7aa --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-0008n.ts @@ -0,0 +1,27 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +0008n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-012348n.ts b/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-012348n.ts new file mode 100644 index 0000000000000..101d05d6a7497 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-012348n.ts @@ -0,0 +1,27 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +012348n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-08n.ts b/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-08n.ts new file mode 100644 index 0000000000000..bbaeb606ac408 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-08n.ts @@ -0,0 +1,27 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +08n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-09n.ts b/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-09n.ts new file mode 100644 index 0000000000000..b125414afc4b0 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/non-octal-like-invalid-09n.ts @@ -0,0 +1,27 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteral +description: > + The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + + https://github.com/tc39/proposal-bigint/issues/208 + + NumericLiteral :: + DecimalBigIntegerLiteral + + DecimalBigIntegerLiteral :: + 0 BigIntLiteralSuffix + NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix +features: [BigInt] +negative: + phase: parse + type: SyntaxError +---*/ + + +09n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.ts new file mode 100644 index 0000000000000..ae3b11d861a79 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-bd-nsl-bd-err.ts @@ -0,0 +1,43 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b_1n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.ts new file mode 100644 index 0000000000000..89517ae0052db --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-dunder-err.ts @@ -0,0 +1,43 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b0__0n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-err.ts new file mode 100644 index 0000000000000..7ed0922fe95f1 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-bil-nsl-bd-err.ts @@ -0,0 +1,42 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral (before n) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0b0_n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.ts new file mode 100644 index 0000000000000..3dd98c34ad3e0 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-dds-dunder-err.ts @@ -0,0 +1,35 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1__0123456789n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-err.ts new file mode 100644 index 0000000000000..5cf872fa36616 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dd-nsl-err.ts @@ -0,0 +1,37 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1_n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.ts new file mode 100644 index 0000000000000..d6cb436b74ea0 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-dds-dunder-err.ts @@ -0,0 +1,35 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +10__0123456789n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-err.ts new file mode 100644 index 0000000000000..2c9a867a4b256 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-dds-nsl-err.ts @@ -0,0 +1,38 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +10_n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.ts new file mode 100644 index 0000000000000..f9f644b6eac40 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-hd-nsl-hd-err.ts @@ -0,0 +1,43 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x_1n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.ts new file mode 100644 index 0000000000000..381ce5e1cc1e9 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-dunder-err.ts @@ -0,0 +1,43 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x0__0n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-err.ts new file mode 100644 index 0000000000000..8e1177a8d68d3 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-hil-nsl-hd-err.ts @@ -0,0 +1,43 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0x0_n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-00-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-00-err.ts new file mode 100644 index 0000000000000..cd2f5d958552f --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-00-err.ts @@ -0,0 +1,51 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +00_0n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-01-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-01-err.ts new file mode 100644 index 0000000000000..16d88c7344732 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-01-err.ts @@ -0,0 +1,51 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +01_0n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-07-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-07-err.ts new file mode 100644 index 0000000000000..b0789a0b52b76 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-07-err.ts @@ -0,0 +1,53 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +07_0n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_0-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_0-err.ts new file mode 100644 index 0000000000000..8cbc9012c5720 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_0-err.ts @@ -0,0 +1,51 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_0n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_1-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_1-err.ts new file mode 100644 index 0000000000000..f6b5978808a1c --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_1-err.ts @@ -0,0 +1,51 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_1n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_7-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_7-err.ts new file mode 100644 index 0000000000000..f964556364a41 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-lol-0_7-err.ts @@ -0,0 +1,52 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_7n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-08-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-08-err.ts new file mode 100644 index 0000000000000..f0027f898e392 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-08-err.ts @@ -0,0 +1,48 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +08_0n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-09-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-09-err.ts new file mode 100644 index 0000000000000..ac70e3fc38ad8 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-09-err.ts @@ -0,0 +1,48 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +09_0n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_8-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_8-err.ts new file mode 100644 index 0000000000000..92c2c539ded63 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_8-err.ts @@ -0,0 +1,48 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_8n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_9-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_9-err.ts new file mode 100644 index 0000000000000..574cdc1c3feea --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nonoctal-0_9-err.ts @@ -0,0 +1,48 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_9n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts new file mode 100644 index 0000000000000..a29afc1f1b33a --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-dunder-err.ts @@ -0,0 +1,38 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0__0123456789n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts new file mode 100644 index 0000000000000..9cf743d7148e3 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts @@ -0,0 +1,36 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NonZeroDigit NumericLiteralSeparator DecimalDigits +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0_0123456789n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.ts new file mode 100644 index 0000000000000..220e9efef5f6f --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-dunder-err.ts @@ -0,0 +1,43 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o0__0n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-err.ts new file mode 100644 index 0000000000000..f5d694f883a3c --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-nsl-od-err.ts @@ -0,0 +1,43 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o0_n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-od-nsl-od-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-od-nsl-od-err.ts new file mode 100644 index 0000000000000..6b202c3b8a794 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-oil-od-nsl-od-err.ts @@ -0,0 +1,43 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +0o_1n; diff --git a/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-unicode-err.ts b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-unicode-err.ts new file mode 100644 index 0000000000000..a5f9c5f00dedb --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/bigint/numeric-separators/bigint-numeric-separator-literal-unicode-err.ts @@ -0,0 +1,35 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence +info: | + NumericLiteral :: + DecimalIntegerLiteral BigIntLiteralSuffix + NumericLiteralBase BigIntLiteralSuffix + + NumericLiteralBase :: + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + + BigIntLiteralSuffix :: n + + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError +features: [BigInt, numeric-separator-literal] +---*/ + + +1\u005F0123456789n; diff --git a/tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts b/tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts new file mode 100644 index 0000000000000..a26af8ea8df92 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts @@ -0,0 +1,14 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-1gs +description: Strict Mode - octal extension(010) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +var y = 010; diff --git a/tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts b/tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts new file mode 100644 index 0000000000000..100a66409df4c --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-2gs +description: > + Strict Mode - octal extension is forbidden in strict mode (after a + hex number is assigned to a variable) +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +var a; +a = 0x1; +a = 01; diff --git a/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts b/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts new file mode 100644 index 0000000000000..535023502e863 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T1 +description: Checking if execution of "0x" passes +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0x diff --git a/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T2.ts b/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T2.ts new file mode 100644 index 0000000000000..ab208db17e977 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T2.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T2 +description: Checking if execution of "0X" passes +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0X diff --git a/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T1.ts b/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T1.ts new file mode 100644 index 0000000000000..a5ee50a80393e --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T1.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T1 +description: Checking if execution of "0xG" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0xG diff --git a/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T2.ts b/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T2.ts new file mode 100644 index 0000000000000..a1691aa34c6a3 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.2_T2.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T2 +description: Checking if execution of "0xg" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +0xg diff --git a/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-digit.ts b/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-digit.ts new file mode 100644 index 0000000000000..96d213179872a --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-digit.ts @@ -0,0 +1,22 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence containing an invalid digit +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0b2; diff --git a/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-leading.ts b/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-leading.ts new file mode 100644 index 0000000000000..1ee35a4771d55 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-leading.ts @@ -0,0 +1,22 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence with a leading 0 +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +00b0; diff --git a/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-truncated.ts b/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-truncated.ts new file mode 100644 index 0000000000000..f72459b01daaa --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-truncated.ts @@ -0,0 +1,22 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence without any digits +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0b; diff --git a/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-unicode.ts b/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-unicode.ts new file mode 100644 index 0000000000000..f6b7dc0b79882 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/binary-invalid-unicode.ts @@ -0,0 +1,22 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Binary-integer-literal-like sequence expressed with unicode escape sequence +info: | + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigit :: one of + 0 1 +negative: + phase: parse + type: SyntaxError +---*/ + + +0\u00620; diff --git a/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integer-strict.ts b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integer-strict.ts new file mode 100644 index 0000000000000..96c7d9d270df2 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integer-strict.ts @@ -0,0 +1,32 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-numeric-literals +description: LegacyOctalIntegerLiteral is not enabled in strict mode code +info: | + NumericLiteral :: + DecimalLiteral + BinaryIntegerLiteral + OctalIntegerLiteral + HexIntegerLiteral + LegacyOctalIntegerLiteral + + LegacyOctalIntegerLiteral :: + 0 OctalDigit + LegacyOctalIntegerLiteral OctalDigit + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +00; diff --git a/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-000-strict.ts b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-000-strict.ts new file mode 100644 index 0000000000000..1f6029969597e --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-000-strict.ts @@ -0,0 +1,14 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-6-s +description: Strict Mode - octal extension (000) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +000; diff --git a/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-005-strict.ts b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-005-strict.ts new file mode 100644 index 0000000000000..4f34110677eac --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-005-strict.ts @@ -0,0 +1,14 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-7-s +description: Strict Mode - octal extension (005) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +005; diff --git a/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-01-strict.ts b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-01-strict.ts new file mode 100644 index 0000000000000..2c53e521ca5ca --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-01-strict.ts @@ -0,0 +1,14 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-3-s +description: Strict Mode - octal extension (01) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +01; diff --git a/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-010-strict.ts b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-010-strict.ts new file mode 100644 index 0000000000000..bab4a5ac4eb2e --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-010-strict.ts @@ -0,0 +1,14 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-1-s +description: Strict Mode - octal extension (010) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +010; diff --git a/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-06-strict.ts b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-06-strict.ts new file mode 100644 index 0000000000000..bae8dcc42948b --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-06-strict.ts @@ -0,0 +1,14 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-4-s +description: Strict Mode - octal extension (06) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +06; diff --git a/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-07-strict.ts b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-07-strict.ts new file mode 100644 index 0000000000000..ad5fdc5cca524 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/legacy-octal-integery-07-strict.ts @@ -0,0 +1,14 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.3-5-s +description: Strict Mode - octal extension (07) is forbidden in strict mode +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +07; diff --git a/tests/cases/conformance/test262/language/literals/numeric/non-octal-decimal-integer-strict.ts b/tests/cases/conformance/test262/language/literals/numeric/non-octal-decimal-integer-strict.ts new file mode 100644 index 0000000000000..552f36c0ae71c --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/non-octal-decimal-integer-strict.ts @@ -0,0 +1,38 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-numeric-literals +description: NonOctalDecimalIntegerLiteral is not enabled in strict mode code +info: | + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigits[opt] + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit :: one of + 8 9 + + ## 12.8.3.1 Static Semantics: Early Errors + + NumericLiteral :: LegacyOctalIntegerLiteral + DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral + + - It is a Syntax Error if the source code matching this production is + strict mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +08; diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-followed-by-ident.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-followed-by-ident.ts new file mode 100644 index 0000000000000..babb4345006f8 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-followed-by-ident.ts @@ -0,0 +1,17 @@ +// Copyright (C) 2018 Mozilla. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-numeric-literals +description: > + NumericLiteral followed by IdentifierStart +info: | + The source character immediately following a NumericLiteral must not be an IdentifierStart or DecimalDigit. + +negative: + phase: parse + type: SyntaxError +---*/ + + +3in [] diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-bd-nsl-bd-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-bd-nsl-bd-err.ts new file mode 100644 index 0000000000000..00025edc222e4 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-bd-nsl-bd-err.ts @@ -0,0 +1,33 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a + BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b_1 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-dunder-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-dunder-err.ts new file mode 100644 index 0000000000000..535c73c86fbda --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-dunder-err.ts @@ -0,0 +1,33 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b0__0 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-err.ts new file mode 100644 index 0000000000000..e12e1acc9e7eb --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-bil-nsl-bd-err.ts @@ -0,0 +1,33 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + BinaryIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + BinaryIntegerLiteral :: + 0b BinaryDigits + 0B BinaryDigits + + BinaryDigits :: + BinaryDigit + BinaryDigits BinaryDigit + BinaryDigits NumericLiteralSeparator BinaryDigit + + BinaryDigit :: one of + 0 1 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0b0_ diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-dds-dunder-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-dds-dunder-err.ts new file mode 100644 index 0000000000000..350899cec7068 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-dds-dunder-err.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1__0123456789 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-err.ts new file mode 100644 index 0000000000000..3f727d65116b5 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dd-nsl-err.ts @@ -0,0 +1,27 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1_ diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-dds-dunder-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-dds-dunder-err.ts new file mode 100644 index 0000000000000..066ab7a1bc5c6 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-dds-dunder-err.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10__0123456789 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-err.ts new file mode 100644 index 0000000000000..667e9bf7b832d --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dds-nsl-err.ts @@ -0,0 +1,28 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10_ diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.ts new file mode 100644 index 0000000000000..0e79f92dac4e0 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-dds-nsl-ep-dd-err.ts @@ -0,0 +1,27 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10.0_e1 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-dd-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-dd-err.ts new file mode 100644 index 0000000000000..7cf8c73e1e6df --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-dd-err.ts @@ -0,0 +1,27 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be adjacent to `.` +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._1 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-ep-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-ep-err.ts new file mode 100644 index 0000000000000..ce5f589f9ffd3 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-ep-err.ts @@ -0,0 +1,30 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear between `.` and ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._e1 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-err.ts new file mode 100644 index 0000000000000..d745ae0227cc8 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dil-dot-nsl-err.ts @@ -0,0 +1,28 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +10._ diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-dds-nsl-ep-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-dds-nsl-ep-err.ts new file mode 100644 index 0000000000000..c0f86826f912c --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-dds-nsl-ep-err.ts @@ -0,0 +1,29 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NumericLiteralSeparator may not appear adjacent to ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +.0_e1 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-ep-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-ep-err.ts new file mode 100644 index 0000000000000..bf9d8e5246255 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-ep-err.ts @@ -0,0 +1,30 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear between `.` and ExponentPart +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + + ExponentIndicator :: one of + e E + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +._e1 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-err.ts new file mode 100644 index 0000000000000..da6aeea341d91 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-dot-nsl-err.ts @@ -0,0 +1,28 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + DecimalLiteral, nor adjacent to `.` +info: | + NumericLiteralSeparator :: + _ + + DecimalLiteral :: + . DecimalDigits ExponentPart_opt + + DecimalDigits :: + ... + DecimalDigits NumericLiteralSeparator DecimalDigit + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +._ diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-hd-nsl-hd-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-hd-nsl-hd-err.ts new file mode 100644 index 0000000000000..c4338fad56b14 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-hd-nsl-hd-err.ts @@ -0,0 +1,33 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a + HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x_1 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-dunder-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-dunder-err.ts new file mode 100644 index 0000000000000..661396c692335 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-dunder-err.ts @@ -0,0 +1,33 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x0__0 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-err.ts new file mode 100644 index 0000000000000..52e550019d441 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-hil-nsl-hd-err.ts @@ -0,0 +1,33 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of a + HexIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + HexIntegerLiteral :: + 0x HexDigits + 0X HexDigits + + HexDigits :: + HexDigit + HexDigits HexDigit + HexDigits NumericLiteralSeparator HexDigit + + HexDigit::one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0x0_ diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-00-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-00-err.ts new file mode 100644 index 0000000000000..b457d5c091855 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-00-err.ts @@ -0,0 +1,40 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (00_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +00_0; diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-01-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-01-err.ts new file mode 100644 index 0000000000000..4e6de3b40ce52 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-01-err.ts @@ -0,0 +1,40 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (01_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +01_0; diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-07-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-07-err.ts new file mode 100644 index 0000000000000..220023d5c89f4 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-07-err.ts @@ -0,0 +1,42 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (07_0) + ) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +07_0; diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_0-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_0-err.ts new file mode 100644 index 0000000000000..47d017709c5ca --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_0-err.ts @@ -0,0 +1,40 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_0) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_0; diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_1-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_1-err.ts new file mode 100644 index 0000000000000..b1cdb931ab0f2 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_1-err.ts @@ -0,0 +1,40 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_1) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_1; diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_7-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_7-err.ts new file mode 100644 index 0000000000000..72ffe3034e995 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-lol-0_7-err.ts @@ -0,0 +1,41 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a LegacyOctalLikeDecimalIntegerLiteral (0_7) + ) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 + + OctalDigit::one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_7; diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-08-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-08-err.ts new file mode 100644 index 0000000000000..2fb71eec88bde --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-08-err.ts @@ -0,0 +1,37 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (08) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +08_0; diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-09-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-09-err.ts new file mode 100644 index 0000000000000..09ec1ff937ab3 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-09-err.ts @@ -0,0 +1,37 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (09) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +09_0; diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_8-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_8-err.ts new file mode 100644 index 0000000000000..6ad113573893a --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_8-err.ts @@ -0,0 +1,37 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_8) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_8; diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_9-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_9-err.ts new file mode 100644 index 0000000000000..dcb89fc2b4b4c --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nonoctal-0_9-err.ts @@ -0,0 +1,37 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator must not be in a NonOctalDecimalIntegerLiteral (0_9) +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + 0 + NonZeroDigit DecimalDigitsopt + NonZeroDigit + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + NonOctalDecimalIntegerLiteral + + NonOctalDecimalIntegerLiteral :: + 0 NonOctalDigit + LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit + NonOctalDecimalIntegerLiteral DecimalDigit + + LegacyOctalLikeDecimalIntegerLiteral :: + 0 OctalDigit + LegacyOctalLikeDecimalIntegerLiteral OctalDigit + + NonOctalDigit::one of + 8 9 +negative: + phase: parse + type: SyntaxError +features: [numeric-separator-literal] +---*/ + + +0_9; diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-dunder-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-dunder-err.ts new file mode 100644 index 0000000000000..f4210e6e0d525 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-dunder-err.ts @@ -0,0 +1,28 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in DecimalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0__0123456789 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts new file mode 100644 index 0000000000000..d4b7157ca129a --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.ts @@ -0,0 +1,26 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: NonZeroDigit NumericLiteralSeparator DecimalDigits +info: | + NumericLiteralSeparator :: + _ + + DecimalIntegerLiteral :: + ... + NonZeroDigit NumericLiteralSeparator DecimalDigits + + NonZeroDigit :: one of + 1 2 3 4 5 6 7 8 9 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0_0123456789 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-dunder-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-dunder-err.ts new file mode 100644 index 0000000000000..d51ff124cfc60 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-dunder-err.ts @@ -0,0 +1,33 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not appear adjacent to another + NumericLiteralSeparator in a OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o0__0 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-err.ts new file mode 100644 index 0000000000000..a657d92768e6b --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-nsl-od-err.ts @@ -0,0 +1,33 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the last digit character of an + OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o0_ diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-od-nsl-od-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-od-nsl-od-err.ts new file mode 100644 index 0000000000000..867ca37ce9e44 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-oil-od-nsl-od-err.ts @@ -0,0 +1,33 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NumericLiteralSeparator may not be the appear adjacent to `0o` | `0O` in a + OctalIntegerLiteral +info: | + NumericLiteralSeparator :: + _ + + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigits NumericLiteralSeparator OctalDigit + + OctalDigit :: one of + 0 1 2 3 4 5 6 7 + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +0o_1 diff --git a/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-unicode-err.ts b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-unicode-err.ts new file mode 100644 index 0000000000000..10936c88497c2 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/numeric-separators/numeric-separator-literal-unicode-err.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-NumericLiteralSeparator +description: > + NonZeroDigit NumericLiteralSeparator DecimalDigits sequence expressed with + unicode escape sequence +info: | + NumericLiteralSeparator:: + _ + + DecimalIntegerLiteral:: + ... + NonZeroDigit NumericLiteralSeparator_opt DecimalDigits + +negative: + phase: parse + type: SyntaxError + +features: [numeric-separator-literal] +---*/ + + +1\u005F0123456789 diff --git a/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-digit.ts b/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-digit.ts new file mode 100644 index 0000000000000..9e2c7330766f2 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-digit.ts @@ -0,0 +1,22 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence containing an invalid digit +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0o8; diff --git a/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-leading.ts b/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-leading.ts new file mode 100644 index 0000000000000..994fdf60b09a4 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-leading.ts @@ -0,0 +1,22 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence with a leading 0 +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +00o0; diff --git a/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-truncated.ts b/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-truncated.ts new file mode 100644 index 0000000000000..eed3af2160a08 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-truncated.ts @@ -0,0 +1,22 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence without any digits +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0o; diff --git a/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-unicode.ts b/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-unicode.ts new file mode 100644 index 0000000000000..ffd5bc06eda3c --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/numeric/octal-invalid-unicode.ts @@ -0,0 +1,22 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.8.3 +description: Octal-integer-literal-like sequence expressed with unicode escape sequence +info: | + OctalIntegerLiteral :: + 0o OctalDigits + 0O OctalDigits + OctalDigits :: + OctalDigit + OctalDigits OctalDigit + OctalDigit :: one of + 0 1 2 3 4 5 6 7 +negative: + phase: parse + type: SyntaxError +---*/ + + +0\u006f0; diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T1.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T1.ts new file mode 100644 index 0000000000000..69078db816d70 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T1.ts @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionFirstChar +info: | + RegularExpressionChars :: + [empty] + RegularExpressionCharsRegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "*" +negative: + phase: parse + type: SyntaxError +---*/ + + +/*/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T2.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T2.ts new file mode 100644 index 0000000000000..5b46820b4c37b --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T2.ts @@ -0,0 +1,25 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "\" +negative: + phase: parse + type: SyntaxError +---*/ + + +/\/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T3.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T3.ts new file mode 100644 index 0000000000000..ae413951fd149 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T3.ts @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + +description: > + The first character of a regular expression may not be "/" +negative: + phase: parse + type: SyntaxError +---*/ + + +/// +.source; diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T4.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T4.ts new file mode 100644 index 0000000000000..e9ae52f0b03c3 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.2_T4.ts @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionLiteral:: + / RegularExpressionBody / RegularExpressionFlags + + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars:: + [empty] + + MemberExpression . IdentifierName + +description: A regular expression may not be empty. +negative: + phase: parse + type: SyntaxError +---*/ + + +// +.source; diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T1.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T1.ts new file mode 100644 index 0000000000000..955189753736e --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T1.ts @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a (\u000A) +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T3.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T3.ts new file mode 100644 index 0000000000000..d722e1fdec039 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.3_T3.ts @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a , (\u000D) +negative: + phase: parse + type: SyntaxError +---*/ + + +/ +/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T1.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T1.ts new file mode 100644 index 0000000000000..61d057a371ffb --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T1.ts @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A RegularExpressionBackslashSequence may not contain a + +negative: + phase: parse + type: SyntaxError +---*/ + + +/\ +/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T3.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T3.ts new file mode 100644 index 0000000000000..e6cc0353255e2 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A1.5_T3.ts @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A RegularExpressionBackslashSequence may not contain a +negative: + phase: parse + type: SyntaxError +---*/ + + +/\ +/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T1.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T1.ts new file mode 100644 index 0000000000000..55ade9cd3755e --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T1.ts @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionChar +info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular express may not contain a "\" as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T2.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T2.ts new file mode 100644 index 0000000000000..f1b4640b40712 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.2_T2.ts @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionChar +info: | + RegularExpressionChar :: + RegularExpressionNonTerminator but not one of \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular expression may not contain a "/" as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a//.source; diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T1.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T1.ts new file mode 100644 index 0000000000000..311223ecdda68 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T1.ts @@ -0,0 +1,32 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a +/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T3.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T3.ts new file mode 100644 index 0000000000000..d1b8476c9b350 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.3_T3.ts @@ -0,0 +1,33 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-regular-expression-literals +info: | + RegularExpressionChar :: + RegularExpressionBackslashSequence + + + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter + +negative: + phase: parse + type: SyntaxError +---*/ + + +/a +/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T1.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T1.ts new file mode 100644 index 0000000000000..be98260c34edf --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T1.ts @@ -0,0 +1,28 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\ +/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T3.ts b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T3.ts new file mode 100644 index 0000000000000..7d43e77df2f66 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/S7.8.5_A2.5_T3.ts @@ -0,0 +1,28 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\ +/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/early-err-bad-flag.ts b/tests/cases/conformance/test262/language/literals/regexp/early-err-bad-flag.ts new file mode 100644 index 0000000000000..defeb2cd14e38 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/early-err-bad-flag.ts @@ -0,0 +1,17 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains any code points other than "g", "i", "m", "u", or "y", ... + +negative: + phase: parse + type: SyntaxError +---*/ + + +/./G; diff --git a/tests/cases/conformance/test262/language/literals/regexp/early-err-dup-flag.ts b/tests/cases/conformance/test262/language/literals/regexp/early-err-dup-flag.ts new file mode 100644 index 0000000000000..66991a14c9cd8 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/early-err-dup-flag.ts @@ -0,0 +1,17 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if FlagText of RegularExpressionLiteral contains ... the same code point more than once. + +negative: + phase: parse + type: SyntaxError +---*/ + + +/./gig; diff --git a/tests/cases/conformance/test262/language/literals/regexp/early-err-flags-unicode-escape.ts b/tests/cases/conformance/test262/language/literals/regexp/early-err-flags-unicode-escape.ts new file mode 100644 index 0000000000000..5fc2231f6999e --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/early-err-flags-unicode-escape.ts @@ -0,0 +1,17 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-regular-expression-literals-static-semantics-early-errors +info: | + RegularExpressionFlags :: + RegularExpressionFlags IdentifierPart + +description: > + It is a Syntax Error if IdentifierPart contains a Unicode escape sequence. +negative: + phase: parse + type: SyntaxError +---*/ + + +/./\u0067; diff --git a/tests/cases/conformance/test262/language/literals/regexp/early-err-pattern.ts b/tests/cases/conformance/test262/language/literals/regexp/early-err-pattern.ts new file mode 100644 index 0000000000000..6fc999a5f2b5a --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/early-err-pattern.ts @@ -0,0 +1,16 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-primary-expression-regular-expression-literals-static-semantics-early-errors +info: | + PrimaryExpression : RegularExpressionLiteral + +description: > + It is a Syntax Error if BodyText of RegularExpressionLiteral cannot be recognized using the goal symbol Pattern of the ECMAScript RegExp grammar specified in #sec-patterns. +negative: + phase: parse + type: SyntaxError +---*/ + + +/?/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-exact.ts b/tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-exact.ts new file mode 100644 index 0000000000000..8e1560e567ce6 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-exact.ts @@ -0,0 +1,24 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (exact count) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2}/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-lower.ts b/tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-lower.ts new file mode 100644 index 0000000000000..0456d32b60cc3 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-lower.ts @@ -0,0 +1,24 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (lower-bounds) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2,}/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-range.ts b/tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-range.ts new file mode 100644 index 0000000000000..7e1e9cd3fcf6b --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/invalid-braced-quantifier-range.ts @@ -0,0 +1,24 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Braced quantifier in an Atom position (range) +info: | + SyntaxCharacter :: one of + ^$\.*+?()[]{}| + + PatternCharacter :: + SourceCharacter but not SyntaxCharacter + + Although Annex B extends the definition of Term to include + ExtendedPatternCharacter, it also introduces the InvalidBracedQuantifier + pattern with a higher precedence. This makes the SyntaxError for such + patterns consistent between Annex-B and non-Annex-B environments. +negative: + phase: parse + type: SyntaxError +---*/ + + +/{2,3}/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/invalid-optional-lookbehind.ts b/tests/cases/conformance/test262/language/literals/regexp/invalid-optional-lookbehind.ts new file mode 100644 index 0000000000000..cacbf08e82564 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/invalid-optional-lookbehind.ts @@ -0,0 +1,19 @@ +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.)?/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/invalid-optional-negative-lookbehind.ts b/tests/cases/conformance/test262/language/literals/regexp/invalid-optional-negative-lookbehind.ts new file mode 100644 index 0000000000000..d531d4778b9eb --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/invalid-optional-negative-lookbehind.ts @@ -0,0 +1,19 @@ +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?a)\k/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-2.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-2.ts new file mode 100644 index 0000000000000..f4af2aafc4cf5 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-2.ts @@ -0,0 +1,19 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.ts new file mode 100644 index 0000000000000..154e9d022687a --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.ts @@ -0,0 +1,19 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3.ts new file mode 100644 index 0000000000000..90b51ed71fb8f --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3.ts @@ -0,0 +1,19 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)\k/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4-u.ts new file mode 100644 index 0000000000000..a2319c9ba5bec --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4-u.ts @@ -0,0 +1,19 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?a)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4.ts new file mode 100644 index 0000000000000..ba751f6980395 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-4.ts @@ -0,0 +1,19 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?a)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-5.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-5.ts new file mode 100644 index 0000000000000..f8985b4f7c4a5 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-5.ts @@ -0,0 +1,19 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?x)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-u.ts new file mode 100644 index 0000000000000..a3ff1914526ca --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-u.ts @@ -0,0 +1,19 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-without-group-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-without-group-u.ts new file mode 100644 index 0000000000000..334ac1ff07cce --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-without-group-u.ts @@ -0,0 +1,19 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname.ts new file mode 100644 index 0000000000000..9e1f77bddd2e9 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-dangling-groupname.ts @@ -0,0 +1,19 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Group reference must have corresponding group. +info: | + It is a Syntax Error if the enclosing Pattern does not contain a + GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue + equals the StringValue of the RegExpIdentifierName of this production's + GroupName. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2-u.ts new file mode 100644 index 0000000000000..8828633966481 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2-u.ts @@ -0,0 +1,18 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?b)(?a)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2.ts new file mode 100644 index 0000000000000..adb5645e33871 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2.ts @@ -0,0 +1,18 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?b)(?a)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-u.ts new file mode 100644 index 0000000000000..12089b87c7a9b --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-u.ts @@ -0,0 +1,18 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?a)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier.ts new file mode 100644 index 0000000000000..5055f3bcf676c --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-duplicate-groupspecifier.ts @@ -0,0 +1,18 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifiers within one alternative must be unique. +info: | + It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s + _x_ and _y_ for which CapturingGroupName(_x_) is the same as + CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*. +esid: sec-patterns-static-semantics-early-errors +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)(?a)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier-u.ts new file mode 100644 index 0000000000000..b737d3bc69161 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<>a)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier.ts new file mode 100644 index 0000000000000..36e00507dac5f --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-empty-groupspecifier.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<>a)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-identity-escape-in-capture-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-identity-escape-in-capture-u.ts new file mode 100644 index 0000000000000..26cc4f439f366 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-identity-escape-in-capture-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?\a)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-2-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-2-u.ts new file mode 100644 index 0000000000000..f4843e4f4f922 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-2-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k<>/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-3.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-3.ts new file mode 100644 index 0000000000000..ec30112a1cbf4 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-3.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k<>/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-4.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-4.ts new file mode 100644 index 0000000000000..4ed0fc8e1daa6 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-4.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\ka)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-5.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-5.ts new file mode 100644 index 0000000000000..5213e74721970 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-5.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k.)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-6.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-6.ts new file mode 100644 index 0000000000000..f566be0735628 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-6.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k(?.)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-u.ts new file mode 100644 index 0000000000000..a8b7b58543d43 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-2-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-2-u.ts new file mode 100644 index 0000000000000..fdf498f46173f --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-2-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k<>/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-3-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-3-u.ts new file mode 100644 index 0000000000000..52865ee3e495d --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-3-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-u.ts new file mode 100644 index 0000000000000..2c596edc521f6 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupName is `< RegExpIdentifierName >`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/\k`. +esid: prod-GroupName +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)\k/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4-u.ts new file mode 100644 index 0000000000000..b4e6f25941b07 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4.ts new file mode 100644 index 0000000000000..6d24b11b4ff13 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier.ts new file mode 100644 index 0000000000000..fe41abe55a4a2 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<$❁Ea)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2-u.ts new file mode 100644 index 0000000000000..bf95ffd15a2df --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<𐒤>a)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2.ts new file mode 100644 index 0000000000000..9e23d7454b655 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<𐒤>a)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-3.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-3.ts new file mode 100644 index 0000000000000..3c19ae55a4201 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-3.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4-u.ts new file mode 100644 index 0000000000000..2dc275935eec4 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4.ts new file mode 100644 index 0000000000000..85502ae6f012a --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5-u.ts new file mode 100644 index 0000000000000..efb3a66a5c7ee --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5.ts new file mode 100644 index 0000000000000..27477c10962a6 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-6.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-6.ts new file mode 100644 index 0000000000000..8b7c6f5fbfafd --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-6.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-7.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-7.ts new file mode 100644 index 0000000000000..1c9e0c576ee4f --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-7.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8-u.ts new file mode 100644 index 0000000000000..2886ff50adc6f --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<\>.)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8.ts new file mode 100644 index 0000000000000..59ca99b3b3d02 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<\>.)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-9-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-9-u.ts new file mode 100644 index 0000000000000..7b1e6cc6de473 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-9-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?.)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-u.ts new file mode 100644 index 0000000000000..124ed7f403e09 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<❤>a)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier.ts new file mode 100644 index 0000000000000..b60a2cbb98560 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<❤>a)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier-u.ts new file mode 100644 index 0000000000000..78fc8f902c82e --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<42a>a)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier.ts new file mode 100644 index 0000000000000..b125cbfa731ed --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-numeric-groupspecifier.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<42a>a)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier-u.ts new file mode 100644 index 0000000000000..10eb89ea0218e --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<:a>a)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier.ts new file mode 100644 index 0000000000000..6b04b11322fd9 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?<:a>a)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier-u.ts new file mode 100644 index 0000000000000..fa29dcc67977a --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier.ts new file mode 100644 index 0000000000000..89d5f4d1ae292 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(?a)/; diff --git a/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-unterminated-groupspecifier-u.ts b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-unterminated-groupspecifier-u.ts new file mode 100644 index 0000000000000..9131978866613 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/named-groups/invalid-unterminated-groupspecifier-u.ts @@ -0,0 +1,14 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: GroupSpecifier must be identifier-like. +esid: prod-GroupSpecifier +negative: + phase: parse + type: SyntaxError +features: [regexp-named-groups] +---*/ + + +/(? + The first character of a regular expression may not be a +negative: + phase: parse + type: SyntaxError +---*/ + + +/
/ + +/* +There is a between the two / characters +*/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/regexp-first-char-no-paragraph-separator.ts b/tests/cases/conformance/test262/language/literals/regexp/regexp-first-char-no-paragraph-separator.ts new file mode 100644 index 0000000000000..cecd1b5496388 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/regexp-first-char-no-paragraph-separator.ts @@ -0,0 +1,32 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + The first character of a regular expression may not be a +negative: + phase: parse + type: SyntaxError +---*/ + + +/
/ + +/* +There is a between the two / characters +*/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-line-separator.ts b/tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-line-separator.ts new file mode 100644 index 0000000000000..024da8f37c361 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-line-separator.ts @@ -0,0 +1,31 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionBackslashSequence +info: | + RegularExpressionBackslashSequence :: + \ RegularExpressionNonTerminator + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + + LineTerminator :: + + + + + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\\
/ + +/* +There is a between "a\\
" and "/" +*/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-paragraph-separator.ts b/tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-paragraph-separator.ts new file mode 100644 index 0000000000000..50e3e69e3f9fa --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/regexp-source-char-no-paragraph-separator.ts @@ -0,0 +1,32 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-RegularExpressionNonTerminator +info: | + RegularExpressionBody :: + RegularExpressionFirstChar RegularExpressionChars + + RegularExpressionChars :: + [empty] + RegularExpressionChars RegularExpressionChar + + RegularExpressionFirstChar :: + RegularExpressionNonTerminator but not one of * or \ or / or [ + + RegularExpressionNonTerminator :: + SourceCharacter but not LineTerminator + +description: > + A regular expression may not contain a as a SourceCharacter +negative: + phase: parse + type: SyntaxError +---*/ + + +/a\\

/ + +/* +There is a between "a\\
" and "/" +*/ diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-class-escape.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-class-escape.ts new file mode 100644 index 0000000000000..cc628a4caa987 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-class-escape.ts @@ -0,0 +1,22 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: > + ClassEscape does not recognize "class control" patterns +info: | + ClassEscape[U] :: + b + [+U] - + CharacterClassEscape + CharacterEscape[?U] + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\c0/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-extended-pattern-char.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-extended-pattern-char.ts new file mode 100644 index 0000000000000..1c62aea237012 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-extended-pattern-char.ts @@ -0,0 +1,19 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes the use of extended pattern characters irrespective + of the presence of Annex B extensions. + + Term[U] :: + [~U] ExtendedAtom +negative: + phase: parse + type: SyntaxError +---*/ + + +/{/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-identity-escape.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-identity-escape.ts new file mode 100644 index 0000000000000..27fc2c3812bb5 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-identity-escape.ts @@ -0,0 +1,21 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Support for UnicodeIDContinue in IdentityEscape +info: | + IdentityEscape[U] :: + [+U] SyntaxCharacter + [+U] / + [~U] SourceCharacter but not UnicodeIDContinue + + The `u` flag precludes the use of characters in UnicodeIDContinue + irrespective of the presence of Annex B extensions. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\M/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-legacy-octal-escape.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-legacy-octal-escape.ts new file mode 100644 index 0000000000000..97dab7c0b8af8 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-legacy-octal-escape.ts @@ -0,0 +1,24 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-patterns +es6id: 21.2.1 +description: Legacy Octal Escape Sequence not supported with `u` flag +info: | + The `u` flag precludes the use of LegacyOctalEscapeSequence irrespective + of the presence of Annex B extensions. + + CharacterEscape [U] :: + ControlEscape + c ControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] +negative: + phase: parse + type: SyntaxError +---*/ + + +/\1/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.ts new file mode 100644 index 0000000000000..0e79980108f92 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.ts @@ -0,0 +1,31 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("A" parameter) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[\d-a]/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-ab.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-ab.ts new file mode 100644 index 0000000000000..fb7429fb12684 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-ab.ts @@ -0,0 +1,31 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + (both "A" and "B" parameters) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[\s-\d]/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-b.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-b.ts new file mode 100644 index 0000000000000..90b75675c005b --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-b.ts @@ -0,0 +1,31 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set + ("B" parameter) +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[%-\d]/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges.ts new file mode 100644 index 0000000000000..a368d90076950 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-non-empty-class-ranges.ts @@ -0,0 +1,30 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: > + NonEmptyClassRangesNoDash production cannot specify a multi-character set +info: | + The production + NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates + as follows: + + 1. Evaluate ClassAtomNoDash to obtain a CharSet A. + 2. Evaluate ClassAtom to obtain a CharSet B. + 3. Evaluate ClassRanges to obtain a CharSet C. + 4. Call CharacterRange(A, B) and let D be the resulting CharSet. + + 21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation + + 1. If A does not contain exactly one character or B does not contain + exactly one character, throw a SyntaxError exception. + + The `u` flag precludes the Annex B extension that enables this pattern. +negative: + phase: parse + type: SyntaxError +---*/ + + +/[--\d]/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-oob-decimal-escape.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-oob-decimal-escape.ts new file mode 100644 index 0000000000000..af69d7c2244e4 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-oob-decimal-escape.ts @@ -0,0 +1,19 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-pattern-semantics +es6id: 21.2.2 +description: Out-of-bounds decimal escapes +info: | + 1. Evaluate DecimalEscape to obtain an integer n. + 2. If n>NcapturingParens, throw a SyntaxError exception. + + When the "unicode" flag is set, this algorithm is honored irrespective of + the presence of Annex B extensions. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\8/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookahead.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookahead.ts new file mode 100644 index 0000000000000..756c59c177f01 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookahead.ts @@ -0,0 +1,19 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?=.)?/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookbehind.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookbehind.ts new file mode 100644 index 0000000000000..f421452a86fcb --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-lookbehind.ts @@ -0,0 +1,19 @@ +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?<=.)?/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-negative-lookahead.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-negative-lookahead.ts new file mode 100644 index 0000000000000..0a06cc3d9fa17 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-negative-lookahead.ts @@ -0,0 +1,19 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(?!.)?/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-negative-lookbehind.ts b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-negative-lookbehind.ts new file mode 100644 index 0000000000000..30a673c53f2bc --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-invalid-optional-negative-lookbehind.ts @@ -0,0 +1,19 @@ +// Copyright (C) 2018 Igalia S. L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +description: Lookbehinds are not treated as a QuantifiableAssertion +info: | + Term[U] :: + [~U] QuantifiableAssertion Quantifier + + QuantifiableAssertion[N]:: + ( ? = Disjunction[~U, ?N] ) + ( ? ! Disjunction[~U, ?N] ) +negative: + phase: parse + type: SyntaxError +---*/ + + +/.(? 1114111. +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{110000}/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/u-unicode-esc-non-hex.ts b/tests/cases/conformance/test262/language/literals/regexp/u-unicode-esc-non-hex.ts new file mode 100644 index 0000000000000..e7b87722e1b5e --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/u-unicode-esc-non-hex.ts @@ -0,0 +1,14 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: > + Non-hexadecimal value within the delimiters of a UnicodeEscapeSequence +es6id: 21.2.1 +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{1,}/u; diff --git a/tests/cases/conformance/test262/language/literals/regexp/unicode-escape-nls-err.ts b/tests/cases/conformance/test262/language/literals/regexp/unicode-escape-nls-err.ts new file mode 100644 index 0000000000000..625b2758676b1 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/regexp/unicode-escape-nls-err.ts @@ -0,0 +1,72 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-Pattern +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence +info: | + Pattern[U, N]:: + Disjunction[?U, ?N] + + Disjunction[U, N]:: + Alternative[?U, ?N] + Alternative[?U, ?N]|Disjunction[?U, ?N] + + Alternative[U, N]:: + [empty] + Alternative[?U, ?N]Term[?U, ?N] + + Term[U, N]:: + Assertion[?U, ?N] + Atom[?U, ?N] + Atom[?U, ?N]Quantifier + + Atom[U, N]:: + PatternCharacter + . + \AtomEscape[?U, ?N] + CharacterClass[?U] + (GroupSpecifier[?U]Disjunction[?U, ?N]) + (?:Disjunction[?U, ?N]) + + AtomEscape[U, N]:: + DecimalEscape + CharacterClassEscape[?U] + CharacterEscape[?U] + [+N]kGroupName[?U] + + CharacterEscape[U]:: + ControlEscape + cControlLetter + 0[lookahead ∁EDecimalDigit] + HexEscapeSequence + RegExpUnicodeEscapeSequence[?U] + IdentityEscape[?U] + + RegExpUnicodeEscapeSequence[U]:: + [+U]uLeadSurrogate\uTrailSurrogate + [+U]uLeadSurrogate + [+U]uTrailSurrogate + [+U]uNonSurrogate + [~U]uHex4Digits + [+U]u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +/\u{1F_639}/u; diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T1.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T1.ts new file mode 100644 index 0000000000000..5a35d6e61541a --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T1.ts @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T1 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +""" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T2.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T2.ts new file mode 100644 index 0000000000000..5bcd82f7b639b --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.1_T2.ts @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T2 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +" +" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T1.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T1.ts new file mode 100644 index 0000000000000..713174706de33 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T1.ts @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T1 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +''' diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T2.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T2.ts new file mode 100644 index 0000000000000..730f9e7004047 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A1.2_T2.ts @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T2 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +' +' diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T1.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T1.ts new file mode 100644 index 0000000000000..272984b75faab --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T1.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T1 +description: Checking if execution of "\" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T2.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T2.ts new file mode 100644 index 0000000000000..e4e3ac15d9036 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.1_T2.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T2 +description: Checking if execution of "'\'" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +'\' diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T1.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T1.ts new file mode 100644 index 0000000000000..0278fbf401003 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T1.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T1 +description: Checking if execution of "\\\" fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\\\" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T2.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T2.ts new file mode 100644 index 0000000000000..0aa395e921fe1 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A3.2_T2.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T2 +description: Checking if execution of '\\\' fails +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +'\\\' diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T1.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T1.ts new file mode 100644 index 0000000000000..49db7a6f8736d --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T1.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T1 +description: "EscapeCharacter :: DecimalDigits :: 1" +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +"\1" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T2.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T2.ts new file mode 100644 index 0000000000000..299d9c1033cb9 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A4.3_T2.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T2 +description: "EscapeCharacter :: DecimalDigits :: 7" +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] +---*/ + + +"\7" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.1_T4.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.1_T4.ts new file mode 100644 index 0000000000000..e7d68c5e0f626 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.1_T4.ts @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 7.8.4_A7.1_T4 +description: "UnicodeEscapeSequence :: u000G is incorrect" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK# +"\u000G" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T1.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T1.ts new file mode 100644 index 0000000000000..0fcea4f61944f --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T1.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T1 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u1" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T2.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T2.ts new file mode 100644 index 0000000000000..f751bb14bc258 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T2.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T2 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uA" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T3.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T3.ts new file mode 100644 index 0000000000000..b5886053adc5a --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T3.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T3 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u11" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T4.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T4.ts new file mode 100644 index 0000000000000..10b06c6a22c98 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T4.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T4 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uAA" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T5.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T5.ts new file mode 100644 index 0000000000000..9f061b62581ec --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T5.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T5 +description: ":: HexDigit :: 1" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\u111" diff --git a/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T6.ts b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T6.ts new file mode 100644 index 0000000000000..29d7490455122 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/S7.8.4_A7.2_T6.ts @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T6 +description: ":: HexDigit :: A" +negative: + phase: parse + type: SyntaxError +---*/ + + +//CHECK#1 +"\uAAA" diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.ts new file mode 100644 index 0000000000000..ea83c4ce1e4b5 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 1 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\1"; "use strict"; } diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts new file mode 100644 index 0000000000000..fa5253a47da6e --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 2 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\2"; "use strict"; } diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts new file mode 100644 index 0000000000000..226f98b328282 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; ZeroToThree 3 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + ZeroToThree::one of + 0 1 2 3 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\3"; "use strict"; } diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts new file mode 100644 index 0000000000000..6adbede01925f --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 4 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\4"; "use strict"; } diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts new file mode 100644 index 0000000000000..8de2f2108c72f --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 5 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\5"; "use strict"; } diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts new file mode 100644 index 0000000000000..0e0f8aa41cb3b --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 6 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\6"; "use strict"; } diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts new file mode 100644 index 0000000000000..e44fa5b90611c --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; FourToSeven 7 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + FourToSeven::one of + 4 5 6 7 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\7"; "use strict"; } diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts new file mode 100644 index 0000000000000..d2714e1255687 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 8 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\8"; "use strict"; } diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict.ts new file mode 100644 index 0000000000000..aa6d975564961 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-8-strict.ts @@ -0,0 +1,30 @@ +// Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: LegacyOctalEscapeSequence is not enabled in strict mode code - 8 +info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\8'; diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts new file mode 100644 index 0000000000000..54ff7dbd6fa76 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.ts @@ -0,0 +1,25 @@ +// Copyright (C) 2020 Rick Waldron Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: > + String Literals extensions disallowed in strict mode; NonOctalDecimalEscapeSequence 9 +info: | + It is possible for string literals to precede a Use Strict Directive that places the enclosing + code in strict mode, and implementations must take care to not use this extended definition of + EscapeSequence with such literals. For example, attempting to parse the following source text + must fail. + + Strict mode is entered via the explicit Use Strict Directive. + + NonOctalDecimalEscapeSequence::one of + 8 9 + +flags: [noStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +function invalid() { "\9"; "use strict"; } diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict.ts new file mode 100644 index 0000000000000..5d7ba4bb85609 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-9-strict.ts @@ -0,0 +1,30 @@ +// Copyright (C) 2020 Sony Interactive Entertainment Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-literals-string-literals +description: LegacyOctalEscapeSequence is not enabled in strict mode code - 9 +info: | + EscapeSequence :: + CharacterEscapeSequence + LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence + HexEscapeSequence + UnicodeEscapeSequence + + NonOctalDecimalEscapeSequence :: one of + 8 9 + + ## 12.8.4.1 Static Semantics: Early Errors + + EscapeSequence :: NonOctalDecimalEscapeSequence + + - It is a Syntax Error if the source code matching this production is strict + mode code. +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\9'; diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-strict.ts b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-strict.ts new file mode 100644 index 0000000000000..fbad784d69cff --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-non-octal-escape-sequence-strict.ts @@ -0,0 +1,26 @@ +// Copyright (C) 2017 Kevin Gibbons. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-template-literal-lexical-components +description: LegacyOctalEscapeSequence is not available in template literals +info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\08'; diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-prologue-strict.ts b/tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-prologue-strict.ts new file mode 100644 index 0000000000000..b0c32c5360627 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-prologue-strict.ts @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.8.4-1-s +description: > + A directive preceding an 'use strict' directive may not contain + an OctalEscapeSequence +negative: + phase: parse + type: SyntaxError +---*/ + + +(function() { + "asterisk: \052"; + "use strict"; +}); diff --git a/tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-strict.ts b/tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-strict.ts new file mode 100644 index 0000000000000..a3b5ec733195c --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/legacy-octal-escape-sequence-strict.ts @@ -0,0 +1,26 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-template-literal-lexical-components +description: LegacyOctalEscapeSequence is not available in template literals +info: | + TemplateCharacter :: + $ [lookahead ≠ {] + \ TemplateEscapeSequence + \ NotEscapeSequence + LineContinuation + LineTerminatorSequence + SourceCharacter but not one of ` or \ or $ or LineTerminator + TemplateEscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\1'; diff --git a/tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-double.ts b/tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-double.ts new file mode 100644 index 0000000000000..caed8287e412c --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-double.ts @@ -0,0 +1,48 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) +info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + DoubleStringCharacters:: + DoubleStringCharacter DoubleStringCharacters opt + + DoubleStringCharacter:: + SourceCharacter but not one of " or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +"\u{1F_639}" diff --git a/tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-single.ts b/tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-single.ts new file mode 100644 index 0000000000000..b43ad79b29cbe --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/unicode-escape-nls-err-single.ts @@ -0,0 +1,48 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: NumericLiteralSeperator disallowed in unicode CodePoint sequence (DoubleStringCharacters) +info: | + StringLiteral:: + "DoubleStringCharacters opt" + 'SingleStringCharacters opt' + + SingleStringCharacters:: + SingleStringCharacterSingleStringCharactersopt + + SingleStringCharacter:: + SourceCharacterbut not one of ' or \ or LineTerminator + \ EscapeSequence + LineContinuation + + EscapeSequence:: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + uHex4Digits + u{CodePoint} + + CodePoint :: + HexDigit but only if MV of HexDigits ≤ 0x10FFFF + CodePointDigits but only if MV of HexDigits ≤ 0x10FFFF + + CodePointDigits :: + HexDigit + CodePointDigitsHexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +features: [numeric-separator-literal] +negative: + phase: parse + type: SyntaxError +---*/ + + +'\u{1F_639}'; diff --git a/tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-double.ts b/tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-double.ts new file mode 100644 index 0000000000000..dee44abd81f60 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-double.ts @@ -0,0 +1,45 @@ +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: > + \u is at the end of string, Hex4Digits is required. +info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + DoubleStringCharacters :: + DoubleStringCharacter DoubleStringCharacters_opt + + DoubleStringCharacter :: + SourceCharacter but not one of " or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +---*/ + + +"\u" diff --git a/tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-single.ts b/tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-single.ts new file mode 100644 index 0000000000000..d35cf4dc379e3 --- /dev/null +++ b/tests/cases/conformance/test262/language/literals/string/unicode-escape-no-hex-err-single.ts @@ -0,0 +1,45 @@ +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-StringLiteral +description: > + \u is at the end of string, Hex4Digits is required. +info: | + StringLiteral :: + " DoubleStringCharacters_opt " + ' SingleStringCharacters_opt ' + + SingleStringCharacters :: + SingleStringCharacter SingleStringCharacters_opt + + SingleStringCharacter :: + SourceCharacter but not one of ' or \ or LineTerminator + + + \ EscapeSequence + LineContinuation + + EscapeSequence :: + CharacterEscapeSequence + 0 [lookahead ∁EDecimalDigit] + HexEscapeSequence + UnicodeEscapeSequence + + UnicodeEscapeSequence :: + u Hex4Digits + u{ CodePoint } + + Hex4Digits :: + HexDigit HexDigit HexDigit HexDigit + + HexDigit :: one of + 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + +negative: + phase: parse + type: SyntaxError +---*/ + + +'\u'