Skip to content

Conversation

@BillWagner
Copy link
Member

This PR contains the work for Top-level statements in C# 9.

The commits from #980 were squashed to the first commit on this branch.

The ANTLR grammar is failing. I admit I'm not sure why. There are no grammar changes in this PR.

Add support for top-level statements

Add support for top-level statements

fix md formatting

tweak generated entry-point signature table

Update basic-concepts.md

Add mention of attribute System.Runtime.CompilerServices.CallerMemberName

mention invoking method in top-level statement situation

fix link
@BillWagner BillWagner force-pushed the v9-toplevel-statements branch from d872f61 to 07946a2 Compare November 6, 2025 20:05
@RexJaeschke RexJaeschke added this to the C# 9.0 milestone Nov 7, 2025
@RexJaeschke RexJaeschke added the Review: pending Proposal is available for review label Nov 7, 2025
@RexJaeschke
Copy link
Contributor

RexJaeschke commented Nov 7, 2025

@BillWagner There is one grammar change: the extension of compilation_unit to allow statement_list* before namespace_member_declaration*.

@BillWagner BillWagner changed the title Feature support for top level statements [Version 9.0] Feature support for top level statements Nov 7, 2025
@RexJaeschke RexJaeschke added the type: feature This issue describes a new feature label Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review: pending Proposal is available for review type: feature This issue describes a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants