Skip to content

Commit

Permalink
Implement classification for UTF8 String Literals (#60265)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekseyTs committed Mar 21, 2022
1 parent 428d3b3 commit 9276c09
Show file tree
Hide file tree
Showing 3 changed files with 338 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/CSharpExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public static bool IsReservedKeyword(this SyntaxToken token)

public static bool IsVerbatimStringLiteral(this SyntaxToken token)
{
return token.IsKind(SyntaxKind.StringLiteralToken) && token.Text.Length > 0 && token.Text[0] == '@';
return token.Kind() is (SyntaxKind.StringLiteralToken or SyntaxKind.UTF8StringLiteralToken) && token.Text.Length > 0 && token.Text[0] == '@';
}

public static bool IsVerbatimIdentifier(this SyntaxToken token)
Expand Down
Loading

0 comments on commit 9276c09

Please sign in to comment.