meta: Introduce TargetKind.directive

Fixes https://github.com/dart-lang/sdk/issues/52274

Change-Id: I67884caf86502d4edd848eb32a30097488e09db9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This commit is contained in:
Sam Rawlins
2024-04-02 17:29:29 +00:00
committed by Commit Queue
parent add2f411e6
commit c9474ebaaa
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -2,6 +2,8 @@
- Introduce `TargetKind.constructor`, to indicate that an annotation is valid on
any constructor.
- Introduce `TargetKind.directive`, to indicate that an annotation is valid on
any directive.
- Introduce `TargetKind.typeParamteer`, to indicate that an annotation is valid
on any type parameter.
- Introduce `@doNotSubmit` to annotate members that should not be submitted to
+6
View File
@@ -48,6 +48,11 @@ class TargetKind {
/// because there is no way to annotate a primary constructor.
static const constructor = TargetKind._('constructors', 'constructor');
/// Indicates that an annotation is valid on any directive in a library or
/// part file, whether it's a `library`, `import`, `export`, `part`, or
/// `part of` directive.
static const directive = TargetKind._('directives', 'directive');
/// Indicates that an annotation is valid on any enum declaration.
static const enumType = TargetKind._('enums', 'enumType');
@@ -119,6 +124,7 @@ class TargetKind {
static const values = [
classType,
constructor,
directive,
enumType,
extension,
extensionType,