private void handlePossibleFileOverviewJsDoc(Comment comment) { JsDocInfoParser jsDocParser = createJsDocInfoParser(comment); parsedComments.add(comment); handlePossibleFileOverviewJsDoc(jsDocParser); }
private void handlePossibleFileOverviewJsDoc(Comment comment) { JsDocInfoParser jsDocParser = createJsDocInfoParser(comment); parsedComments.add(comment); handlePossibleFileOverviewJsDoc(jsDocParser); }
private JSDocInfo handleJsDoc(Comment comment) { if (comment != null) { JsDocInfoParser jsDocParser = createJsDocInfoParser(comment); parsedComments.add(comment); if (!handlePossibleFileOverviewJsDoc(jsDocParser)) { return recordJsDoc(comment.location, jsDocParser.retrieveAndResetParsedJSDocInfo()); } } return null; }
private JSDocInfo handleJsDoc(Comment comment) { if (comment != null) { JsDocInfoParser jsDocParser = createJsDocInfoParser(comment); parsedComments.add(comment); if (!handlePossibleFileOverviewJsDoc(jsDocParser)) { return recordJsDoc(comment.location, jsDocParser.retrieveAndResetParsedJSDocInfo()); } } return null; }
public static IRFactory transformTree(ProgramTree tree, StaticSourceFile sourceFile, String sourceString, Config config, ErrorReporter errorReporter) { IRFactory irFactory = new IRFactory(sourceString, sourceFile, config, errorReporter, tree.sourceComments); // don't call transform as we don't want standard jsdoc handling. Node n = irFactory.transformDispatcher.process(tree); irFactory.setSourceInfo(n, tree); if (tree.sourceComments != null) { for (Comment comment : tree.sourceComments) { if ((comment.type == Comment.Type.JSDOC || comment.type == Comment.Type.IMPORTANT) && !irFactory.parsedComments.contains(comment)) { irFactory.handlePossibleFileOverviewJsDoc(comment); } } } irFactory.setFileOverviewJsDoc(n); irFactory.validateAll(n); irFactory.resultNode = n; return irFactory; }
public static IRFactory transformTree(ProgramTree tree, StaticSourceFile sourceFile, String sourceString, Config config, ErrorReporter errorReporter) { IRFactory irFactory = new IRFactory(sourceString, sourceFile, config, errorReporter, tree.sourceComments); // don't call transform as we don't want standard jsdoc handling. Node n = irFactory.transformDispatcher.process(tree); irFactory.setSourceInfo(n, tree); if (tree.sourceComments != null) { for (Comment comment : tree.sourceComments) { if (comment.type == Comment.Type.JSDOC && !irFactory.parsedComments.contains(comment)) { irFactory.handlePossibleFileOverviewJsDoc(comment); } else if (comment.type == Comment.Type.BLOCK) { irFactory.handleBlockComment(comment); } } } irFactory.setFileOverviewJsDoc(n); irFactory.validateAll(n); irFactory.resultNode = n; return irFactory; }