@@ -137,17 +137,12 @@ as well as a flag to indicate whether
137137its formatted representation requires isolation
138138from the surrounding text.
139139
140- For each _option_ value , the _resolved value_ MUST indicate if the value
140+ For each _option value_ , the _resolved value_ MUST indicate if the value
141141was directly set with a _literal_, as opposed to being resolved from a _variable_.
142142This is to allow _functions handlers_ to require specific _options_ to be set using _literals_.
143143
144144> For example, the _default functions_ `:number` and `:integer` require that the _option_
145- > `select` be set with a _literal_ (`plural`, `ordinal`, or `exact`).
146- > Allowing a _variable_ in this _option_ would produce a _message_ that
147- > is impossible to translate because the set of _keys_ is tied to the _selector_ chosen.
148-
149- > [!NOTE]
150- > Such information is irrelevant for _resolved values_ not used as the value of an _option_.
145+ > `select` be set with a _literal_ _option value_ (`plural`, `ordinal`, or `exact`).
151146
152147The form that _resolved values_ take is implementation-dependent,
153148and different implementations MAY choose to perform different levels of resolution.
@@ -177,7 +172,7 @@ and different implementations MAY choose to perform different levels of resoluti
177172> calling the `selectKeys(keys)` method of its _resolved value_
178173> did not emit an error.
179174> - Using a _variable_, the _resolved value_ of an _expression_
180- > could be used as an _operand_ or _option_ value if
175+ > could be used as an _operand_ or _option value_ if
181176> calling the `getValue()` method of its _resolved value_ did not emit an error.
182177> In this use case, the `resolvedOptions()` method could also
183178> provide a set of option values that could be taken into account by the called function.
@@ -246,8 +241,7 @@ Its _resolved value_ is defined by _literal resolution_.
246241the character sequence of the _text_ or _literal_
247242after any character escape has been converted to the escaped character.
248243
249- When a _literal_ is used as an _operand_
250- or on the right-hand side of an _option_,
244+ When a _literal_ is used as an _operand_ or as an _option value_,
251245the formatting function MUST treat its _resolved value_ the same
252246whether its value was originally a _quoted literal_ or an _unquoted literal_.
253247
@@ -329,15 +323,15 @@ the following steps are taken:
329323 - The resolved mapping of _options_.
330324 - If the _expression_ includes an _operand_, its _resolved value_.
331325
332- The form that resolved _operand_ and _option_ values take is implementation-defined.
326+ The form that resolved _operand_ and _option values_ take is implementation-defined.
333327
334328 An implementation MAY pass additional arguments to the _function handler_,
335329 as long as reasonable precautions are taken to keep the function interface
336330 simple and minimal, and avoid introducing potential security vulnerabilities.
337331
3383326. If the call succeeds,
339333 resolve the value of the _expression_ as the result of that function call.
340- The value MUST NOT be marked as a literal option value .
334+ The value MUST NOT be marked as a _literal_ _option value_ .
341335
342336 If the call fails or does not return a valid value,
343337 emit the appropriate _Message Function Error_ for the failure.
@@ -363,7 +357,7 @@ An implementation MAY allow custom functions to be defined by users.
363357Implementations that provide a means for defining custom functions
364358MUST provide a means for _function handlers_
365359to return _resolved values_ that contain enough information
366- to be used as _operands_ or _option_ values in subsequent _expressions_.
360+ to be used as _operands_ or _option values_ in subsequent _expressions_.
367361
368362The _resolved value_ returned by a _function handler_
369363MAY be different from the value of the _operand_ of the _function_.
@@ -399,12 +393,12 @@ For each _option_:
3993931. Let `res` be a new empty mapping.
4003941. For each _option_:
401395 1. Let `id` be the string value of the _identifier_ of the _option_.
402- 1. Let `rv` be the _resolved value_ of the _option_ value .
396+ 1. Let `rv` be the _resolved value_ of the _option value_ .
403397 1. If `rv` is a _fallback value_:
404398 1. If supported, emit a _Bad Option_ error.
405399 1. Else:
406- 1. If the _option_ value consists of a _literal_:
407- 1. Mark `rv` as a literal option value .
400+ 1. If the _option value_ consists of a _literal_:
401+ 1. Mark `rv` as a _literal_ _option value_ .
408402 1. Set `res[id]` to be `rv`.
4094031. Return `res`.
410404
@@ -428,7 +422,7 @@ The _resolved value_ of _markup_ includes the following fields:
428422
429423- The type of the markup: open, standalone, or close
430424- The _identifier_ of the _markup_
431- - The resolved _options_ values after _option resolution_.
425+ - The resolved mapping of _options_ after _option resolution_.
432426
433427If the resolved mapping of _options_ includes any _`u:` options_
434428supported by the implementation, process them as specified.
@@ -440,8 +434,8 @@ The resolution of _markup_ MUST always succeed.
440434
441435A **_<dfn>fallback value</dfn>_** is the _resolved value_ for
442436an _expression_ or _variable_ when that _expression_ or _variable_ fails to resolve.
443- It contains a string representation that is used for its formatting,
444- and no option values .
437+ It contains a string representation that is used for its formatting.
438+ All _options_ are removed .
445439
446440The _resolved value_ of _text_, _literal_, and _markup_ MUST NOT be a _fallback value_.
447441
@@ -453,7 +447,7 @@ An _expression_ fails to resolve when:
453447
454448- A _variable_ used as its _operand_ resolves to a _fallback value_.
455449 Note that an _expression_ does not necessarily fail to resolve
456- if an _option_ resolves with a _fallback value_.
450+ if an _option value_ resolves with a _fallback value_.
457451- No _function handler_ is found for a _function_ _identifier_.
458452- Calling a _function handler_ fails or does not return a valid value.
459453
0 commit comments