Commit Graph

9 Commits

Author SHA1 Message Date
Ahmed Ashour 5fe480b788 Fix typos
Fix #49864

TEST=ci

Change-Id: I9a7e06d604cd0b4f56f2ac229ab3fc9f01cb9d76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-16 19:35:00 +00:00
Lasse R.H. Nielsen 8a883fa54d Change : to = for default values in pkg.
Leaves some in parser test:
 pkg/front_end/parser_testcases/error_recovery/keyword_named_formal_parameter_prime.dart

TEST=Refactoring, covered by existing tests.

Change-Id: I7a83ef95df3cbd283878b3685b5c747bd89a1b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256125
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-08-24 15:57:16 +00:00
Jake Macdonald e43aad1984 This is a precursor CL to a client side only InterfaceType class, which requires the ability to look at type parameters for arbitrary types in the program, in the declaration phase.
Move TypeDeclarationResolver to be available in the Declaration phase.

Add IntrospectableType interface, and IntrospectableClassDeclaration which implements it (we will eventually have IntrospectableMixinDeclaration, IntrospectableEnumDeclaration, etc).

Migrate ClassIntrospector to InterfaceIntrospector, which operates on IntrospectableType instances instead of ClassDeclaration instances.

Question: Possibly `InterfaceIntrospector` should have a different name, maybe just `TypeDeclarationIntrospector`?

Change-Id: Ifd202bad61eeae5f7d76d769d9d96a866c0fecdb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247060
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-06-28 14:02:12 +00:00
Johnni Winther e86a1140aa [cfe] Implement TypeDeclarationResolver
This implements TypeDeclarationResolver for the CFE. Adds a test to
the macro api test, which includes support for throwing and catching
the ArgumentError required by the api.

Change-Id: I5bb7948064ba5a2c215289915fc10314fd28aa1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237020
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-15 16:35:02 +00:00
Johnni Winther e7d708558f [cfe] Add test for member lookup in ClassIntrospector
This adds tests for `fieldsOf`, `methodsOf` and `constructorsOf` of
the `ClassIntrospector` interface in the macro api test.

Change-Id: I79ef7ce01d00cda2c8277342e4b7c17e91266b5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236884
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-15 15:17:59 +00:00
Johnni Winther 29fc2e7802 [cfe] Support ClassIntrospector.interfacesOf and ClassIntrospector.mixinsOf
This adds support for [interfacesOf] and [mixinsOf] of the
[ClassIntrospector] interface. To support this, the mixed in
[ClassHierarchyNode] is now included in the [ClassHierarchyNode] for
a mixin application.

Change-Id: I30cef4b462b1b2b52acf1bd286d82ebc1c5caa4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236883
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-15 12:42:20 +00:00
Johnni Winther 2c430537c6 add IdentifierResolver api, which allows you to get identifiers for a
given symbol in a given library

Change-Id: I665b3bd2fa6fe7bb64375873e9ae9343e7922a3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234904
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-03 16:51:50 +00:00
Johnni Winther c16d5f01bd [cfe] Use macro_api_test to test ClassIntrospector.superclassOf
Change-Id: I0d74773c27e1fce0d84243c507af7cb2d32a1aa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234160
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-25 07:25:44 +00:00
Johnni Winther 1a0e9f941d [cfe] Add macro api test
This adds an initial test for implementation of the macro api that
can be shared between implementations.

The test consists of a set of macros and a library of declarations that
apply these macros. When applied the macros work as unittest tests that
check that the macro api give the expected results for the various
declarations.

Change-Id: Id4183e8ac90fa96ef1ebc01b1c9f15cc413b6443
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232383
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-02-10 16:08:00 +00:00