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

Unified Diff: pkg/analyzer/lib/dart/ast/comment_type.dart

Issue 2522143003: Create a new AstFactory class to be used by analyzer and its clients. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: pkg/analyzer/lib/dart/ast/comment_type.dart
diff --git a/pkg/analyzer/lib/dart/ast/comment_type.dart b/pkg/analyzer/lib/dart/ast/comment_type.dart
new file mode 100644
index 0000000000000000000000000000000000000000..fb9c4da349768e6320515841ac7c9b2eb90030cb
--- /dev/null
+++ b/pkg/analyzer/lib/dart/ast/comment_type.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/**
+ * The possible types of comments that are recognized by the parser.
+ */
+class CommentType {
+ /**
+ * A block comment.
+ */
+ static const CommentType BLOCK = const CommentType('BLOCK');
+
+ /**
+ * A documentation comment.
+ */
+ static const CommentType DOCUMENTATION = const CommentType('DOCUMENTATION');
+
+ /**
+ * An end-of-line comment.
+ */
+ static const CommentType END_OF_LINE = const CommentType('END_OF_LINE');
+
+ /**
+ * The name of the comment type.
+ */
+ final String name;
+
+ /**
+ * Initialize a newly created comment type to have the given [name].
+ */
+ const CommentType(this.name);
+
+ @override
+ String toString() => name;
+}

Powered by Google App Engine
This is Rietveld 408576698