Skip to content

Add support for \e escape sequences in c# strings and characters#70497

Merged
CyrusNajmabadi merged 14 commits intodotnet:mainfrom
CyrusNajmabadi:escapeChar
Oct 27, 2023
Merged

Add support for \e escape sequences in c# strings and characters#70497
CyrusNajmabadi merged 14 commits intodotnet:mainfrom
CyrusNajmabadi:escapeChar

Conversation

@CyrusNajmabadi
Copy link
Contributor

Language feature approved by the LDM for the any-time bucket: dotnet/csharplang#7400

@CyrusNajmabadi CyrusNajmabadi requested review from a team as code owners October 20, 2023 20:08
@ghost ghost added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 20, 2023
case '0': ch = '\0'; break;
case 'a': ch = '\a'; break;
case 'b': ch = '\b'; break;
case 'e': ch = '\u001b'; break;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add IDE tests as well. But just wanted to get the ball rolling on this.

@jaredpar
Copy link
Member

Don't forget to update language feature status.md

"\e"
""";
var value = "\u001b";
var token = LexToken(text, TestOptions.RegularPreview);
Copy link
Member

@jcouv jcouv Oct 20, 2023

Choose a reason for hiding this comment

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

RegularPreview is the default. I think you intend to test using RegularNext, which will be updated mechanically to Regular13 once it becomes available. #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done. thanks!

@CyrusNajmabadi CyrusNajmabadi requested a review from jcouv October 22, 2023 20:03
| [Params Span\<T> + Stackalloc any array type](https://github.com/dotnet/csharplang/issues/1757) | [params-span](https://github.com/dotnet/roslyn/tree/features/params-span) | [In Progress](https://github.com/dotnet/roslyn/issues/57049) | [cston](https://github.com/cston) | TBD | | [jaredpar](https://github.com/jaredpar) |
| [Default in deconstruction](https://github.com/dotnet/roslyn/pull/25562) | [decon-default](https://github.com/dotnet/roslyn/tree/features/decon-default) | [In Progress](https://github.com/dotnet/roslyn/issues/25559) | [jcouv](https://github.com/jcouv) | [gafter](https://github.com/gafter) | | [jcouv](https://github.com/jcouv) |
| [Roles/Extensions](https://github.com/dotnet/csharplang/issues/5497) | [roles](https://github.com/dotnet/roslyn/tree/features/roles) | [In Progress](https://github.com/dotnet/roslyn/issues/66722) | [jcouv](https://github.com/jcouv) | [AlekseyTs](https://github.com/AlekseyTs), [jjonescz](https://github.com/jjonescz) | | [MadsTorgersen](https://github.com/MadsTorgersen) |
| [Escape character](https://github.com/dotnet/csharplang/issues/7400) | N/A | [In Progress](https://github.com/dotnet/roslyn/pull/70497) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
Copy link
Member

Choose a reason for hiding this comment

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

CyrusNajmabadi

Put whoever reviews as reviewers (me and someone else)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do. when i get a second reviewer :)

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

Compiler side LGTM Thanks (iteration 6)

@jcouv jcouv self-assigned this Oct 23, 2023
@CyrusNajmabadi
Copy link
Contributor Author

@dotnet/roslyn-compiler @jaredpar for another set of eyes.

@CyrusNajmabadi
Copy link
Contributor Author

@dotnet/roslyn-compiler @RikkiGibson can i get a set of eyes on this small change? thanks!

@CyrusNajmabadi CyrusNajmabadi merged commit c03aef9 into dotnet:main Oct 27, 2023
@ghost ghost added this to the Next milestone Oct 27, 2023
@CyrusNajmabadi CyrusNajmabadi deleted the escapeChar branch October 27, 2023 04:14
@jjonescz jjonescz modified the milestones: Next, 17.9 P1 Oct 31, 2023
@jcouv jcouv changed the title Add support for \e escape sequences in c# strings and characters Add support for \e escape sequences in c# strings and characters (VS 17.9, .NET 9) Sep 17, 2024
@jcouv jcouv changed the title Add support for \e escape sequences in c# strings and characters (VS 17.9, .NET 9) Add support for \e escape sequences in c# strings and characters Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants