Skip to content

Conversation

@stbau04
Copy link
Contributor

@stbau04 stbau04 commented Oct 3, 2025

Fixes #80537

@stbau04 stbau04 requested a review from a team as a code owner October 3, 2025 10:29
@dotnet-policy-service dotnet-policy-service bot added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Oct 3, 2025
@stbau04 stbau04 marked this pull request as draft October 3, 2025 10:54
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with initial pass.

@RikkiGibson
Copy link
Member

My hope was that looking at the part of the parser, which allows recovery for ; in the new Widget { A = B; C = D } case, would be a good starting point for how to implement this change.

@stbau04
Copy link
Contributor Author

stbau04 commented Oct 3, 2025

@RikkiGibson I did that, but my fork was a week behind. I thought that updating the Syntax.xml is weird but only realized that it is probably also unwanted after i was already off my pc. Gonna fix it tomorrow, sorry for the wasted time spent reviewing.
https://github.com/stbau04/roslyn/blob/ab15a1bbf7ac79e3558a5fab46e52edf0bc50acc/src/Compilers/CSharp/Portable/Parser/LanguageParser.cs#L14159

nodes.AddSeparator(this.CurrentToken.Kind == SyntaxKind.SemicolonToken

@stbau04 stbau04 marked this pull request as ready for review October 4, 2025 17:28
@stbau04 stbau04 requested a review from CyrusNajmabadi October 4, 2025 17:28
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@RikkiGibson RikkiGibson merged commit 7d70296 into dotnet:main Oct 4, 2025
24 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 4, 2025
333fred added a commit to 333fred/roslyn that referenced this pull request Oct 6, 2025
* upstream/main:
  Extensions: Close some tracked follow-ups (dotnet#80527)
  Fix outdated 17.15 to 18.0 (dotnet#80570)
  Update dependencies from https://github.com/dotnet/dotnet build 285582 (dotnet#80551)
  Fix all-in-one tests
  [main] Update dependencies from dotnet/arcade (dotnet#80559)
  Improve error recovery when object initializer uses ':' instead of '=' (dotnet#80553)
  Support `field` keyword in EE. (dotnet#80515)
  Log a debug message for ContentModified exceptions. (dotnet#80549)
  Update dependencies from https://github.com/dotnet/arcade build 20251002.2 (dotnet#80550)
333fred added a commit to 333fred/roslyn that referenced this pull request Oct 7, 2025
* upstream/main: (252 commits)
  Move Watch EA to a separate assembly Microsoft.CodeAnalysis.ExternalAccess.HotReload (dotnet#80556)
  Enable long paths for Windows DartLab CI (dotnet#80581)
  Ensure that CS8659 is reported on partial properties (dotnet#80573)
  Fix a wrong relative link in a doc (dotnet#80567)
  [main] Source code updates from dotnet/dotnet (dotnet#80578)
  Update dependencies from https://github.com/dotnet/arcade build 20251006.2 (dotnet#80577)
  Update main configs after VS snap (dotnet#80523)
  Add followup async public apis (dotnet#80455)
  Reduce allocations in CSharpSyntaxNode.GetStructure (dotnet#80562)
  Extensions: Close some tracked follow-ups (dotnet#80527)
  Fix outdated 17.15 to 18.0 (dotnet#80570)
  Update dependencies from https://github.com/dotnet/dotnet build 285582 (dotnet#80551)
  Fix all-in-one tests
  [main] Update dependencies from dotnet/arcade (dotnet#80559)
  Improve error recovery when object initializer uses ':' instead of '=' (dotnet#80553)
  Support `field` keyword in EE. (dotnet#80515)
  Log a debug message for ContentModified exceptions. (dotnet#80549)
  Update dependencies from https://github.com/dotnet/arcade build 20251002.2 (dotnet#80550)
  Fix
  Simplify and add additional asserts
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error recovery when object initializer uses : instead of =

3 participants