atom / language-csharp

C# language support for Atom
Other
62 stars 52 forks source link

Some combination of braces, quotes and a comment containing the word "class" seems to invert "in string" state of highlighter #97

Closed poizan42 closed 6 years ago

poizan42 commented 7 years ago

I noticed this here: https://github.com/StephenCleary/AsyncEx/blob/master/src/Nito.AsyncEx.Context/AsyncContext.cs

Note that the state of whether it's inside or outside a string is flipped after DebuggerDisplay("Id = {Id}.

Here is an almost minimal example that demonstrates the problem:

    // class x
    "{}"
    public; // "int"

The word class inside the comment followed by some other word seems to be neccessary. Either of the braces needs to be there but both are not neccessary. The last line is just to demonstrate that the inside/outside string state has been flipped.