[L] Change in dart/sdk[main]: Transfer parser updates of CL449821 into this CL

0 views
Skip to first unread message

Erik Ernst (Gerrit)

unread,
Nov 27, 2025, 1:24:11 PM (2 days ago) Nov 27
to Johnni Winther, Brian Wilkerson, Commit Queue, Paul Berry, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson and Johnni Winther

Erik Ernst added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Erik Ernst . resolved

This is the parser update from https://dart-review.googlesource.com/c/sdk/+/449821. I've taken the comments in that CL into account, but an extra check on the treatment of `MemberKind.AnonymousMethod` would be great.

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • Johnni Winther
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I57743ec663633a148087c1be36e492e1e45e406e
Gerrit-Change-Number: 464704
Gerrit-PatchSet: 6
Gerrit-Owner: Erik Ernst <eer...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Erik Ernst <eer...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Paul Berry <paul...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Thu, 27 Nov 2025 18:24:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Johnni Winther (Gerrit)

unread,
Nov 28, 2025, 3:47:55 AM (yesterday) Nov 28
to Erik Ernst, Brian Wilkerson, Commit Queue, Paul Berry, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson and Erik Ernst

Johnni Winther voted and added 2 comments

Votes added by Johnni Winther

Code-Review+1

2 comments

Patchset-level comments
Johnni Winther . resolved

It is possible to add tests to `pkg/front_end/parser_testcases/` for this CL to verify that parsing works as expected.

File pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
Line 7267, Patchset 6 (Latest): // TODO(eernst): Find the correct way to expect one of several tokens.
codes.codeExpectedButGot.withArgumentsOld("{' or '=>"),
);
Johnni Winther . unresolved

We should probably add a `codeExpectedButGot2` error message that expects two inputs.

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • Erik Ernst
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I57743ec663633a148087c1be36e492e1e45e406e
    Gerrit-Change-Number: 464704
    Gerrit-PatchSet: 6
    Gerrit-Owner: Erik Ernst <eer...@google.com>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: Erik Ernst <eer...@google.com>
    Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
    Gerrit-CC: Paul Berry <paul...@google.com>
    Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Attention: Erik Ernst <eer...@google.com>
    Gerrit-Comment-Date: Fri, 28 Nov 2025 08:47:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Erik Ernst (Gerrit)

    unread,
    Nov 28, 2025, 11:39:41 AM (yesterday) Nov 28
    to Johnni Winther, Brian Wilkerson, Commit Queue, Paul Berry, dart-fe-te...@google.com, rev...@dartlang.org
    Attention needed from Brian Wilkerson and Johnni Winther

    Erik Ernst added 2 comments

    Patchset-level comments
    File-level comment, Patchset 6:
    Johnni Winther . unresolved

    It is possible to add tests to `pkg/front_end/parser_testcases/` for this CL to verify that parsing works as expected.

    Erik Ernst

    I added several tests, following what I could see in other tests. I populated the directory with '*.expect' files using `dart pkg/front_end/test/unit_test_suites.dart -p <test> -DupdateExpectations=true`. Hence, it just complains about everything that looks like an anonymous method. Is there a way to enable an experiment for these test cases?

    File pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
    Line 7267, Patchset 6: // TODO(eernst): Find the correct way to expect one of several tokens.

    codes.codeExpectedButGot.withArgumentsOld("{' or '=>"),
    );
    Johnni Winther . resolved

    We should probably add a `codeExpectedButGot2` error message that expects two inputs.

    Erik Ernst

    I added one. I couldn't see how it could have a test case because it is only emitted for code which is already being treated as experimental (so there's no way we can produce that error message using a tool that doesn't enable the experiment), so I added a 'status' file entry to say that there is no example at this time.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Brian Wilkerson
    • Johnni Winther
    Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I57743ec663633a148087c1be36e492e1e45e406e
      Gerrit-Change-Number: 464704
      Gerrit-PatchSet: 11
      Gerrit-Owner: Erik Ernst <eer...@google.com>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: Erik Ernst <eer...@google.com>
      Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
      Gerrit-CC: Paul Berry <paul...@google.com>
      Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Attention: Johnni Winther <johnni...@google.com>
      Gerrit-Comment-Date: Fri, 28 Nov 2025 16:39:35 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Johnni Winther <johnni...@google.com>
      unsatisfied_requirement
      open
      diffy

      Erik Ernst (Gerrit)

      unread,
      Nov 28, 2025, 5:50:55 PM (yesterday) Nov 28
      to Johnni Winther, Brian Wilkerson, Commit Queue, Paul Berry, dart-fe-te...@google.com, rev...@dartlang.org
      Attention needed from Brian Wilkerson and Johnni Winther

      Erik Ernst added 2 comments

      Patchset-level comments
      File-level comment, Patchset 6:
      Johnni Winther . resolved

      It is possible to add tests to `pkg/front_end/parser_testcases/` for this CL to verify that parsing works as expected.

      Erik Ernst

      I added several tests, following what I could see in other tests. I populated the directory with '*.expect' files using `dart pkg/front_end/test/unit_test_suites.dart -p <test> -DupdateExpectations=true`. Hence, it just complains about everything that looks like an anonymous method. Is there a way to enable an experiment for these test cases?

      Erik Ernst

      Found out about `folder.options`. The expect files are now using the experiment.

      File-level comment, Patchset 12 (Latest):
      Erik Ernst . resolved

      Now using `folder.options` to enable the experiment in the parser tests about anonymous methods.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Brian Wilkerson
      • Johnni Winther
      Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I57743ec663633a148087c1be36e492e1e45e406e
      Gerrit-Change-Number: 464704
      Gerrit-PatchSet: 12
      Gerrit-Owner: Erik Ernst <eer...@google.com>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: Erik Ernst <eer...@google.com>
      Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
      Gerrit-CC: Paul Berry <paul...@google.com>
      Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Attention: Johnni Winther <johnni...@google.com>
      Gerrit-Comment-Date: Fri, 28 Nov 2025 22:50:50 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Erik Ernst <eer...@google.com>
      Comment-In-Reply-To: Johnni Winther <johnni...@google.com>
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages