Skip to content

Commit

Permalink
Editorial: Use consistent wording for List iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Nov 14, 2023
1 parent f2bdae8 commit 9514863
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 25 deletions.
21 changes: 11 additions & 10 deletions spec/datetimeformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ <h1>
1. Let _bestFormat_ be BasicFormatMatcher(_formatOptions_, _formats_).
1. Else,
1. Let _bestFormat_ be BestFitFormatMatcher(_formatOptions_, _formats_).
1. For each row in <emu-xref href="#table-datetimeformat-components"></emu-xref>, except the header row, in table order, do
1. For each row of <emu-xref href="#table-datetimeformat-components"></emu-xref>, except the header row, in table order, do
1. Let _prop_ be the name given in the Property column of the row.
1. If _bestFormat_ has a field [[&lt;_prop_&gt;]], then
1. Let _p_ be _bestFormat_.[[&lt;_prop_&gt;]].
Expand Down Expand Up @@ -896,7 +896,8 @@ <h1>
1. Assert: Type(_formats_) is List.
1. For each element _format_ of _formats_, do
1. Let _score_ be 0.
1. For each property name _property_ shown in <emu-xref href="#table-datetimeformat-components"></emu-xref>, do
1. For each row of <emu-xref href="#table-datetimeformat-components"></emu-xref>, except the header row, in table order, do
1. Let _property_ be the name given in the Property column of the row.
1. If _options_ has a field [[&lt;_property_&gt;]], let _optionsProp_ be _options_.[[&lt;_property_&gt;]]; else let _optionsProp_ be *undefined*.
1. If _format_ has a field [[&lt;_property_&gt;]], let _formatProp_ be _format_.[[&lt;_property_&gt;]]; else let _formatProp_ be *undefined*.
1. If _optionsProp_ is *undefined* and _formatProp_ is not *undefined*, then
Expand Down Expand Up @@ -1007,7 +1008,7 @@ <h1>
1. Let _nf3_ be ! Construct(%NumberFormat%, &laquo; _locale_, _nf3Options_ &raquo;).
1. Let _tm_ be ToLocalTime(ℤ(ℝ(_x_) &times; 10<sup>6</sup>), _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]).
1. Let _result_ be a new empty List.
1. For each Record { [[Type]], [[Value]] } _patternPart_ in _patternParts_, do
1. For each Record { [[Type]], [[Value]] } _patternPart_ of _patternParts_, do
1. Let _p_ be _patternPart_.[[Type]].
1. If _p_ is *"literal"*, then
1. Append the Record { [[Type]]: *"literal"*, [[Value]]: _patternPart_.[[Value]] } to _result_.
Expand Down Expand Up @@ -1101,7 +1102,7 @@ <h1>
<emu-alg>
1. Let _parts_ be ? PartitionDateTimePattern(_dateTimeFormat_, _x_).
1. Let _result_ be the empty String.
1. For each Record { [[Type]], [[Value]] } _part_ in _parts_, do
1. For each Record { [[Type]], [[Value]] } _part_ of _parts_, do
1. Set _result_ to the string-concatenation of _result_ and _part_.[[Value]].
1. Return _result_.
</emu-alg>
Expand All @@ -1120,7 +1121,7 @@ <h1>
1. Let _parts_ be ? PartitionDateTimePattern(_dateTimeFormat_, _x_).
1. Let _result_ be ! ArrayCreate(0).
1. Let _n_ be 0.
1. For each Record { [[Type]], [[Value]] } _part_ in _parts_, do
1. For each Record { [[Type]], [[Value]] } _part_ of _parts_, do
1. Let _O_ be OrdinaryObjectCreate(%Object.prototype%).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"type"*, _part_.[[Type]]).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"value"*, _part_.[[Value]]).
Expand Down Expand Up @@ -1184,13 +1185,13 @@ <h1>
1. Let _pattern_ be _dateTimeFormat_.[[Pattern]].
1. Let _patternParts_ be PartitionPattern(_pattern_).
1. Let _resultParts_ be ! FormatDateTimePattern(_dateTimeFormat_, _patternParts_, _x_, *undefined*).
1. For each Record { [[Type]], [[Value]] } _r_ in _resultParts_, do
1. For each Record { [[Type]], [[Value]] } _r_ of _resultParts_, do
1. Append the Record { [[Type]]: _r_.[[Type]], [[Value]]: _r_.[[Value]], [[Source]]: *"shared"* } to _collapsedResult_.
1. Return _collapsedResult_.
1. Let _rangeResult_ be a new empty List.
1. If _selectedRangePattern_ is *undefined*, then
1. Set _selectedRangePattern_ to _rangePatterns_.[[Default]].
1. For each Record { [[Pattern]], [[Source]] } _rangePatternPart_ in _selectedRangePattern_.[[PatternParts]], do
1. For each Record { [[Pattern]], [[Source]] } _rangePatternPart_ of _selectedRangePattern_.[[PatternParts]], do
1. Let _pattern_ be _rangePatternPart_.[[Pattern]].
1. Let _source_ be _rangePatternPart_.[[Source]].
1. If _source_ is *"startRange"* or *"shared"*, then
Expand All @@ -1199,7 +1200,7 @@ <h1>
1. Let _z_ be _y_.
1. Let _patternParts_ be PartitionPattern(_pattern_).
1. Let _resultParts_ be ! FormatDateTimePattern(_dateTimeFormat_, _patternParts_, _z_, _selectedRangePattern_).
1. For each Record { [[Type]], [[Value]] } _r_ in _resultParts_, do
1. For each Record { [[Type]], [[Value]] } _r_ of _resultParts_, do
1. Append the Record { [[Type]]: _r_.[[Type]], [[Value]]: _r_.[[Value]], [[Source]]: _source_ } to _rangeResult_.
1. Return _rangeResult_.
</emu-alg>
Expand All @@ -1218,7 +1219,7 @@ <h1>
<emu-alg>
1. Let _parts_ be ? PartitionDateTimeRangePattern(_dateTimeFormat_, _x_, _y_).
1. Let _result_ be the empty String.
1. For each Record { [[Type]], [[Value]], [[Source]] } _part_ in _parts_, do
1. For each Record { [[Type]], [[Value]], [[Source]] } _part_ of _parts_, do
1. Set _result_ to the string-concatenation of _result_ and _part_.[[Value]].
1. Return _result_.
</emu-alg>
Expand All @@ -1238,7 +1239,7 @@ <h1>
1. Let _parts_ be ? PartitionDateTimeRangePattern(_dateTimeFormat_, _x_, _y_).
1. Let _result_ be ! ArrayCreate(0).
1. Let _n_ be 0.
1. For each Record { [[Type]], [[Value]], [[Source]] } _part_ in _parts_, do
1. For each Record { [[Type]], [[Value]], [[Source]] } _part_ of _parts_, do
1. Let _O_ be OrdinaryObjectCreate(%Object.prototype%).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"type"*, _part_.[[Type]]).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"value"*, _part_.[[Value]]).
Expand Down
4 changes: 2 additions & 2 deletions spec/listformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ <h1>
<emu-alg>
1. Let _parts_ be CreatePartsFromList(_listFormat_, _list_).
1. Let _result_ be an empty String.
1. For each Record { [[Type]], [[Value]] } _part_ in _parts_, do
1. For each Record { [[Type]], [[Value]] } _part_ of _parts_, do
1. Set _result_ to the string-concatenation of _result_ and _part_.[[Value]].
1. Return _result_.
</emu-alg>
Expand All @@ -360,7 +360,7 @@ <h1>
1. Let _parts_ be CreatePartsFromList(_listFormat_, _list_).
1. Let _result_ be ! ArrayCreate(0).
1. Let _n_ be 0.
1. For each Record { [[Type]], [[Value]] } _part_ in _parts_, do
1. For each Record { [[Type]], [[Value]] } _part_ of _parts_, do
1. Let _O_ be OrdinaryObjectCreate(%Object.prototype%).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"type"*, _part_.[[Type]]).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"value"*, _part_.[[Value]]).
Expand Down
2 changes: 1 addition & 1 deletion spec/locales-currencies-tz.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h1>
1. Let _components_ be UnicodeExtensionComponents(_extension_).
1. For each element _attr_ of _components_.[[Attributes]], do
1. Set _newExtension_ to the string-concatenation of _newExtension_, *"-"*, and _attr_.
1. For each Record { [[Key]], [[Value]] } _keyword_ in _components_.[[Keywords]], do
1. For each Record { [[Key]], [[Value]] } _keyword_ of _components_.[[Keywords]], do
1. Set _newExtension_ to the string-concatenation of _newExtension_, *"-"*, and _keyword_.[[Key]].
1. If _keyword_.[[Value]] is not the empty String, then
1. Set _newExtension_ to the string-concatenation of _newExtension_, *"-"*, and _keyword_.[[Value]].
Expand Down
16 changes: 8 additions & 8 deletions spec/numberformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ <h1>
1. Append the Record { [[Type]]: *"literal"*, [[Value]]: _patternPart_.[[Value]] } to _result_.
1. Else if _p_ is equal to *"number"*, then
1. Let _notationSubParts_ be PartitionNotationSubPattern(_numberFormat_, _x_, _n_, _exponent_).
1. For each Record { [[Type]], [[Value]] } _subPart_ in _notationSubParts_, do
1. For each Record { [[Type]], [[Value]] } _subPart_ of _notationSubParts_, do
1. Append _subPart_ to _result_.
1. Else if _p_ is equal to *"plusSign"*, then
1. Let _plusSignSymbol_ be the ILND String representing the plus sign.
Expand Down Expand Up @@ -1279,7 +1279,7 @@ <h1>
<emu-alg>
1. Let _parts_ be PartitionNumberPattern(_numberFormat_, _x_).
1. Let _result_ be the empty String.
1. For each Record { [[Type]], [[Value]] } _part_ in _parts_, do
1. For each Record { [[Type]], [[Value]] } _part_ of _parts_, do
1. Set _result_ to the string-concatenation of _result_ and _part_.[[Value]].
1. Return _result_.
</emu-alg>
Expand All @@ -1298,7 +1298,7 @@ <h1>
1. Let _parts_ be PartitionNumberPattern(_numberFormat_, _x_).
1. Let _result_ be ! ArrayCreate(0).
1. Let _n_ be 0.
1. For each Record { [[Type]], [[Value]] } _part_ in _parts_, do
1. For each Record { [[Type]], [[Value]] } _part_ of _parts_, do
1. Let _O_ be OrdinaryObjectCreate(%Object.prototype%).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"type"*, _part_.[[Type]]).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"value"*, _part_.[[Value]]).
Expand Down Expand Up @@ -1881,14 +1881,14 @@ <h1>
1. Let _yResult_ be PartitionNumberPattern(_numberFormat_, _y_).
1. If FormatNumeric(_numberFormat_, _x_) is equal to FormatNumeric(_numberFormat_, _y_), then
1. Let _appxResult_ be FormatApproximately(_numberFormat_, _xResult_).
1. For each element _r_ in _appxResult_, do
1. For each element _r_ of _appxResult_, do
1. Set _r_.[[Source]] to *"shared"*.
1. Return _appxResult_.
1. For each element _r_ in _xResult_, do
1. For each element _r_ of _xResult_, do
1. Append the Record { [[Type]]: _r_.[[Type]], [[Value]]: _r_.[[Value]], [[Source]]: *"startRange"* } to _result_.
1. Let _rangeSeparator_ be an ILND String value used to separate two numbers.
1. Append the Record { [[Type]]: *"literal"*, [[Value]]: _rangeSeparator_, [[Source]]: *"shared"* } to _result_.
1. For each element _r_ in _yResult_, do
1. For each element _r_ of _yResult_, do
1. Append the Record { [[Type]]: _r_.[[Type]], [[Value]]: _r_.[[Value]], [[Source]]: *"endRange"* } to _result_.
1. Return CollapseNumberRange(_result_).
</emu-alg>
Expand Down Expand Up @@ -1948,7 +1948,7 @@ <h1>
<emu-alg>
1. Let _parts_ be ? PartitionNumberRangePattern(_numberFormat_, _x_, _y_).
1. Let _result_ be the empty String.
1. For each element _part_ in _parts_, do
1. For each element _part_ of _parts_, do
1. Set _result_ to the string-concatenation of _result_ and _part_.[[Value]].
1. Return _result_.
</emu-alg>
Expand All @@ -1970,7 +1970,7 @@ <h1>
1. Let _parts_ be ? PartitionNumberRangePattern(_numberFormat_, _x_, _y_).
1. Let _result_ be ! ArrayCreate(0).
1. Let _n_ be 0.
1. For each element _part_ in _parts_, do
1. For each element _part_ of _parts_, do
1. Let _O_ be OrdinaryObjectCreate(%Object.prototype%).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"type"*, _part_.[[Type]]).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"value"*, _part_.[[Value]]).
Expand Down
8 changes: 4 additions & 4 deletions spec/relativetimeformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,12 @@ <h1>
<emu-alg>
1. Let _patternParts_ be PartitionPattern(_pattern_).
1. Let _result_ be a new empty List.
1. For each Record { [[Type]], [[Value]] } _patternPart_ in _patternParts_, do
1. For each Record { [[Type]], [[Value]] } _patternPart_ of _patternParts_, do
1. If _patternPart_.[[Type]] is *"literal"*, then
1. Append the Record { [[Type]]: *"literal"*, [[Value]]: _patternPart_.[[Value]], [[Unit]]: ~empty~ } to _result_.
1. Else,
1. Assert: _patternPart_.[[Type]] is *"0"*.
1. For each Record { [[Type]], [[Value]] } _part_ in _parts_, do
1. For each Record { [[Type]], [[Value]] } _part_ of _parts_, do
1. Append the Record { [[Type]]: _part_.[[Type]], [[Value]]: _part_.[[Value]], [[Unit]]: _unit_ } to _result_.
1. Return _result_.
</emu-alg>
Expand Down Expand Up @@ -394,7 +394,7 @@ <h1>
<emu-alg>
1. Let _parts_ be ? PartitionRelativeTimePattern(_relativeTimeFormat_, _value_, _unit_).
1. Let _result_ be an empty String.
1. For each Record { [[Type]], [[Value]], [[Unit]] } _part_ in _parts_, do
1. For each Record { [[Type]], [[Value]], [[Unit]] } _part_ of _parts_, do
1. Set _result_ to the string-concatenation of _result_ and _part_.[[Value]].
1. Return _result_.
</emu-alg>
Expand All @@ -416,7 +416,7 @@ <h1>
1. Let _parts_ be ? PartitionRelativeTimePattern(_relativeTimeFormat_, _value_, _unit_).
1. Let _result_ be ! ArrayCreate(0).
1. Let _n_ be 0.
1. For each Record { [[Type]], [[Value]], [[Unit]] } _part_ in _parts_, do
1. For each Record { [[Type]], [[Value]], [[Unit]] } _part_ of _parts_, do
1. Let _O_ be OrdinaryObjectCreate(%Object.prototype%).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"type"*, _part_.[[Type]]).
1. Perform ! CreateDataPropertyOrThrow(_O_, *"value"*, _part_.[[Value]]).
Expand Down

0 comments on commit 9514863

Please sign in to comment.