Index: sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart |
index 34bccc2f88f7180ba0a4f063afc84fbee86a11bb..6f5189e973aebc204e5370729b5d73ae79f50216 100644 |
--- a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart |
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart |
@@ -233,6 +233,32 @@ abstract class TypeInstanceMirror implements InstanceMirror { |
} |
/** |
+ * Specialized [InstanceMirror] used for reflection on comments as metadata. |
+ */ |
+abstract class CommentInstanceMirror implements InstanceMirror { |
+ /** |
+ * The comment text as written in the source text. |
+ */ |
+ String get text; |
+ |
+ /** |
+ * The comment text without the start, end, and padding text. |
+ * |
+ * For example, if [text] is [: /** Comment text. */ :] then the [trimmedText] |
+ * is [: Comment text. :]. |
+ */ |
+ String get trimmedText; |
+ |
+ /** |
+ * Is [:true:] if this comment is a documentation comment. |
+ * |
+ * That is, that the comment is either enclosed in [: /** ... */ :] or starts |
+ * with [: /// :]. |
+ */ |
+ bool get isDocComment; |
+} |
+ |
+/** |
* Common interface for classes and libraries. |
*/ |
abstract class ContainerMirror implements Mirror { |
@@ -710,12 +736,3 @@ abstract class SourceLocation { |
*/ |
String get sourceText; |
} |
- |
-/** |
- * Class used for encoding dartdoc comments as metadata annotations. |
- */ |
-class DartdocComment { |
- final String text; |
- |
- const DartdocComment(this.text); |
-} |