-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Remove special string node type #59008
Remove special string node type #59008
Conversation
…to removeSpecialInterpolationBraceKinds
…to removeSpecialStringNodeType
@@ -33,9 +33,7 @@ Microsoft.CodeAnalysis.CSharp.SyntaxKind.InterpolatedMultiLineRawStringEndToken | |||
Microsoft.CodeAnalysis.CSharp.SyntaxKind.InterpolatedMultiLineRawStringStartToken = 9082 -> Microsoft.CodeAnalysis.CSharp.SyntaxKind | |||
Microsoft.CodeAnalysis.CSharp.SyntaxKind.InterpolatedSingleLineRawStringEndToken = 9081 -> Microsoft.CodeAnalysis.CSharp.SyntaxKind | |||
Microsoft.CodeAnalysis.CSharp.SyntaxKind.InterpolatedSingleLineRawStringStartToken = 9080 -> Microsoft.CodeAnalysis.CSharp.SyntaxKind | |||
Microsoft.CodeAnalysis.CSharp.SyntaxKind.MultiLineRawStringLiteralExpression = 9075 -> Microsoft.CodeAnalysis.CSharp.SyntaxKind |
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.
Consider resolving PROTOTYPE marker and updating compiler test plan while you're making a change #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.
Never mind, will probably need another PR anyways. I updated the test plan based on yesterday's feature review:
#55306
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.
LGTM Thanks (iteration 8)
@chsienki @dotnet/roslyn-compiler for second review (relates to raw string literals). Thanks |
Has the public API gone through API review? |
We discussed API review during the feature review. Cyrus is going to start the process. |
public static LiteralExpressionSyntax LiteralExpression(SyntaxKind kind) | ||
=> SyntaxFactory.LiteralExpression(kind, SyntaxFactory.Token(GetLiteralExpressionTokenKind(kind))); | ||
|
||
private static SyntaxKind GetLiteralExpressionTokenKind(SyntaxKind kind) |
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.
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.
LGTM aside from one question
public partial class SyntaxFactory | ||
{ | ||
/// <summary>Creates a new LiteralExpressionSyntax instance.</summary> | ||
public static LiteralExpressionSyntax LiteralExpression(SyntaxKind kind) |
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.
I didn't understand why these methods moved out of the generated file. Could you please clarify?
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.
they're not getting generated autoamtically as there isn't a 1:1 correspondance with node-type and node-kind. note: we will discuss this at the API review. I personally think we don't need/want the 1:1 correspondence.
It occurred to me in the meeting today that we don't actually need/want a special string string literal expression. Rather the singel string expression could have multiple kinds of tokens underneath it, all representing a constant string literal.
Relates to test plan #55306