Commit 3c7e613 1 parent 91bda23 commit 3c7e613 Copy full SHA for 3c7e613
File tree 1 file changed +10
-7
lines changed
src/com/google/javascript/jscomp/parsing
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -718,14 +718,17 @@ private Comment getJSDocCommentAt(SourcePosition pos) {
718
718
}
719
719
720
720
private @ Nullable JSDocInfo parseJSDocInfoFrom (Comment comment ) {
721
- if (comment != null ) {
722
- JsDocInfoParser jsDocParser = createJsDocInfoParser (comment );
723
- parsedComments .add (comment );
724
- if (!handlePossibleFileOverviewJsDoc (jsDocParser )) {
725
- return jsDocParser .retrieveAndResetParsedJSDocInfo ();
726
- }
721
+ if (comment == null ) {
722
+ return null ;
727
723
}
728
- return null ;
724
+ JsDocInfoParser jsDocParser = createJsDocInfoParser (comment );
725
+ parsedComments .add (comment );
726
+ if (handlePossibleFileOverviewJsDoc (jsDocParser )) {
727
+ // Returning null here means that the comment was treated as a fileoverview comment, and
728
+ // JSDocInfo should not then be attached to a specific node, so we return null;
729
+ return null ;
730
+ }
731
+ return jsDocParser .retrieveAndResetParsedJSDocInfo ();
729
732
}
730
733
731
734
private @ Nullable JSDocInfo parseJSDocInfoOnTree (ParseTree tree ) {
You can’t perform that action at this time.
0 commit comments