-
-
Notifications
You must be signed in to change notification settings - Fork 35
Clarify option literalness details #1027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
aphillips
merged 3 commits into
unicode-org:main
from
gibson042:gh-1026-option-literalness
Feb 21, 2025
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -140,6 +140,7 @@ from the surrounding text. | |
| To allow for _function handlers_ to ensure that certain _option_ values are set by _literals_, | ||
| the _resolved value_ of each _option_ value MUST include information about | ||
| whether the _option_ value is a _literal_ or a _variable_. | ||
| Note that this information is irrelevant for a _resolved value_ that is not used as the value of an _option_. | ||
gibson042 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The form that _resolved values_ take is implementation-dependent, | ||
| and different implementations MAY choose to perform different levels of resolution. | ||
|
|
@@ -329,6 +330,7 @@ the following steps are taken: | |
|
|
||
| 6. If the call succeeds, | ||
| resolve the value of the _expression_ as the result of that function call. | ||
| The value MUST NOT be marked as a literal option value. | ||
|
|
||
| If the call fails or does not return a valid value, | ||
| emit the appropriate _Message Function Error_ for the failure. | ||
|
|
@@ -395,7 +397,7 @@ For each _option_: | |
| 1. If supported, emit a _Bad Option_ error. | ||
| 1. Else: | ||
| 1. If the _option_ value consists of a _literal_: | ||
| 1. Include that information in `rv`. | ||
| 1. Mark `rv` as a literal option value. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this wording change very much There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change does seem good. |
||
| 1. Set `res[id]` to be `rv`. | ||
| 1. Return `res`. | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Is it perhaps not clear that "option value" is a syntax feature? This phrase seems to imply that a resolved value could be an option value, and that doesn't really make sense.
We probably ought to explicitly define option value as a term in the Syntax section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do that in a separate PR.