syntax-err-arithmetic-modifiers-both-empty.js (649B)
1 // Copyright (C) 2024 Igalia, S.L. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 description: It is a Syntax Error if the source text matched by the first RegularExpressionFlags and the source text matched by the second RegularExpressionFlags are both empty. (arithmetic regular expression flags) 6 esid: sec-patterns-static-semantics-early-errors 7 features: [regexp-modifiers] 8 info: | 9 Atom :: ( ? RegularExpressionFlags - RegularExpressionFlags : Disjunction ) 10 ... 11 12 ---*/ 13 14 assert.throws(SyntaxError, function () { 15 RegExp("(?-:a)", ""); 16 }, 'RegExp("(?-:a)", ""): '); 17 18 reportCompare(0, 0);