1. Let
pattern
be !
CodePointsToString
(
BodyText
of
RegularExpressionLiteral
).
2. Let
flags
be !
CodePointsToString
(
FlagText
of
RegularExpressionLiteral
).
3. Return
RegExpCreate
(
pattern
,
flags
).
TemplateLiteral
[Yield, Await, Tagged]
:
NoSubstitutionTemplate
SubstitutionTemplate
[?Yield, ?Await, ?Tagged]
SubstitutionTemplate
[Yield, Await, Tagged]
:
TemplateHead
Expression
[+In, ?Yield, ?Await]
TemplateSpans
[?Yield, ?Await, ?Tagged]
TemplateSpans
[Yield, Await, Tagged]
:
TemplateTail
TemplateMiddleList
[?Yield, ?Await, ?Tagged]
TemplateTail
TemplateMiddleList
[Yield, Await, Tagged]
:
TemplateMiddle
Expression
[+In, ?Yield, ?Await]
TemplateMiddleList
[?Yield, ?Await, ?Tagged]
TemplateMiddle
Expression
[+In, ?Yield, ?Await]
TemplateLiteral
[Yield, Await, Tagged]
:
NoSubstitutionTemplate
It is a Syntax Error if the
[Tagged]
parameter was not set and
NoSubstitutionTemplate
Contains
NotEscapeSequence
.
TemplateLiteral
[Yield, Await, Tagged]
:
SubstitutionTemplate
[?Yield, ?Await, ?Tagged]
It is a Syntax Error if the number of elements in the result of
TemplateStrings
of
TemplateLiteral
with argument
false
is greater than 2
32
- 1.
SubstitutionTemplate
[Yield, Await, Tagged]
:
TemplateHead
Expression
[+In, ?Yield, ?Await]
TemplateSpans
[?Yield, ?Await, ?Tagged]
It is a Syntax Error if the
[Tagged]
parameter was not set and
TemplateHead
Contains
NotEscapeSequence
.
TemplateSpans
[Yield, Await, Tagged]
:
TemplateTail
It is a Syntax Error if the
[Tagged]
parameter was not set and
TemplateTail
Contains
NotEscapeSequence
.
TemplateMiddleList
[Yield, Await, Tagged]
:
TemplateMiddle
Expression
[+In, ?Yield, ?Await]
TemplateMiddleList
[?Yield, ?Await, ?Tagged]
TemplateMiddle
Expression
[+In, ?Yield, ?Await]
It is a Syntax Error if the
[Tagged]
parameter was not set and
TemplateMiddle
Contains
NotEscapeSequence
.
13.2.9 Template Literals
Syntax
13.2.9.1 Static Semantics: Early Errors
314