Skip to content

Fix parsing errors using anonymous records and code quotations #18603

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

Merged
merged 33 commits into from
May 28, 2025

Conversation

edgarfgp
Copy link
Contributor

@edgarfgp edgarfgp commented May 23, 2025

Description

Fixes #18597

BEFORE

{| A= <@ 1 + 1 @>|}
{| A = <@@ 1 + 1 @@>|}

(1,15) (1, 18)error3156parse
Unexpected token '@>|' or incomplete expression

(1,18) (1, 19)error10parse
Unexpected symbol '}' in quotation literal. Expected end of quotation or other token.

(1,6) (1, 8)error602parse
Unmatched '<@ @>'

(1,0) (1, 2)error605parse
Unmatched '{|'

AFTER

{| A= <@ 1 + 1 @>|}
{| A = <@@ 1 + 1 @@>|}

AnonRecd
  (false, None,
  [(SynLongIdent ([A], [], [None]), Some (3,5--3,6),
    Quote
      (Ident op_Quotation, false,
       App
         (NonAtomic, false,
          App
            (NonAtomic, true,
             LongIdent
               (false,
                SynLongIdent
                  ([op_Addition], [],
                   [Some (OriginalNotation "+")]), None,
                (3,12--3,13)), Const (Int32 1, (3,10--3,11)),
             (3,10--3,13)), Const (Int32 1, (3,14--3,15)),
          (3,10--3,15)), false, (3,7--3,18)))], (3,0--3,20),
  { OpeningBraceRange = (3,0--3,2) }), (3,0--3,20)

Checklist

  • Test cases added
  • Release notes entry updated

Copy link
Contributor

github-actions bot commented May 23, 2025

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/10.0.100.md

@edgarfgp edgarfgp marked this pull request as ready for review May 25, 2025 09:27
@edgarfgp edgarfgp requested a review from a team as a code owner May 25, 2025 09:27
@edgarfgp
Copy link
Contributor Author

This is ready.

@github-project-automation github-project-automation bot moved this from New to In Progress in F# Compiler and Tooling May 28, 2025
@T-Gro T-Gro merged commit a1a156d into dotnet:main May 28, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in F# Compiler and Tooling May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Parser errors when using code quotations with anonymous records
2 participants