-
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
Raw string literal with u8
suffix, either and/or editor and compiler parsing issue
#63669
Comments
What do you mean by this? |
Like in the screenshot. It is showing syntax highlighting because it isn't literal anymore. |
? I'm not sure what you're talking about. Can you clarify? |
@ericwj i still don't know what issue you're having :) You cannot mix interpolated strings (those with however, in your examples, you are not using interpolated stings. You're using normal raw-string-literals. And there does not seem to be any issues here. The code is compiling properly and as expected. |
A raw-utf8-string-literal has no restrictions/rules about |
Yes, my mistake is that I did add That answers the question you quoted in the issue. I simply don't add Then what remains is whether the syntax highlighting that confused me is either a compiler issue or merely an issue with VS 17.4.0 Preview 1. It would still be a compiler issue if it told the editor that there was an interpolation hole when there was not. At least it is weird that the editor and compiler don't agree, assuming the syntax parsed by the compiler is what is feeding the syntax highlighting. |
I guess, @ericwj misinterpreted json string classification as consider the |
IDE recognized your string as a valid json, so it tries to help you by enabling json syntax highlighting inside that string |
Hmm. And it doesn't do that for |
Because |
There is no interpolation hole.
They 100% agree here.
The syntax highlighting is marking up your string content as json, which matches that you were in fact writing json :) You can control that here: |
Correct. That's not legal json. |
I doesn't try to classify parts of the string, but a string as a whole |
OK, that's it then. I have never seen this before. And the colors are pretty much the same as for regular code. Thanks for your time. |
Btw @CyrusNajmabadi on your screenshot after Viewing the decompiled source code shows me: the |
Also close issue as "not planned" please. It better fits here |
@DoctorKrolic that's simply how ILSpy chooses to show it. It's a ROS over a segment of the data in the dll. |
Version Used:
Compiler version: '4.4.0-1.22403.13 (ebbf56c)'.
Language version: preview.
Steps to Reproduce:
Re #58848
I bump into this.
"":
{
and}
as interpolation holes$$
u8
is no longer allowed, even though I don't have interpolation holesExpected Behavior:
I'm not sure whether this parsing is just a bug, or how it is possible to define a raw literal string as
u8
if it contains an arbitrary number of{
and}
.Actual Behavior:
The text was updated successfully, but these errors were encountered: