From dc5145be4e32f1bbb1f3c48e91340715139b6063 Mon Sep 17 00:00:00 2001 From: Ben Kelly Date: Tue, 31 Aug 2021 20:57:21 +0000 Subject: [PATCH] Update spec text to match final implementation. (#99) --- spec.bs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spec.bs b/spec.bs index 72e5aa5..9ba20ac 100644 --- a/spec.bs +++ b/spec.bs @@ -1298,15 +1298,16 @@ To generate a regular expression and name list from a given [= 1. Else if |part|'s [=part/type=] is "`full-wildcard`", then set |regexp value| to [=full wildcard regexp value=]. 1. If |part|'s [=part/prefix=] is the empty string and |part|'s [=part/suffix=] is the empty string:
-

If there is no [=part/prefix=] or [=part/suffix=] then generation depends on the modifier. If there is no modifier, it uses the following simple form: -

`()` -

If there is a modifier, however, we will use the more complex form: +

If there is no [=part/prefix=] or [=part/suffix=] then generation depends on the modifier. If there is no modifier or just the optional modifier, it uses the following simple form: +

`()` +

If there is a repeating modifier, however, we will use the more complex form:

`((?:))`

- 1. If |part|'s [=part/modifier=] is "`none`", then: + 1. If |part|'s [=part/modifier=] is "`none`" or "`optional`", then: 1. Append "`(`" to the end of |result|. 1. Append |regexp value| to the end of |result|. 1. Append "`)`" to the end of |result|. + 1. Append the result of running [=convert a modifier to a string=] given |part|'s [=part/modifier=] to the end of |result|. 1. Else: 1. Append "`((?:`" to the end of |result|. 1. Append |regexp value| to the end of |result|.