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.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
It is possible to add tests to `pkg/front_end/parser_testcases/` for this CL to verify that parsing works as expected.
// TODO(eernst): Find the correct way to expect one of several tokens.
codes.codeExpectedButGot.withArgumentsOld("{' or '=>"),
);We should probably add a `codeExpectedButGot2` error message that expects two inputs.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
It is possible to add tests to `pkg/front_end/parser_testcases/` for this CL to verify that parsing works as expected.
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?
// TODO(eernst): Find the correct way to expect one of several tokens.
codes.codeExpectedButGot.withArgumentsOld("{' or '=>"),
);We should probably add a `codeExpectedButGot2` error message that expects two inputs.
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.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Erik ErnstIt is possible to add tests to `pkg/front_end/parser_testcases/` for this CL to verify that parsing works as expected.
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?
Found out about `folder.options`. The expect files are now using the experiment.
Now using `folder.options` to enable the experiment in the parser tests about anonymous methods.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |