Skip to content

[Version 11.0] Feature support for raw string literals - #1599

Draft
RexJaeschke wants to merge 9 commits into
draft-v11from
v11-raw-string-literals
Draft

RexJaeschke wants to merge 9 commits into
draft-v11from
v11-raw-string-literals

Conversation

@RexJaeschke

Copy link
Copy Markdown
Contributor

This is Rex's adaptation of the corresponding MS proposal.

@RexJaeschke RexJaeschke added this to the C# 11 milestone Mar 8, 2026
@RexJaeschke RexJaeschke added type: feature This issue describes a new feature Review: pending Proposal is available for review labels Mar 8, 2026
@RexJaeschke
RexJaeschke marked this pull request as draft March 8, 2026 14:27
@BillWagner
BillWagner force-pushed the v11-raw-string-literals branch from 3ba09fe to 31f5de0 Compare April 29, 2026 19:30
@BillWagner
BillWagner force-pushed the v11-raw-string-literals branch from 8da2fed to d8dd2c2 Compare May 13, 2026 16:37
@BillWagner
BillWagner force-pushed the v11-raw-string-literals branch from d8dd2c2 to caadf30 Compare June 24, 2026 20:15
@BillWagner

Copy link
Copy Markdown
Member

An earlier version of this feature is already present on v11-alpha from a prior meeting. Edits made to this PR since then are not yet on v11-alpha; they will land at the next propagation. If you need them on v11-alpha sooner, please open a separate PR targeting v11-alpha.
Thanks!

@BillWagner
BillWagner force-pushed the v11-raw-string-literals branch from caadf30 to b96eebd Compare July 24, 2026 19:57
@BillWagner
BillWagner force-pushed the v11-raw-string-literals branch 4 times, most recently from 3210fac to 689f654 Compare September 21, 2026 19:20
@BillWagner
BillWagner force-pushed the v11-raw-string-literals branch from bcc857f to 7d318aa Compare October 14, 2026 18:11
BillWagner added a commit that referenced this pull request Oct 14, 2026
[Version 11.0] Feature support for raw string literals
Authoritative source v11-raw-string-literals bcc857f; reviewed-source replay 7d318aa.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 21570b74-c6f5-4fc5-ab6d-7546918d6ddb
RexJaeschke and others added 7 commits November 12, 2026 17:25
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 21570b74-c6f5-4fc5-ab6d-7546918d6ddb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 361b9a77-2b4c-45e6-969f-e6785c47f27e
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 21570b74-c6f5-4fc5-ab6d-7546918d6ddb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 361b9a77-2b4c-45e6-969f-e6785c47f27e
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 21570b74-c6f5-4fc5-ab6d-7546918d6ddb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 361b9a77-2b4c-45e6-969f-e6785c47f27e
- grammar rule has a space instead of an underscore.
- a couple locations where raw interpolated strings weren't added.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 21570b74-c6f5-4fc5-ab6d-7546918d6ddb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 361b9a77-2b4c-45e6-969f-e6785c47f27e
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: bce5e82a-89fd-4655-bc08-6d6ba97f0cc6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 21570b74-c6f5-4fc5-ab6d-7546918d6ddb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 361b9a77-2b4c-45e6-969f-e6785c47f27e
Preserve the existing raw-string derivations and multiplicities: single-line (content-or-interpolation)+ and multiline (content-or-interpolation-or-newline)*. Keep text segments lexical and interpolate expressions syntactically, as the adjacent regular and verbatim string productions do. This removes illegal ANTLR lexer-to-parser references without changing contextual lexical restrictions or authored examples.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 21570b74-c6f5-4fc5-ab6d-7546918d6ddb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 361b9a77-2b4c-45e6-969f-e6785c47f27e
The CRLF alternative in an ANTLR negated set is illegal and redundant with the existing individual CR and LF exclusions. Preserve exactly the five excluded newline code points using the same single-character-set notation as adjacent string-literal productions; no prose or examples changed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 21570b74-c6f5-4fc5-ab6d-7546918d6ddb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 361b9a77-2b4c-45e6-969f-e6785c47f27e
@BillWagner
BillWagner force-pushed the v11-raw-string-literals branch from 7d318aa to 2079254 Compare November 12, 2026 23:37
BillWagner added a commit that referenced this pull request Nov 12, 2026
Preserve current committee source and genuine feature additions; resolve the recorded mechanical source overlap.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 361b9a77-2b4c-45e6-969f-e6785c47f27e
Add more normative text regarding the processing of `{`, `}`, and `"` characters in a raw string literal.
Whitespace only lines needn't be as long as the prefix. However, whitespace after the prefix length is preserved in the output string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review: pending Proposal is available for review type: feature This issue describes a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants