-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add support for \e escape sequences in c# strings and characters #70497
Conversation
@@ -358,6 +358,7 @@ public override bool TryGetEscapeCharacter(VirtualChar ch, out char escapedChar) | |||
case '0': ch = '\0'; break; | |||
case 'a': ch = '\a'; break; | |||
case 'b': ch = '\b'; break; | |||
case 'e': ch = '\u001b'; break; |
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.
will add IDE tests as well. But just wanted to get the ball rolling on this.
Don't forget to update language feature status.md |
"\e" | ||
"""; | ||
var value = "\u001b"; | ||
var token = LexToken(text, TestOptions.RegularPreview); |
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.
RegularPreview
is the default. I think you intend to test using RegularNext
, which will be updated mechanically to Regular13
once it becomes available. #Closed
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.
done. thanks!
src/Compilers/CSharp/Test/Syntax/LexicalAndXml/LexicalErrorTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Syntax/LexicalAndXml/LexicalErrorTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Syntax/LexicalAndXml/LexicalErrorTests.cs
Outdated
Show resolved
Hide resolved
docs/Language Feature Status.md
Outdated
@@ -14,6 +14,7 @@ efforts behind them. | |||
| [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) | |
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.
Put whoever reviews as reviewers (me and someone else)
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.
will do. when i get a second reviewer :)
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.
Compiler side LGTM Thanks (iteration 6)
@dotnet/roslyn-compiler @jaredpar for another set of eyes. |
@dotnet/roslyn-compiler @RikkiGibson can i get a set of eyes on this small change? thanks! |
Language feature approved by the LDM for the any-time bucket: dotnet/csharplang#7400