From d5197a16ffcafd34e81ddc417447e4d7cdc6d6d8 Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Thu, 28 Nov 2019 12:44:08 -0800 Subject: [PATCH] Editorial: refactor control flow for RegExp assertions --- spec.html | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/spec.html b/spec.html index c85f000d0e..5676bcb212 100644 --- a/spec.html +++ b/spec.html @@ -31095,9 +31095,8 @@

Assertion

1. Return an internal Matcher closure that takes two arguments, a State _x_ and a Continuation _c_, and performs the following steps: 1. Let _e_ be _x_'s _endIndex_. - 1. If _e_ is zero, call _c_(_x_) and return its result. - 1. If _Multiline_ is *false*, return ~failure~. - 1. If the character _Input_[_e_ - 1] is one of |LineTerminator|, call _c_(_x_) and return its result. + 1. If _e_ is zero, or if _Multiline_ is *true* and the character _Input_[_e_ - 1] is one of |LineTerminator|, then + 1. Call _c_(_x_) and return its result. 1. Return ~failure~. @@ -31107,9 +31106,8 @@

Assertion

1. Return an internal Matcher closure that takes two arguments, a State _x_ and a Continuation _c_, and performs the following steps: 1. Let _e_ be _x_'s _endIndex_. - 1. If _e_ is equal to _InputLength_, call _c_(_x_) and return its result. - 1. If _Multiline_ is *false*, return ~failure~. - 1. If the character _Input_[_e_] is one of |LineTerminator|, call _c_(_x_) and return its result. + 1. If _e_ is equal to _InputLength_, or if _Multiline_ is *true* and the character _Input_[_e_] is one of |LineTerminator|, then + 1. Call _c_(_x_) and return its result. 1. Return ~failure~.

The production Assertion :: `\` `b` evaluates as follows:

@@ -31118,8 +31116,8 @@

Assertion

1. Let _e_ be _x_'s _endIndex_. 1. Call IsWordChar(_e_ - 1) and let _a_ be the Boolean result. 1. Call IsWordChar(_e_) and let _b_ be the Boolean result. - 1. If _a_ is *true* and _b_ is *false*, call _c_(_x_) and return its result. - 1. If _a_ is *false* and _b_ is *true*, call _c_(_x_) and return its result. + 1. If _a_ is *true* and _b_ is *false*, or if _a_ is *false* and _b_ is *true*, then + 1. Call _c_(_x_) and return its result. 1. Return ~failure~.

The production Assertion :: `\` `B` evaluates as follows:

@@ -31128,9 +31126,9 @@

Assertion

1. Let _e_ be _x_'s _endIndex_. 1. Call IsWordChar(_e_ - 1) and let _a_ be the Boolean result. 1. Call IsWordChar(_e_) and let _b_ be the Boolean result. - 1. If _a_ is *true* and _b_ is *false*, return ~failure~. - 1. If _a_ is *false* and _b_ is *true*, return ~failure~. - 1. Call _c_(_x_) and return its result. + 1. If _a_ is *true* and _b_ is *true*, or if _a_ is *false* and _b_ is *false*, then + 1. Call _c_(_x_) and return its result. + 1. Return ~failure~.

The production Assertion :: `(` `?` `=` Disjunction `)` evaluates as follows: