Debian Codegraph @

js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-2.js

raw
1 --> a comment
2
3 // Copyright (C) 2024 Igalia, S.L. All rights reserved.
4 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: sec-html-like-comments
7 description: >
8 A SingleLineHTMLCloseComment is allowed in the first line when preceeded by spaces
9 flags: [raw]
10 info: |
11 InputElementHashbangOrRegExp ::
12 WhiteSpace
13 LineTerminator
14 Comment
15 CommonToken
16 HashbangComment
17 RegularExpressionLiteral
18 HTMLCloseComment
19
20 HTMLCloseComment ::
21 WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt]
22 negative:
23 phase: runtime
24 type: EvalError
25 ---*/
26
27 // Because this test concerns the interpretation of non-executable character
28 // sequences within ECMAScript source code, special care must be taken to
29 // ensure that executable code is evaluated as expected.
30 //
31 // Express the intended behavior by intentionally throwing an error; this
32 // guarantees that test runners will only consider the test "passing" if
33 // executable sequences are correctly interpreted as such.
34 throw new EvalError("This is not in a comment");