use of org.intellij.markdown.ast.LeafASTNode in project intellij-plugins by JetBrains.
the class PsiBuilderFillingVisitor method visitNode.
@Override
public void visitNode(@NotNull ASTNode node) {
if (node instanceof LeafASTNode) {
/* a hack for the link reference definitions:
* they are being parsed independent from link references and
* the link titles and urls are tokens instead of composite elements
*/
final IElementType type = node.getType();
if (type != MarkdownElementTypes.LINK_LABEL && type != MarkdownElementTypes.LINK_DESTINATION) {
return;
}
}
ensureBuilderInPosition(node.getStartOffset());
final PsiBuilder.Marker marker = builder.mark();
super.visitNode(node);
ensureBuilderInPosition(node.getEndOffset());
marker.done(MarkdownElementType.platformType(node.getType()));
}
Aggregations