Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Unified Diff: sdk/lib/mirrors/mirrors_impl.dart

Issue 11726005: Dartdoc comments retrieved as metadata through dart2js mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/universe_serializer.dart ('k') | tests/compiler/dart2js/mirrors_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/mirrors/mirrors_impl.dart
diff --git a/sdk/lib/mirrors/mirrors_impl.dart b/sdk/lib/mirrors/mirrors_impl.dart
index 31effd0c92697485c06593a2de7a7633268c28d2..73f79c225ab9cfb2495bb88a1f3756fd09ae4d86 100644
--- a/sdk/lib/mirrors/mirrors_impl.dart
+++ b/sdk/lib/mirrors/mirrors_impl.dart
@@ -723,3 +723,31 @@ class MirrorException implements Exception {
String toString() => "MirrorException: '$_message'";
final String _message;
}
+
+/**
+ * Class used for encoding comments as metadata annotations.
+ */
+class Comment {
+ /**
+ * The comment text as written in the source text.
+ */
+ final String text;
+
+ /**
+ * The comment text without the start, end, and padding text.
+ *
+ * For example, if [text] is [: /** Comment text. */ :] then the [trimmedText]
+ * is [: Comment text. :].
+ */
+ final String trimmedText;
+
+ /**
+ * Is [:true:] if this comment is a documentation comment.
+ *
+ * That is, that the comment is either enclosed in [: /** ... */ :] or starts
+ * with [: /// :].
+ */
+ final bool isDocComment;
+
+ const Comment(this.text, this.trimmedText, this.isDocComment);
+}
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/universe_serializer.dart ('k') | tests/compiler/dart2js/mirrors_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698