Index: pkg/kernel/lib/binary/ast_to_binary.dart |
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart |
index 0462336e05b0bd3a806cfd3a163f2c494ce6672b..16d7f0cc8c9bf01c6e6b3918f0130da4936a5477 100644 |
--- a/pkg/kernel/lib/binary/ast_to_binary.dart |
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart |
@@ -415,6 +415,7 @@ class BinaryPrinter extends Visitor { |
Class parent = node.parent; |
writeUInt30(parent.binaryOffset); |
writeName(node.name ?? _emptyName); |
+ writeStringReference(node.documentationComment ?? ''); |
writeAnnotationList(node.annotations); |
assert(node.function.typeParameters.isEmpty); |
writeNode(node.function); |
@@ -444,6 +445,7 @@ class BinaryPrinter extends Visitor { |
} |
writeName(node.name ?? ''); |
writeUriReference(node.fileUri ?? ''); |
+ writeStringReference(node.documentationComment ?? ''); |
writeAnnotationList(node.annotations); |
writeOptionalNode(node.function); |
_variableIndexer = null; |
@@ -467,6 +469,7 @@ class BinaryPrinter extends Visitor { |
} |
writeName(node.name); |
writeUriReference(node.fileUri ?? ''); |
+ writeStringReference(node.documentationComment ?? ''); |
writeAnnotationList(node.annotations); |
writeNode(node.type); |
writeOptionalNode(node.initializer); |
@@ -1370,11 +1373,29 @@ class StringIndexer extends RecursiveVisitor<Null> { |
node.visitChildren(this); |
} |
+ @override |
+ visitConstructor(Constructor node) { |
+ putOptional(node.documentationComment); |
+ super.visitConstructor(node); |
+ } |
+ |
+ @override |
+ visitField(Field node) { |
+ putOptional(node.documentationComment); |
+ super.visitField(node); |
+ } |
+ |
visitNamedExpression(NamedExpression node) { |
put(node.name); |
node.visitChildren(this); |
} |
+ @override |
+ visitProcedure(Procedure node) { |
+ putOptional(node.documentationComment); |
+ super.visitProcedure(node); |
+ } |
+ |
visitStringLiteral(StringLiteral node) { |
put(node.value); |
} |