Skip to content

Highlight that contextual keywords cannot contain escapes. - #1755

Merged
jskeet merged 1 commit into
draft-v8from
Nigel-Ecma-patch-1
Sep 9, 2026
Merged

Highlight that contextual keywords cannot contain escapes.#1755
jskeet merged 1 commit into
draft-v8from
Nigel-Ecma-patch-1

Conversation

@Nigel-Ecma

Copy link
Copy Markdown
Contributor

While reviewing #1696 I noticed that contextual keywords were not called out in prose as not allowing escapes. This does follow from the grammar as it does not allow them in contextual_keyword so calling them out in the prose isn't required. However maybe the list here reads as comprehensive even though its just an “e.g.” (not an “i.e.”), and calling it out seems harmless…

Tagged as C#8 as it may help support PR #1696, even though it is not a required change.

While reviewing #1696 I noticed that contextual keywords were not called out in prose as not allowing escapes. This does follow from the grammar as it does not allow them in *contextual_keyword* so calling them out in the prose isn't required. However maybe the list here reads as comprehensive even though its just an “e.g.” (not an “i.e.”), and calling it out seems harmless…
@Nigel-Ecma Nigel-Ecma added this to the C# 8.0 milestone Jul 25, 2026

@RexJaeschke RexJaeschke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, Nigel. BTW, at the very end of 6.4.4 Keywords, in the coverage of contextual keywords, we have the following Note:

Note: When used as contextual keywords, these identifiers cannot contain Unicode_Escape_Sequences. end note

@BillWagner BillWagner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree that this is a good change. It reinforces the rule.

@jskeet jskeet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yup, lgtm.

@jskeet
jskeet merged commit e1406af into draft-v8 Sep 9, 2026
9 checks passed
@jskeet
jskeet deleted the Nigel-Ecma-patch-1 branch September 9, 2026 20:02
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.

4 participants