Debian Codegraph @

js/src/tests/test262/language/eval-code/indirect/parse-failure-6.js

raw
1 // Copyright 2020 Qu Xing. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-performeval
5 description: For statement
6 info: |
7 ...
8 9. Perform the following substeps in an implementation-dependent order, possibly interleaving parsing and error detection:
9 a. Let script be the ECMAScript code that is the result of parsing ! UTF16DecodeString(x),for the goal symbol Script.
10 If the parse fails, throw a SyntaxError exception. If any early errors are detected, throw a SyntaxError exception
11 (but see also clause 16).
12 ...
13 ---*/
14
15 assert.throws(SyntaxError, function() {
16 (0, eval)("for(;false;)");
17 });
18
19 reportCompare(0, 0);