use of com.sun.tools.javac.tree.DCTree in project j2objc by google.
the class JavadocConverter method visitErroneous.
@Override
public Void visitErroneous(ErroneousTree node, TagElement tag) {
if (reportWarnings) {
// Update node's position to be relative to the whole source file, instead of just
// the doc-comment's start. That way, the diagnostic printer will fetch the correct
// text for the line the error is on.
((DCTree.DCErroneous) node).pos = ((DCTree) node).pos(docComment).getStartPosition();
ErrorUtil.warning(node.getDiagnostic().toString());
} else {
// Include erroneous text in doc-comment as is.
TreeNode newNode = setPos(node, new TextElement().setText(node.getBody()));
tag.addFragment(newNode);
}
return null;
}
Aggregations