You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dd>It returns an Abstract Closure that takes a String and a non-negative integer, and returns a MatchResult.</dd>
34969
+
</dl>
34970
+
<emu-grammar>Pattern :: Disjunction</emu-grammar>
34967
34971
<emu-alg>
34968
34972
1. Let _m_ be CompileSubpattern of |Disjunction| with argument 1.
34969
34973
1. Return a new Abstract Closure with parameters (_str_, _index_) that captures _m_ and performs the following steps when called:
@@ -34980,7 +34984,7 @@ <h1>Pattern</h1>
34980
34984
1. Return _m_(_x_, _c_).
34981
34985
</emu-alg>
34982
34986
<emu-note>
34983
-
<p>A Pattern evaluates (“compiles”) to an Abstract Closure value. RegExpBuiltinExec can then apply this procedure to a String and an offset within the String to determine whether the pattern would match starting at exactly that offset within the String, and, if it does match, what the values of the capturing parentheses would be. The algorithms in <emu-xref href="#sec-pattern-semantics"></emu-xref> are designed so that compiling a pattern may throw a *SyntaxError* exception; on the other hand, once the pattern is successfully compiled, applying the resulting Abstract Closure to find a match in a String cannot throw an exception (except for any implementation-defined exceptions that can occur anywhere such as out-of-memory).</p>
34987
+
<p>A Pattern compiles to an Abstract Closure value. RegExpBuiltinExec can then apply this procedure to a String and an offset within the String to determine whether the pattern would match starting at exactly that offset within the String, and, if it does match, what the values of the capturing parentheses would be. The algorithms in <emu-xref href="#sec-pattern-semantics"></emu-xref> are designed so that compiling a pattern may throw a *SyntaxError* exception; on the other hand, once the pattern is successfully compiled, applying the resulting Abstract Closure to find a match in a String cannot throw an exception (except for any implementation-defined exceptions that can occur anywhere such as out-of-memory).</p>
34984
34988
</emu-note>
34985
34989
</emu-clause>
34986
34990
@@ -35895,7 +35899,7 @@ <h1>
35895
35899
1. Assert: _parseResult_ is a |Pattern| Parse Node.
35896
35900
1. Set _obj_.[[OriginalSource]] to _P_.
35897
35901
1. Set _obj_.[[OriginalFlags]] to _F_.
35898
-
1. Set _obj_.[[RegExpMatcher]] to the Abstract Closure that evaluates _parseResult_ by applying the semantics provided in <emu-xref href="#sec-pattern-semantics"></emu-xref> using _patternCharacters_ as the pattern's List of |SourceCharacter| values and _F_ as the flag parameters.
35902
+
1. Set _obj_.[[RegExpMatcher]] to CompilePattern of _parseResult_.
0 commit comments