setElementDocumentationComment function

void setElementDocumentationComment (ElementImpl element, AnnotatedNode node)

If the given node has a documentation comment, remember its content and range into the given element.

Implementation

void setElementDocumentationComment(ElementImpl element, AnnotatedNode node) {
  Comment comment = node.documentationComment;
  if (comment != null && comment.isDocumentation) {
    element.documentationComment =
        comment.tokens.map((Token t) => t.lexeme).join('\n');
  }
}