blob: c861c1162dd5aa63a3d9ffb01701e1bc5c7baa02 [file] [edit]
// Copyright (C) 2019 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Regular Expression Literal
template: default
info: |
Statement:
BlockStatement
VariableStatement
EmptyStatement
ExpressionStatement
...
ExpressionStatement[Yield, Await]:
[lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }]
Expression ;
RegularExpressionLiteral ::
/ RegularExpressionBody / RegularExpressionFlags
---*/
//- StatementListItem
/1/;
//- EvalAssertions
assert.sameValue(Object.getPrototypeOf(result), RegExp.prototype);
assert.sameValue(result.flags, '');
assert.sameValue(result.toString(), '/1/');