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

Unified Diff: pkg/front_end/lib/src/fasta/source/outline_builder.dart

Issue 2977133002: Add documentationComment for Class to Kernel. Parse it. Resynthesize in Analyzer. (Closed)
Patch Set: Skip kDocumentationCommentIndex, don't store it. Created 3 years, 5 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
Index: pkg/front_end/lib/src/fasta/source/outline_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index ca62f0ebec0f25009056b5433bf9af361220789d..c90b48bf96d77e8ae480907fcaffae3e5fc56292 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -283,6 +283,13 @@ class OutlineBuilder extends UnhandledListener {
Token implementsKeyword,
Token endToken) {
debugEvent("endClassDeclaration");
+
+ String documentationComment = null;
+ if (beginToken.precedingComments != null) {
+ documentationComment = beginToken.precedingComments.lexeme;
+ // TODO(scheglov): Add support for line comments.
+ }
+
List<TypeBuilder> interfaces = popList(interfacesCount);
TypeBuilder supertype = pop();
List<TypeVariableBuilder> typeVariables = pop();
@@ -294,8 +301,8 @@ class OutlineBuilder extends UnhandledListener {
}
int modifiers = Modifier.validate(pop());
List<MetadataBuilder> metadata = pop();
- library.addClass(metadata, modifiers, name, typeVariables, supertype,
- interfaces, charOffset);
+ library.addClass(documentationComment, metadata, modifiers, name,
+ typeVariables, supertype, interfaces, charOffset);
checkEmpty(beginToken.charOffset);
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_target.dart ('k') | pkg/front_end/lib/src/fasta/source/source_class_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698