Debian Codegraph @

js/src/tests/test262/language/expressions/async-arrow-function/escaped-async-line-terminator.js

raw
1 // Copyright (C) 2018 André Bargull. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-async-arrow-function-definitions
6 description: >
7 Escaped "async" followed by a line-terminator is not misinterpreted as an AsyncArrowFunction.
8 info: |
9 14.7 Async Function Definitions
10
11 async [no LineTerminator here] AsyncArrowBindingIdentifier[?Yield] [no LineTerminator here] => AsyncConciseBody[?In]
12
13 5.1.5 Grammar Notation
14
15 Terminal symbols are shown
16 in fixed width font, both in the productions of the grammars and throughout this
17 specification whenever the text directly refers to such a terminal symbol. These
18 are to appear in a script exactly as written. All terminal symbol code points
19 specified in this way are to be understood as the appropriate Unicode code points
20 from the Basic Latin range, as opposed to any similar-looking code points from
21 other Unicode ranges.
22 features: [async-functions]
23 ---*/
24
25 // Throws ReferenceError because reference for "async" cannot be resolved.
26 assert.throws(ReferenceError, function() {
27 \u0061sync
28 p => {}
29 });
30
31 reportCompare(0, 0);