Add XML documentation for GlobalStatementSyntax - #80697
#80697Merged
CyrusNajmabadi merged 5 commits intoOct 22, 2025
maindotnet/roslyn:mainfrom
copilot/add-globalstatementsyntax-docsdotnet/roslyn:copilot/add-globalstatementsyntax-docsCopy head branch name to clipboard
Merged
Add XML documentation for GlobalStatementSyntax#80697CyrusNajmabadi merged 5 commits intomaindotnet/roslyn:mainfrom copilot/add-globalstatementsyntax-docsdotnet/roslyn:copilot/add-globalstatementsyntax-docsCopy head branch name to clipboard
CyrusNajmabadi merged 5 commits into
maindotnet/roslyn:mainfrom
copilot/add-globalstatementsyntax-docsdotnet/roslyn:copilot/add-globalstatementsyntax-docsCopy head branch name to clipboard
Conversation
Co-authored-by: CyrusNajmabadi <4564579+CyrusNajmabadi@users.noreply.github.com>
Co-authored-by: CyrusNajmabadi <4564579+CyrusNajmabadi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add documentation for GlobalStatementSyntax
Add XML documentation for GlobalStatementSyntax
Oct 14, 2025
| <Node Name="GlobalStatementSyntax" Base="MemberDeclarationSyntax"> | ||
| <Kind Name="GlobalStatement"/> | ||
| <TypeComment> | ||
| <summary>Represents a global statement in a compilation unit. Global statements are top-level statements that can appear in a C# program or script. In regular C# programs (C# 9.0+), they are synthesized into a Main method. In C# scripts, they are executed as top-level code. See https://github.com/dotnet/csharplang/blob/main/proposals/top-level-statements.md for more information.</summary> |
Contributor
There was a problem hiding this comment.
@copilot consider mentioning that each statement will be wrapped in a GlobalStatementSyntax at the top level. #Closed
Contributor
Author
There was a problem hiding this comment.
Done in commit e0a8c9a. Added clarification that each statement at the top level of a compilation unit is wrapped in a GlobalStatementSyntax node.
Co-authored-by: CyrusNajmabadi <4564579+CyrusNajmabadi@users.noreply.github.com>
CyrusNajmabadi
approved these changes
Oct 14, 2025
CyrusNajmabadi
marked this pull request as ready for review
October 14, 2025 12:47
Contributor
|
@dotnet/roslyn-compiler ptal. |
333fred
reviewed
Oct 15, 2025
| <Node Name="GlobalStatementSyntax" Base="MemberDeclarationSyntax"> | ||
| <Kind Name="GlobalStatement"/> | ||
| <TypeComment> | ||
| <summary>Represents a global statement in a compilation unit. Each statement at the top level of a compilation unit is wrapped in a GlobalStatementSyntax node. Global statements are top-level statements that can appear in a C# program or script. In regular C# programs (C# 9.0+), they are synthesized into a Main method. In C# scripts, they are executed as top-level code. See https://github.com/dotnet/csharplang/blob/main/proposals/top-level-statements.md for more information.</summary> |
Member
There was a problem hiding this comment.
This link 404s. Does it really need to be here in the first place?
| public InterpolationFormatClauseSyntax WithFormatStringToken(SyntaxToken formatStringToken) => Update(this.ColonToken, formatStringToken); | ||
| } | ||
|
|
||
| /// <summary>Represents a global statement in a compilation unit. Each statement at the top level of a compilation unit is wrapped in a GlobalStatementSyntax node. Global statements are top-level statements that can appear in a C# program or script. In regular C# programs (C# 9.0+), they are synthesized into a Main method. In C# scripts, they are executed as top-level code. See https://github.com/dotnet/csharplang/blob/main/proposals/top-level-statements.md for more information.</summary> |
Contributor
Author
There was a problem hiding this comment.
Done in commit 8f3e5d2. Removed the final 'see' statement with the link.
Co-authored-by: CyrusNajmabadi <4564579+CyrusNajmabadi@users.noreply.github.com>
Contributor
|
@dotnet/roslyn-compiler ptal. |
Contributor
|
@dotnet/roslyn-compiler for another pair of eyes. |
333fred
approved these changes
Oct 20, 2025
Contributor
|
@CyrusNajmabadi This looks ready to merg |
This was referenced Oct 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original prompt
Fixes #17118
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.