Skip to content

Change the "pattern selection" text #388

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
merged 9 commits into from
Jun 19, 2023
Merged

Change the "pattern selection" text #388

merged 9 commits into from
Jun 19, 2023

Conversation

aphillips
Copy link
Member

In PR #385 from @catamorphism I made the comment which suggested a different approach to pattern selection. This PR addresses that comment.

In PR #385 I made the [comment](#385 (comment)) which suggested a different approach to pattern selection. This PR addresses that comment.
@aphillips aphillips requested review from stasm, eemeli and mihnita June 5, 2023 21:37
aphillips added 3 commits June 6, 2023 08:09
- Make the text use semantic breaks.
- Make the terminology consistent with the ABNF.

In particular, the term `selector` now refers to the entire `match` statement and the term `expression` is used to refer to a specific selector expression.
Copy link
Collaborator

@eemeli eemeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly would like yet moar newlines. The line 35 change is the only one adding a few words.

This is a bit less precise than the previous text, but I'm fine with that.

When a _message_ contains a _match_ statement with one or more _expressions_, the implementation needs to determine which _variant_ will be used to provide the _pattern_ for the formatting operation.
This is done by ordering the available _variant_ statements according to their _key_ values.

The number of _keys_ in each _variant_ **_MUST_** equal the number of _expressions_ in the _selectors_.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The styling we have in the readme for normative key words doesn't quite match this:

The key words `MAY`, `MUST`, `MUST NOT`, `OPTIONAL`, `RECOMMENDED`,
`SHOULD`, and `SHOULD NOT` in this document are to be interpreted as
described in BCP 14 [RFC2119] [RFC8174].

I don't really mind what we use, as long as we're consistent.

aphillips and others added 5 commits June 6, 2023 11:07
Co-authored-by: Eemeli Aro <eemeli@mozilla.com>
Co-authored-by: Eemeli Aro <eemeli@mozilla.com>
Co-authored-by: Eemeli Aro <eemeli@mozilla.com>
Co-authored-by: Eemeli Aro <eemeli@mozilla.com>
Co-authored-by: Eemeli Aro <eemeli@mozilla.com>
@aphillips
Copy link
Member Author

@eemeli Thanks for the review. I have committed your changes to the line-breaks. The wording change was also committed (since it was an improvement/oversight on my part).

@aphillips aphillips merged commit 784d988 into main Jun 19, 2023
@aphillips aphillips deleted the aphillips-patch-2 branch July 24, 2023 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants